#!/bin/bash
#Iptables Regeln für VPN:
sudo iptables -t filter -A OUTPUT -o wlan0 -p udp -m multiport --dports 1149,149,1150,150,1151,151,53 -m state --state NEW,ESTABLISHED,RELATED -j ACCEPT
sudo iptables -t filter -A OUTPUT -o wlan0 -p tcp -m multiport --dports 1152,152 -m state --state NEW,ESTABLISHED,RELATED -j ACCEPT
sudo iptables -t filter -A OUTPUT -o eth0 -p udp -m multiport --dports 1149,149,1150,150,1151,151,53 -m state --state NEW,ESTABLISHED,RELATED -j ACCEPT
sudo iptables -t filter -A OUTPUT -o eth0 -p tcp -m multiport --dports 1152,152 -m state --state NEW,ESTABLISHED,RELATED -j ACCEPT
sudo iptables -t filter -A INPUT -i wlan0 -p udp -m multiport --sports 1149,149,1150,150,1151,151,53 -m state --state ESTABLISHED,RELATED -j ACCEPT
sudo iptables -t filter -A INPUT -i wlan0 -p tcp -m multiport --sports 1152,152 -m state --state ESTABLISHED,RELATED -j ACCEPT
sudo iptables -t filter -A INPUT -i eth0 -p udp -m multiport --sports 1149,149,1150,150,1151,151,53 -m state --state ESTABLISHED,RELATED -j ACCEPT
sudo iptables -t filter -A INPUT -i eth0 -p tcp -m multiport --sports 1152,152 -m state --state ESTABLISHED,RELATED -j ACCEPT
sudo iptables -t filter -A OUTPUT --dst 192.168.0.0/16 -j ACCEPT
sudo iptables -t filter -A INPUT --src 192.168.0.0/16 -j ACCEPT
sudo iptables -t filter -A OUTPUT --dst 10.0.0.0/8 -j ACCEPT
sudo iptables -t filter -A INPUT --src 10.0.0.0/8 -j ACCEPT
sudo iptables -t filter -A OUTPUT --dst 172.16.0.0/12 -j ACCEPT
sudo iptables -t filter -A INPUT --src 172.16.0.0/12 -j ACCEPT
sudo iptables -t filter -A OUTPUT -o wlan0 -j DROP
sudo iptables -t filter -A INPUT -i wlan0 -j DROP
sudo iptables -t filter -A OUTPUT -o eth0 -j DROP
sudo iptables -t filter -A INPUT -i eth0 -j DROP