Celeb Glow
news | March 22, 2026

Prevent OpenVPN from disconnecting (with PIA) via CLI?

I set up Private Internet Access via these instructions (OpenVPN) a few weeks ago. Everything seemed fine,

 wget -qO -

was reporting an IP from the expected location. Today, however, I discovered I wasn't connected anymore.

I want to prevent this from happening again. How can I ensure that my Ubuntu machine always stays connected to the VPN? If the VPN goes down, I'd rather lose internet access than connect directly through my ISP.

N.B. I'm running Ubuntu server (no GUI) and SSHing in. I don't need remote access (over the internet), but I do want to ensure I can still connect locally if the VPN disconnects.

If possible, please include instructions on how to persist changes after reboot.

Reset to default

Know someone who can answer? Share a link to this question via email, Twitter, or Facebook.

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy