Advertisement
Guest User

Untitled

a guest
Sep 1st, 2015
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.31 KB | None | 0 0
  1. #FORWARD ON
  2. sysctl -w net.ipv4.ip_forward=1
  3. #SNAT
  4. iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
  5. #DNAT
  6. iptables -t nat -A PREROUTING -i eth0 -p tcp -dport 22 -j DNAT --to-destination 192.168.25.3
  7. #SAVE FOREVER
  8. iptables-save > /etc/sysconfig/iptables
  9. echo "net.ipv4.ip_forward = 1" > /etc/sysctl.conf
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement