Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- If you have a vpn running then you will know that if the line between you and your vpn provider drops, then your internet continues on. This leads to your isp knowing what your doing or most importantly you are not secure wirelessly. This script i found on the internet works by allowing no internet traffic at all unless through vpn and is will also disconect you. I suggest you take off auto connect.
- 1- Create a file called vpnscript (or anything else) in /etc/NetworkManager/dispatcher.d/
- 2-copy/paste the following into that script
- #!/bin/sh
- # use tail - /var/log/syslog in terminal to check if it is executed the four lines help you spot easily
- logger -s XXXXXXXXXX
- logger -s $1
- logger -s $2
- logger -s XXXXXXXXXX
- if [ $2 = "vpn-down" ]
- then
- # Shut down eth0 when vpn fails (change eth0 to your nic)
- ifconfig eth0 down
- # this will turn off your wireless networking completely
- # ip link set wlan0 down
- fi
- 3- in a terminal run chmod 755 vpnscript
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement