linux-admin.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* IPTABLES: Forwarding port to different machine & different port
@ 2005-03-09 23:29 Jens Knoell
  0 siblings, 0 replies; only message in thread
From: Jens Knoell @ 2005-03-09 23:29 UTC (permalink / raw)
  To: linux-admin

I'm a little lost... I want to simplify the server setup and get rid of 
some forwarding rules in xinetd. So I've modified the firewall rules 
like this:

<---header snipped (sets up basic rules and preps)--->
# Enable NAT
/usr/sbin/iptables -t nat -A POSTROUTING -o eth1 -j SNAT --to-source 
207.224.222.229
#/usr/sbin/iptables -t nat -A POSTROUTING -o eth1 -j MASQUERADE

# Port redirect
# VNC Listeners for tech support
/usr/sbin/iptables -t nat -A PREROUTING -i eth1 -p tcp --dport 5500 -j 
DNAT --to-destination 10.0.0.109:5500
/usr/sbin/iptables -t nat -A PREROUTING -i eth1 -p tcp --dport 5501 -j 
DNAT --to-destination 10.0.0.113:5500
# VNC Forwards for some office people
/usr/sbin/iptables -t nat -A PREROUTING -i eth1 -p tcp --dport 5900 -j 
DNAT --to-destination 10.0.0.105:5900
/usr/sbin/iptables -t nat -A PREROUTING -i eth1 -p tcp --dport 59105 -j 
DNAT --to-destination 10.0.0.105:5900
/usr/sbin/iptables -t nat -A PREROUTING -i eth1 -p tcp --dport 59106 -j 
DNAT --to-destination 10.0.0.106:5900
/usr/sbin/iptables -t nat -A PREROUTING -i eth1 -p tcp --dport 59107 -j 
DNAT --to-destination 10.0.0.107:5900
/usr/sbin/iptables -t nat -A PREROUTING -i eth1 -p tcp --dport 59108 -j 
DNAT --to-destination 10.0.0.108:5900
<---everything below snipped because it's only firewall rules--->

Funny thing: the first two (VNC listeners) work. Everything below does 
not. Any idea what's wrong there?

Thanks a lot
J

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2005-03-09 23:29 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-03-09 23:29 IPTABLES: Forwarding port to different machine & different port Jens Knoell

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).