Help - Search - Members - Calendar
Full Version: Ip Tables Help!
Linuxhelp > Support > Technical Support
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?

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
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2018 Invision Power Services, Inc.