Linux Help
guides forums blogs
Home Desktops Distributions ISO Images Logos Newbies Reviews Software Support & Resources Linuxhelp Wiki

Welcome Guest ( Log In | Register )

Advanced DNS Management
New ZoneEdit. New Managment.


Sign Up Now
Reply to this topicStart new topic
> Ip Tables Help!, Port Forwarding
post Apr 18 2005, 11:13 PM
Post #1

Whats this Lie-nix Thing?

Group: Members
Posts: 1
Joined: 18-April 05
Member No.: 4,891

I have a linux router setup and I want to forward all requests on 3389 (terminal server) to an internal IP address.

This is what i have so far, but it doesn't work, I get the "Client cound not connect to the remote computer" when I try.

$IPTABLES -A INPUT -i $EXTIF -p tcp --sport 3389 -j ACCEPT
$IPTABLES -A OUTPUT -o $INTIF -p tcp --sport 3389 -j ACCEPT
$IPTABLES -t nat -A PREROUTING -p tcp -i $EXTIF -d $EXTIF --dport 3389 -j DNAT --to
$IPTABLES -A FORWARD -p tcp -i $EXTIF -d --dport 3389 -j ACCEPT

$EXTIF = External Interface
$INTIF = Internal Interface (
Target computer for Terminal Server =

Can someone please tell me what I need to do to get this working?
Go to the top of the page
+Quote Post
post Apr 19 2005, 02:34 AM
Post #2

Its GNU/

Group: Support Specialist
Posts: 1,439
Joined: 3-January 04
From: Germany
Member No.: 2,069


this is how mine looks like, I'm allowing a remote client to use ultravnc to connect to one of my internal servers.... = remote public ip address
yyy.yyy.yyy.yyy = firewall internal ip address = server running ultravnc on port 5900

iptables -A FORWARD -i eth1 -s -d yyy.yyy.yyy.yyy -p tcp --dport 5900 -j ACCEPT
iptables -t nat -A PREROUTING -p tcp -d yyy.yyy.yyy.yyy --dport 5900 -j DNAT --to

I hope this helps, and I hope that I wrote this down correctly smile.gif

Robert B

Robert Becskei
May the source be with us!
AMD X2-3800 @ 2400Mhz
2048MB DDR 400Mhz
DFI Lanparty UT4 NF4 ULTRA-D
GeForce 7800GT
Pioneer DVD-RW
17inch Samsung Syncmaster 757NF
WinXP Pro (SP2)/ CentOS 4.3
Go to the top of the page
+Quote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:


RSS Lo-Fi Version Time is now: 22nd July 2018 - 08:01 AM