Advertisement
SH1NU11b1

vpnscript

Oct 21st, 2015
151
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.96 KB | None | 0 0
  1. 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.
  2.  
  3. 1- Create a file called vpnscript (or anything else) in /etc/NetworkManager/dispatcher.d/
  4.  
  5. 2-copy/paste the following into that script
  6.  
  7. #!/bin/sh
  8. # use tail - /var/log/syslog in terminal to check if it is executed the four lines help you spot easily
  9.  
  10. logger -s XXXXXXXXXX
  11. logger -s $1
  12. logger -s $2
  13. logger -s XXXXXXXXXX
  14.  
  15.  
  16. if [ $2 = "vpn-down" ]
  17. then
  18. # Shut down eth0 when vpn fails (change eth0 to your nic)
  19. ifconfig eth0 down
  20. # this will turn off your wireless networking completely
  21. # ip link set wlan0 down
  22. fi
  23.  
  24. 3- in a terminal run chmod 755 vpnscript
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement