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: 174

Filed under:


We are using Stunnel. But want to replace it is with an iptables entry if possible. need to be forwarded to So in iptables I set these two entries:

[[email protected] ~]# iptables -t nat -A PREROUTING -p tcp --dport 7300 -j DNAT --to-destination
[[email protected] ~]# iptables -A FORWARD -m state -p tcp -d --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

Related posts about iptables

Related posts about port