Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- root@ubuntu:~# #!/bin/sh
- root@ubuntu:~#
- root@ubuntu:~# #if [ off = $1 ]; then
- root@ubuntu:~# #iptables -P INPUT ACCEPT
- root@ubuntu:~# #iptables -P OUTPUT ACCEPT
- root@ubuntu:~# #iptables -P FORWARD ACCEPT
- root@ubuntu:~# #iptables -F
- root@ubuntu:~# #iptables -X
- root@ubuntu:~# #echo "IP-Forwarding deaktiviert"
- root@ubuntu:~# #else
- root@ubuntu:~# # aktivert ip-forwarding
- root@ubuntu:~# echo 1 > /proc/sys/net/ipv4/ip_forward
- root@ubuntu:~# iptables -t nat -A POSTROUTING -s 192.168.0.0/24 -o wlan0 -j MASQUERADE
- root@ubuntu:~# iptables -A FORWARD -s 192.168.0.0/24 -o eth0 -j ACCEPT
- root@ubuntu:~# iptables -A FORWARD -d 192.168.0.0/24 -m state --state ESTABLISHED,RELATED -i eth0 -j ACCEPT
- root@ubuntu:~# echo "IP-Forwarding aktiviert"
- IP-Forwarding aktiviert
- root@ubuntu:~# #fi
- root@ubuntu:~#
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement