Jump to content
Not connected, Your IP: 216.73.217.99
Sign in to follow this  
trekkie.forever

ANSWERED linux openvpn reconnect

Recommended Posts

Hello,

I just do a simple "sudo openvpn --config airvpn-server.ovpn" on arch linux and things work fine. The problem is every time I close and open my laptop screen, I have to manually restart the command - Ctrl-C followed by the above command.

Anyway this can reconnect automatically?

Thanks.

Share this post


Link to post
@trekkie.forever

Hello!

In general OpenVPN doesn't manage this situation properly. To automate the procedure you are forced to perform, you may consider to run a script (with root privileges) on wake up. This script might send a SIGTERM to OpenVPN and re-start it, or perhaps just sending a SIGHUP to OpenVPN might suffice (to be tested though). Some ideas for systemd based Linux systems:
https://unix.stackexchange.com/questions/152039/how-to-run-a-user-script-after-systemd-wakeup

Kind regards
 

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×
×
  • Create New...