OpenVPN Client Monitor will check the network connection periodically and can shutodnw/restart the OpenVPN client service if the connection is down, it can also check if the ip is leaking and restart it or shutdown the computer.
-
For Linux running
[email protected]
only! (currently)- but can be easily changed your requirements.
- Defualt: Checks every 5 mins and restarts [email protected] if connection is down.
- Very customizable via command line args.
- Configurable checking interval.
- Configurable restart/shutdown/more to come.
Run installer.sh as sudo to install and setup auto start
sudo chmod +x ./installer.sh
sudo ./installer.sh
Install requirements to run/build the OpenVPN Client Monitor with
python3 -m pip install -r requirements.txt
Make sure you installed requrement.txt first and then run
pyinstaller -F main.py
The single file binary will be in ./dist/main
.
You can run it by (sudo required)
sudo ./dist/main
Copy the binary over ./user/bin/
sudo cp ./dist/main /usr/bin/openvpn-client-mon
Copy systemd file over to ./etc/systemd/system/
cp ./etc/systemd/system/openvpnclientmon.service /etc/systemd/system/openvpnclientmon.service
Enable and Start OpenVPN Client Monitor
sudo systemctl enable openvpnclientmon.service
sudo systemctl start openvpnclientmon.service
Install requrements as sudo first
sudo python3 -m pip install -r requirements.txt
You can run it by (sudo required)
sudo python3 main.py
To print command line args options
./main -h
To check the network connection every 100 seconds
./main -t 100
To check the network connection every 100 seconds and shutdown computer
./main -t 100 -a 2
To check the network connection every 100 seconds and restart
./main -t 100 -a 1
Want to contribute? Great!, pull requests are welcomed! Thank you!
- implement logging/log file
- implement more actions
- load settings from a config yaml file
MIT