Help answer threads with 0 replies.
Go Back > Forums > Linux Forums > Linux - Networking
User Name
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.


  Search this Thread
Old 12-16-2005, 06:54 PM   #1
LQ Newbie
Registered: Aug 2003
Posts: 23

Rep: Reputation: 15
a little help needed for adding nat rule

hi all.
i've got everything running now. and i want to port forward 3389 to my windows. so that i can remote access it. so how do you add this rule??

this is what i have, but it doesn't work.
EXTIP is my wan ip is my windows server's ip

iptables -t nat -A PREROUTING -d $EXTIP -p TCP --dport 3389 -j DNAT --to-destination

iptables -t nat -A POSTROUTING -s -p TCP --sport 3389 -j SNAT --to-source $EXTIP

here is my set up
1 debian box with 2 nics acting as gateway/firewall
- nat is working fine for my whole network.
so the only problem i have is to port forward 3389 to my windows.

please help
Old 12-16-2005, 07:14 PM   #2
LQ Newbie
Registered: Aug 2003
Posts: 23

Original Poster
Rep: Reputation: 15
don't worry about it guys. it's working fine now. my silly mistake. i just post my solution as well, in case someone having similar problem.
coz i set my default forwarding policy to drop. so ofcourse the traffic can't travel across my network.
so i just need to add
iptables -A FORWARD -p tcp -i $WAN -d --dport 3389 -j ACCEPT

it works perfectly fine now. =)


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
Custom FDI Rule Needed - Any Help Much Appreciated rrrssssss Mandriva 0 12-03-2005 04:51 AM
NAT Rule for FTP failing raja_lucky22 Linux - Security 2 07-04-2005 11:31 PM
Issues with adding a udev rule... Ateo Linux - General 1 03-04-2005 09:02 PM
No rule to make target `/mkspecs/default/qmake.conf', needed by `Makefile'. Stop Julianus Linux - General 0 12-21-2003 08:17 AM
Verify this rule please. Iptables help needed.. Pcghost Linux - Networking 4 02-18-2003 03:46 PM > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 07:04 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