Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #! /bin/sh
- # This script disables policy routing before the tunnel interface is brought down
- killall checkVPN
- /etc/init.d/transmission-daemon stop
- #On efface les règles iptables ajoutées
- iptables -D FORWARD -s 192.168.10.1/32 -o eth0 -j DROP
- iptables -D SERVICES -p udp --dport 51413 -j ACCEPT # DHT
- iptables -D SERVICES -p tcp --dport 51413 -j ACCEPT # rTorrent random range
- iptables -D INPUT -i $1 -m state --state RELATED,ESTABLISHED -j ACCEPT
- iptables -D POSTROUTING -t nat -o $1 -j MASQUERADE
- iptables -D PREROUTING -t nat -i $1 -p udp --dport 443 -j DNAT --to 192.168.10.1
- iptables -D PREROUTING -t nat -i $1 -p tcp --dport 443 -j DNAT --to 192.168.10.1
- # Remove rule for the secondary loopback IP address (192.168.10.1)
- ip rule del from 192.168.10.1/32 table VPN
- # Remove rule for tun0 IP address
- ip rule del from $4/32 table VPN
Add Comment
Please, Sign In to add comment