Jump to content
Not connected, Your IP: 3.15.229.217
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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Security Check
    Play CAPTCHA Audio
    Refresh Image
Sign in to follow this  

×
×
  • Create New...