sarkanydavidhu

Untitled

Jun 8th, 2016
129
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.34 KB | None | 0 0
  1. echo 1 > /proc/sys/net/ipv4/ip_forward
  2. echo "net.ipv4.ip_forward=1" > /etc/sysctl.d/60-ipv4-forward.conf
  3. iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
  4. iptables -t filter -A FORWARD -i eth0 -o dns0 -m state --state RELATED,ESTABLISHED -j ACCEPT
  5. iptables -t filter -A FORWARD -i dns0 -o eth0 -j ACCEPT
  6. iptables-save > /etc/iptables.rules
Advertisement
Add Comment
Please, Sign In to add comment