LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 10-25-2005, 06:17 AM   #1
Zorrocaesar
LQ Newbie
 
Registered: Oct 2005
Posts: 3

Rep: Reputation: 0
Problem with Port Forwarding


I am using Slackware 10.2 with a 2.4 kernel for NAT and a WIN XP SP2 workstation which runs a DC client.
My iptables configuration looks something like this:

Code:
#Enable Forward
iptables -A FORWARD -i $EXTIF -o $INTIF -m state ESTABLISHED,RELATED -j ACCEPT
iptables -A FORWARD -i $INTIF -o $EXTIF -j ACCEPT

# NAT
iptables -t nat -A POSTROUTING-o $EXTIF -J SNAT --to 82.77.115.78

#Port Forwarding
iptables -t nat -A PREROUTING -d 82.77.115.78 -p tcp --dport 6783 -j DNAT --to-destination 192.168.0.2
iptables -t nat -A PREROUTING -d 82.77.115.78 -p udp --dport 5758 -j DNAT --to-destination 192.168.0.2

The DC client is configured as follows:
Firewall with manual port forwarding
TCP port: 6783
UDP port: 5758
External/WAN IP: 82.77.115.78


The NAT works without any problems, meaning that I can write this text from the Win dows workstation.
Unfortunatey, the port forwarding part is not working meaning that even if I set the above ports (6783 - TCP, 5758 - UDP), the DC client doesn't have any traffic on these ports. It works well when it's active with a real IP or when passive through the NAT server.
As far as I know, this whole configuration should work. What am I doing wrong?
 
Old 10-25-2005, 07:18 AM   #2
uberNUT69
Member
 
Registered: Jan 2005
Location: Tasmania
Distribution: Xen Debian Lenny/Sid
Posts: 578

Rep: Reputation: 30
Have you checked
# cat /proc/sys/net/ipv4/ip_forward

it needs to be set to 1 for forwarding:
eg.
# echo 1 > /proc/sys/net/ipv4/ip_forward
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
IPCHAINS port forwarding and IPTABLES port forwarding ediestajr Linux - Networking 26 01-14-2007 07:35 PM
Problem with Port forwarding :( aronnok Linux - Networking 2 04-06-2005 02:16 PM
port forwarding problem bruj3w Linux - Networking 3 08-13-2004 08:13 PM
port forwarding problem syrtsardo Linux - Networking 6 07-19-2004 01:50 AM
port forwarding problem roueleader Linux - Newbie 9 06-11-2002 04:44 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 08:34 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration