Advertisement
constantin-net

быстрый шлюз для лениывх

Feb 15th, 2016
141
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.34 KB | None | 0 0
  1. раздаёт 192.168.1.1 255.255.255.0
  2. принимает 192.168.1.2 255.255.255.0 gateway 192.168.1.1 /etc/resolv.conf nameserver 8.8.8.8
  3.  
  4. echo "1" > /proc/sys/net/ipv4/ip_forward
  5. iptables -F
  6. iptables -F -t nat
  7. iptables -P OUTPUT ACCEPT
  8. iptables -P FORWARD ACCEPT
  9. iptables -t nat -A POSTROUTING -s 192.168.1.1/24 -o wlan0 -j MASQUERADE
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement