Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sidarta-luizalabs/4ada3328b0b22062478bd028b613fa7e to your computer and use it in GitHub Desktop.
Save sidarta-luizalabs/4ada3328b0b22062478bd028b613fa7e to your computer and use it in GitHub Desktop.
ovh-config
# allowed out
echo 1 > /proc/sys/net/ipv4/ip_forward
iptables --table nat --append POSTROUTING --out-interface eth0 -j MASQUERADE
iptables --append FORWARD --in-interface eth1 -j ACCEPT
# forward port
iptables -t nat -A PREROUTING -p tcp -d 192.95.39.129 --dport 80 -j DNAT --to-destination 10.0.0.3:80
iptables -t nat -A POSTROUTING -p tcp -d 10.0.0.3 --dport 80 -j SNAT --to-source 10.0.0.1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment