how to portforward port 7300 from server A to server B
Posted
by
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: 336
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
© Server Fault or respective owner