Patrick van Hout
on Server Fault
See other posts from Server Fault
or by Patrick van Hout
Published on 2010-11-25T07:47:57Z Indexed on 2011/01/12 19:55 UTC
Read the original article Hit count: 174
We are using Stunnel. But want to replace it is with an iptables entry if possible.
192.168.123.122:7300 need to be forwarded to 192.168.123.188:7300. So in iptables I set these two entries:
[[email protected] ~]# iptables -t nat -A PREROUTING -p tcp --dport 7300 -j DNAT --to-destination 192.168.123.188:7300 [[email protected] ~]# iptables -A FORWARD -m state -p tcp -d 192.168.123.188 --dport 7300 --state NEW,ESTABLISHED,RELATED -j ACCEPT
But it isn't working.
I did check that /proc/sys/net/ipv4/conf/eth0/forwarding has the value "1" inside.
Any tips or hints?
© Server Fault or respective owner