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

19 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

vpn-auto-reconnect.sh

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


Usage:

  1. Clone the repository:
git clone https://github.com/johanneszab/vpn-auto-reconnect.sh.git
  1. Change directory inside that directory:
cd vpn-auto-reconnect.sh
  1. Make the script executable
chmod +x vpn-auto-reconnect.sh
  1. Copy vpn-config-sample.sh to vpn-config.sh. Simply run
cp vpn-config-sample.sh vpn-config.sh
  1. Configure vpn-config.sh. All the needed info on how to do that, is shown in the config comments.

  2. Start monitoring VPN connection

./vpn-auto-reconnect.sh start
  1. Stop the monitoring and also the VPN connection
./vpn-auto-reconnect.sh stop

Source:

nmcli

Source

Fork from 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). You can use it instead of typing vpn-auto-reconnect.sh start/stop:

chmod +x vpn-toggle.sh
./vpn-toggle.sh

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