I compiled OpenVPN 2.4.2 from source on Ubuntu server 16.04.
This is my openvpn.service file located in /lib/systemd/system :
[Unit]
Description=OpenVPN client
After=network.target
[Service]
Type=forking
PIDFile=/var/run/openvpn/%i.pid
ExecStart=/usr/sbin/openvpn --daemon --writepid /var/run/openvpn/openvpn.pid --cd /etc/openvpn/pia/ --config Mexico.conf
ExecStop=-/bin/kill -TERM $MAINPID
Restart=on-failure
[Install]
WantedBy=multi-user.target
I get this error
Job for openvpn.service failed because a timeout was exceeded. See "systemctl status openvpn.service" and "journalctl -xe" for details.
If I run systemctl status openvpn.service I see it complaining about
Jun 19 04:29:33 test systemd[1]: openvpn.service: PID file /var/run/openvpn/.pid not readable (yet?) after start: No such file or directory
But if I run ls -l in /var/run/openvpn I get :
-rw-r--r-- 1 root root 5 Jun 19 04:32 openvpn.pid
But it's working since my public IP changes after that, but it changes a lot so because openvpn is restarting.
How can I generate a more detailed log or fix this issue? I use pia and all PIA files are located in /etc/openvpn/pia and I want to use the Mexico server which I renamed to Mexico.conf
This is my Mexico.conf file :
client
dev tun
proto udp
remote mexico.privateinternetaccess.com 1198
resolv-retry infinite
nobind
persist-key
persist-tun
cipher aes-128-cbc
auth sha1
tls-client
remote-cert-tls server
auth-user-pass login.conf
comp-lzo
verb 1
reneg-sec 0
crl-verify crl.rsa.2048.pem
ca ca.rsa.2048.crt
disable-occ
login.conf is my username and password and it's in the same directory...
I compiled OpenVPN following this guide here
https://www.htpcguides.com/compile-latest-openvpn-from-source-on-debian-8/