Show pageBacklinksBack to top This page is read only. You can view the source, but not change it. Ask your administrator if you think this is wrong. First make sure you have done the following in the setting: <code> net.ipv4.ip_forward=1 </code> Assume we want to listen to port 12345, and forward it to internal ip 192.168.1.100 with port 12345: <code> iptables -t nat -A PREROUTING -p tcp --dport 12345 -j DNAT --to-destination 192.168.1.100:12345 iptables -t nat -A POSTROUTING -j MASQUERADE </code> For udp protocol, change the first line with udp instead of tcp. You might want to save the iptables by: <code> iptables-save </code> level_4_tcp_udp_tunneling.txt Last modified: 2020/03/20 00:41by chongtin