Giter Site home page Giter Site logo

cloudxtreme / vpnkillswitch Goto Github PK

View Code? Open in Web Editor NEW

This project forked from qbwaggle/vpnkillswitch

0.0 1.0 0.0 22 KB

VPNKillSwitch works on Debian systems, including Raspberry Pi (Raspbian). The service will keep your OpenVPN client connected and prevent data transmission if connection to the VPN is lost.

Shell 87.34% Python 12.66%

vpnkillswitch's Introduction

VPNKillSwitch

VPNKillSwitch is a script that can be run on a schedule using cron (see below for my implementation). It determines if (1) OpenVPN client is still connected, (2) if an internet connection is active, and (3) if the IPTables firewall rules are configured properly such that if VPN connection is lost, no data is sent or received. If any of the 3 tests fails, then the script will attempt to reconnect the client to the VPN and reconfigure the IPTables firewall rules.

The Wiki provides better instructions on the aforementioned configuration.

Running Script with Cron

In Debian 8.x edit the crontab file with the following command: nano /etc/crontab

Add the following line to the end of the file:

*/1 * * * * root /usr/vpnkillswitch/vpnkillswitch.sh

Change the path of vpnkillswitch.sh as needed.

This will run the script once every minute.

vpnkillswitch's People

Contributors

qbwaggle avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.