Guest User

Untitled

a guest
May 25th, 2017
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.79 KB | None | 0 0
  1. root@ubuntu:~# #!/bin/sh
  2. root@ubuntu:~#
  3. root@ubuntu:~# #if [ off = $1 ]; then
  4. root@ubuntu:~# #iptables -P INPUT ACCEPT
  5. root@ubuntu:~# #iptables -P OUTPUT ACCEPT
  6. root@ubuntu:~# #iptables -P FORWARD ACCEPT
  7. root@ubuntu:~# #iptables -F
  8. root@ubuntu:~# #iptables -X
  9. root@ubuntu:~# #echo "IP-Forwarding deaktiviert"
  10. root@ubuntu:~# #else
  11. root@ubuntu:~# # aktivert ip-forwarding
  12. root@ubuntu:~# echo 1 > /proc/sys/net/ipv4/ip_forward
  13. root@ubuntu:~# iptables -t nat -A POSTROUTING -s 192.168.0.0/24 -o wlan0 -j MASQUERADE
  14. root@ubuntu:~# iptables -A FORWARD -s 192.168.0.0/24 -o eth0 -j ACCEPT
  15. root@ubuntu:~# iptables -A FORWARD -d 192.168.0.0/24 -m state --state ESTABLISHED,RELATED -i eth0 -j ACCEPT
  16. root@ubuntu:~# echo "IP-Forwarding aktiviert"
  17. IP-Forwarding aktiviert
  18. root@ubuntu:~# #fi
  19. root@ubuntu:~#
Advertisement
Add Comment
Please, Sign In to add comment