LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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!

Notices


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

Rep: Reputation: 1
IPtables forward


hi guys

i have a problem with iptables


i have a scenario like this


192.168.20.1 172.16.20.10
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

Code:
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,404

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:
Code:
iptables -A FORWARD -m state --state ESTABLISHED,RELATED -j ACCEPT
iptables -A FORWARD -p tcp --dport 3389 -m state --state NEW -j ACCEPT
 
  


Reply


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


All times are GMT -5. The time now is 01:20 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration