povoti

PIA kill switch for Ubuntu

Jun 3rd, 2013
312
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.40 KB | None | 0 0
  1. #!/bin/sh
  2. # use tail - /var/log/syslog in terminal to check if it is executed the four lines help you spot easily
  3.  
  4. logger -s XXXXXXXXXX
  5. logger -s $1
  6. logger -s $2
  7. logger -s XXXXXXXXXX
  8.  
  9.  
  10. if [ $2 = "vpn-down" ]
  11. then
  12. # Shut down eth1 when vpn fails (change eth1 to your nic)
  13. ifconfig eth1 down
  14. # this will turn off your wireless networking completely
  15. ip link set wlan0 down
  16. killall transmission-gtk
  17. fi
Advertisement
Add Comment
Please, Sign In to add comment