sysctl net.ipv4.ip_forward=1
iptables -t nat -A PREROUTING -p tcp -i eth0 --dport 12345 -j DNAT --to-destination 192.168.1.2:56789
iptables -t nat -A POSTROUTING -j MASQUERADE
Last active
January 9, 2019 10:53
-
-
Save quyenlv/6570c84dda57b66b38341f3b1340c8ea to your computer and use it in GitHub Desktop.
Simple port forwarding configuration
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment