Created

Embed URL

HTTPS clone URL

SSH clone URL

You can clone with HTTPS or SSH.

Download Gist
View gist:367982
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
echo 1 > /proc/sys/net/ipv4/ip_forward
 
iptables -t nat -A PREROUTING -i eth0 -p tcp -d xx.xx.xx.xx --dport 443 -j DNAT --to-destination 168.143.162.100:443
 
iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
 
#======
"echo 1 > /proc/sys/net/ipv4/ip_forward" is not permenant,If we want to make this configuration permanent the best way to do it is using the file /etc/sysctl.conf
where we can add a line containing net.ipv4.ip_forward = 1
 
/etc/sysctl.conf:
net.ipv4.ip_forward = 1
 
then
 
sysctl -p /etc/sysctl.conf
# =====
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.