[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Redirect to domain name instead of ip



Hi

I'm trying to redirect port 2211 to a computer on my LAN. The
computer is receiving it's ip-address via dhcp with ddns. So it
should be nice and easy, but it ain't working in PREROUTING, not
even with the port number removed at the end of the address. I read
something regarding the use of --string, but i couldn't get it
working for me. So i hope there is someone who cant rewrite this.

iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 2211 -j DNAT
--to 172.16.0.30:2211
iptables -A FORWARD -i eth0 -p tcp --dport 2211 -d pc.utysket.dk -j
ACCEPT

Best Regards.

/Lars



Reply to: