Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 01-13-2014, 04:15 PM   #1
Registered: Oct 2010
Posts: 99

Rep: Reputation: 1
IPtables forward

hi guys

i have a problem with iptables

i have a scenario like this
Server1 ----------- Linux router ------------ XP Client

default forward policy for forward chain in Linux Router is Drop
when i add a rule to allow to allow RDP to xp client it doesnt work
i add a roule in router

iptables -I FORWARD -p tcp --dport 3389 -m state --state NEW,STABLISHED -j ACCEPT
but Server 1 cannot connect to XP Client with RDP ??
what should i do when default policy for FORWARD chain is DROP ??

i have a rule
Old 01-13-2014, 05:57 PM   #2
Ser Olmy
Senior Member
Registered: Jan 2012
Distribution: Slackware
Posts: 2,470

Rep: Reputation: Disabled
Your rule will not match return traffic. The port numbers in those packets will be reversed, as the XP system will respond by sending TCP packets from port 3389 to whatever source port used by the RDP client.

You should have a general rule in the FORWARD chain handling only packets matching the ESTABLISHED state, and your other FORWARD rule will then just have to handle NEW packets. Remove the existing rules with iptables -F FORWARD and try this:
iptables -A FORWARD -m state --state ESTABLISHED,RELATED -j ACCEPT
iptables -A FORWARD -p tcp --dport 3389 -m state --state NEW -j ACCEPT


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
iptables forward gustavolinux Linux - Networking 3 10-06-2008 03:42 PM
How can I forward ports with IPtables? I want to forward 80 to 8080 abefroman Linux - Networking 3 05-23-2008 11:05 AM
iptables FORWARD Ipolit Slackware 16 06-09-2005 05:35 PM
iptables forward? Bambi Linux - Security 2 10-02-2003 11:15 AM
iptables FORWARD ArnaudVR Linux - Security 6 07-07-2003 06:05 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 02:55 AM.

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