Created
April 4, 2017 03:21
-
-
Save sidarta-luizalabs/4ada3328b0b22062478bd028b613fa7e to your computer and use it in GitHub Desktop.
ovh-config
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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