how to portforward port 7300 from server A to server B
- by Patrick van Hout
hi,
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:
[root@dev ~]# iptables -t nat -A PREROUTING -p tcp --dport 7300 -j DNAT --to-destination 192.168.123.188:7300
[root@dev ~]# 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?
thanks, Patrick