Skip to content

A simple bash script for autoreconnect to OpenVPN via NetworkManager command-line (nmcli).

Notifications You must be signed in to change notification settings

johanneszab/vpn-auto-reconnect.sh

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

vpn-auto-reconnect.sh

A simple bash script for autoreconnect to OpenVPN via NetworkManager command-line (nmcli).

Usage:

  1. Make the script executable "chmod +x /path/to/the/vpn-auto-reconnect.sh"

  2. Copy "vpn-config-sample.sh" to "vpn-config.sh". Simply run "cp vpn-config-sample.sh vpn-config.sh".

  3. Configure "vpn-config.sh". All the needed info on how to do that, is shown in the config comments.

  4. vpn-auto-reconnect.sh start -- starts and monitors VPN connection

  5. vpn-auto-reconnect.sh stop -- stops the monitor and also the VPN connection

Source:

nmcli: https://wiki.gnome.org/Projects/NetworkManager/nmcli

Source: http://www.gabsoftware.com/tips/automatically-reconnect-to-your-vpn-on-linux/

Fork from: https://gist.github.com/antoniy/f925ae55410a092c9e75/ with changes for nmcli v0.9.10.

Script tested on fedora 21 with airvpn (OpenVPN).

vpn-toggle.sh

A simple bash script to toggle an OpenVPN connection on and off via NetworkManager command-line (mncli).

Usage:

  1. Make the script executable "chmod +x /path/to/the/vpn-toggle.sh"

  2. Copy "vpn-config-sample.sh" to "vpn-config.sh". Simply run "cp vpn-config-sample.sh vpn-config.sh".

  3. Configure "vpn-config.sh". All the needed info on how to do that, is shown in the config comments.

  4. vpn-toggle.sh -- starts or stops your first set VPN connection

About

A simple bash script for autoreconnect to OpenVPN via NetworkManager command-line (nmcli).

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages