[CentOS] TCP/IP Port Relay

Thu Apr 24 14:36:33 UTC 2008
James Pifer <jep at obrien-pifer.com>

On Thu, 2008-04-24 at 17:27 +0300, Vahur Jõesalu wrote:
> hmm, if I understood you correctly, then this should work just fine (on 
> linux firewall):
> /sbin/iptables -t nat -I PREROUTING -p tcp --dport 23 -j DNAT \
> --to telnetserverip:port-number
> /sbin/iptables -I FORWARD -i external_interface -o internal_interface \ 
> -p tcp -d telnetserverip --dport portnumberontelnetserver -j ACCEPT
> after a reboot or firewall service restart it's gone again.
> -vahur

Sorry to jump in on someone else's thread, but... How do you do this if
the interface you want to use is a virtual? Meaning it's eth0:1 for
example? The -i parameter will not let you use that.