https://github.com/pzim-devdata/vpn_autoconnect
A script to automatically connect to the VPN at startup (if you lauch this script at startup) and reconnect if connection is lost.
https://github.com/pzim-devdata/vpn_autoconnect
Last synced: about 1 year ago
JSON representation
A script to automatically connect to the VPN at startup (if you lauch this script at startup) and reconnect if connection is lost.
- Host: GitHub
- URL: https://github.com/pzim-devdata/vpn_autoconnect
- Owner: pzim-devdata
- License: mit
- Created: 2023-07-27T08:05:00.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2023-08-21T10:50:04.000Z (over 2 years ago)
- Last Synced: 2025-02-07T20:27:05.639Z (about 1 year ago)
- Language: Shell
- Size: 41 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# VPNautoconnect.sh for Linux : Automatically connect to the VPN at startup and reconnect if connection is lost.
[](https://github.com/pzim-devdata/vpn_autoconnect/blob/master/LICENSE) [](https://github.com/pzim-devdata/vpn_autoconnect/issues)    [](https://GitHub.com/pzim-devata/vpn_autoconnect/commit/)
[Download :inbox_tray:](https://github.com/pzim-devdata/vpn_autoconnect/releases/download/v1.0.0/VPNautoconnect.zip)
## Description :
A script to automatically connect to the VPN at startup (if you lauch this script at startup) and reconnect every 5 seconds if connection is lost.
This updated version will also reconnect the wifi or ethernet card, if used, if connection is lost with a ping check

## How to install :
1. Download the file "VPNautoconnect.sh" in a folder called `VPN` in your `Home` directory :
```
cd ~
git clone https://github.com/pzim-devdata/vpn_autoconnect.git VPN
```
2. Then open your Terminal in the folder where "VPNautoconnect.sh" is located and type :
```
cd ~
chmod +x VPN/VPNautoconnect.sh
```
3. Connect to the VPN at startup :
If you want to connect to the VPN automatically at startup :
- Execute `python3 ~/VPN/Create_autostart_entry.py`
or
- Enter the address of the script "VPNautoconnect.sh" (which is `VPN/VPNautoconnect.sh` in this exemple) in your favorite startup tool : like "gnome-tweak-tool" for Gnome or other startup applications for other desktop environment : https://winaero.com/blog/manage-startup-apps-linux-mint/
Reboot an enjoy ! :blush:
-----------------------------------------
In bonus, you can [download 3 little scripts for Nemo or Nautilus](https://github.com/pzim-devdata/Tools-for-Linux/raw/master/VPNautoconnect/Scripts.zip) in order to connect or disconnect quickly and easily :blush:
Install them in this directory :
- For Caja (Mate) in : ~/.config/caja/scripts.
- For Nautilus (Gnome/Unity) in : ~/.local/share/nautilus/scripts
- For Némo (Cinnamon) in : ~/.local/share/nemo/scripts/

--------------------------------------------
## - [Licence](https://github.com/pzim-devdata/DATA-developer/raw/master/LICENSE)
MIT License
Copyright (c) 2019 pzim-devdata
--------------------------------------------
## - [Contact :email:](mailto:contact@pzim.fr?subject=Contact%20from%20Github)
Created by [@pzim](https://www.pzim.fr/) - feel free to contact me!