I placed my openvpn.conf file in /etc/openvpn/client/myovpn.conf
I placed my auth file ine /etc/openvpn/client/auth.txt
On my server side of the VPN, is an openVPN-AS instance on Amazon.
On my openvpnas instance (the vpn server) my user inputed server directives are as follows:
Code: Select all
resolv-retry infinite
persist-key
persist-tun
keepalive 10 120
explicit-exit-notify 1
push "keepalive 10 120"
Code: Select all
resolv-retry infinite
persist-key
persist-tun
keepalive 10 120
auth-user-pass /etc/openvpn/client/auth.txt
# OPENVPN UP/DOWN SCRIPT FOR PI SERVER
script-security 2
up /etc/openvpn/update-systemd-resolved
up-restart
down /etc/openvpn/update-systemd-resolved
down-pre
I have run the command
Code: Select all
sudo systemctl enable openvpn-client@myovpn
Code: Select all
sudo systemctl start openvpn-client@myovpn
The PROBLEM is that if I unplug the internet from the client for 15 seconds (simulating an internet outage), the ubuntu client is unable to recover or reconnect after I plug the internet cable back in. It doesn't get any internet whatsoever after pluging it back in, and I wait for well over 10 minutes. What I need, is my client to automatically reconnect to the openvpn-as instance (the vpn server) automatically when the internet gets plugged back in.
How do I go about accomplishing this and what am I doing wrong?