After setting up my brand new 4k I decided to install the ovpn script, I followed this guide http://brianhornsby.com/blog/how-to-setup-your-vpn-client.php and a few posts on here mostly because that’s what I used on my pi3 as well.
At first it didn’t start, couldn’t find openvpn, turns out it’s in sbin not in bin.
With the exception of my file location which is /etc/openvp/ for the certs and ovpn files instead.
It says it connects but if I do an IP check with SSH wget http://ipecho.net/plain -O - -q ; echo or curl an IPcheck site it either doesn’t resolve or comes up an empty line.
example file
client
dev tun
proto udp
remote fr.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 /etc/openvpn/user.txt
comp-lzo
verb 1
reneg-sec 0
crl-verify /etc/openvpn/crl.rsa.2048.pem
ca /etc/openvpn/ca.rsa.2048.crt
disable-occ
This is what my client file looks like, user text just has my
user
pass
and everything is located in the same directory just as I have set up on my Pi.
I changed the menu to use sudo with and without a password and set the directory to sbin instead of bin.
The script says it’s connected but it isn’t.
I can with my normal connection. Not with the vpn on, it gets stuck on 0% during manual update.
SSH to the vero also keeps timing out randomly, out of the box I had problems finding my NFS’s too, if that helps. It didn’t go smoothly at all so I updated right away but didn’t seem to have changed much.
~$ paste-log /home/osmc/.kodi/userdata/addon_data/script.openvpn/openvpn.log
curl: Can’t open ‘/home/osmc/.kodi/userdata/addon_data/script.openvpn/openvpn.log’!
curl: try ‘curl --help’ or ‘curl --manual’ for more information
curl: Can’t open ‘/home/osmc/.kodi/userdata/addon_data/script.openvpn/openvpn.log’!
curl: try ‘curl --help’ or ‘curl --manual’ for more information
Unable to upload log. Please check your internet connection.
that’s why
I don’t think there even is a verb setting in the config by default, didn’t see it in his guide either.
This is the complete log i’m getting from verb 3, I might have cut something off by mistake.
Sun Apr 8 05:29:40 2018 OpenVPN 2.4.0 arm-unknown-linux-gnueabihf [SSL (OpenSSL)] [LZO] [LZ4] [EPOLL] [PKCS11] [MH/PKTINFO] [AEAD] built on Jul 18 2017
Sun Apr 8 05:29:40 2018 library versions: OpenSSL 1.0.2l 25 May 2017, LZO 2.08
Sun Apr 8 05:29:41 2018 TCP/UDP: Preserving recently used remote address: [AF_INET]
Sun Apr 8 05:29:41 2018 UDP link local: (not bound)
Sun Apr 8 05:29:41 2018 UDP link remote: [AF_INET]
Sun Apr 8 05:29:41 2018 WARNING: this configuration may cache passwords in memory – use the auth-nocache option to prevent this
Sun Apr 8 05:29:41 Peer Connection Initiated with [AF_INET]
Sun Apr 8 05:29:42 2018 TUN/TAP device tun0 opened
Sun Apr 8 05:29:42 2018 do_ifconfig, tt->did_ifconfig_ipv6_setup=0
Sun Apr 8 05:29:42 2018 /sbin/ip link set dev tun0 up mtu 1500
Sun Apr 8 05:29:42 2018 /sbin/ip addr add dev tun0 local 10.68.10.6 peer 10.68.10.5
Sun Apr 8 05:29:42 2018 Initialization Sequence Completed
Sun Apr 8 05:29:52 2018 Authenticate/Decrypt packet error: packet HMAC authentication failed
Sun Apr 8 05:30:02 2018 Authenticate/Decrypt packet error: packet HMAC authentication failed
Sun Apr 8 05:30:12 2018 Authenticate/Decrypt packet error: packet HMAC authentication failed
Sun Apr 8 05:30:22 2018 Authenticate/Decrypt packet error: packet HMAC authentication failed
Sun Apr 8 05:30:32 2018 Authenticate/Decrypt packet error: packet HMAC authentication failed
Sun Apr 8 05:30:42 2018 Authenticate/Decrypt packet error: packet HMAC authentication failed
Sun Apr 8 05:30:52 2018 Authenticate/Decrypt packet error: packet HMAC authentication failed
Sun Apr 8 05:31:02 2018 Authenticate/Decrypt packet error: packet HMAC authentication failed
Sun Apr 8 05:31:12 2018 Authenticate/Decrypt packet error: packet HMAC authentication failed
Sun Apr 8 05:31:22 2018 Authenticate/Decrypt packet error: packet HMAC authentication failed
Sun Apr 8 05:31:32 2018 Authenticate/Decrypt packet error: packet HMAC authentication failed
Sun Apr 8 05:31:42 2018 Inactivity timeout (–ping-restart), restarting
Sun Apr 8 05:31:42 2018 SIGUSR1[soft,ping-restart] received, process restarting
Sun Apr 8 05:31:47 2018 TCP/UDP: Preserving recently used remote address: [AF_INET]185.210.218.104:1198
Sun Apr 8 05:31:47 2018 UDP link local: (not bound)
Sun Apr 8 05:31:49 2018 AUTH: Received control message: AUTH_FAILED
Sun Apr 8 05:31:49 2018 /sbin/ip addr del dev tun0 local 10.68.10.6 peer 10.68.10.5
Sun Apr 8 05:31:49 2018 SIGTERM[soft,auth-failure] received, process exiting
I thought i’d check my Pi on which it used to work just fine so I could retrace my steps but that seems to fail now as well…
Sun Apr 8 06:26:39 2018 OpenVPN 2.4.0 arm-unknown-linux-gnueabihf [SSL (OpenSSL)] [LZO] [LZ4] [EPOLL] [PKCS11] [MH/PKTINFO] [AEAD] $
Sun Apr 8 06:26:39 2018 library versions: OpenSSL 1.0.2l 25 May 2017, LZO 2.08
Sun Apr 8 06:27:19 2018 RESOLVE: Cannot resolve host address: jp.privateinternetaccess.com:1198 (Name or service not known)
Sun Apr 8 06:27:59 2018 RESOLVE: Cannot resolve host address: jp.privateinternetaccess.com:1198 (Name or service not known)
Sun Apr 8 06:27:59 2018 Could not determine IPv4/IPv6 protocol
Sun Apr 8 06:27:59 2018 SIGUSR1[soft,init_instance] received, process restarting
Sun Apr 8 06:28:44 2018 RESOLVE: Cannot resolve host address: jp.privateinternetaccess.com:1198 (Name or service not known)
So now none of the scripts seem to work while I’m sure the one on my Pi used to work just fine.
Edit: I seem to have lost WAN all together on the Pi now, Vero does have WAN, LAN works fine on both. The strange part is that I didn’t change anything in my Pi, Vero or router ofter then giving the Vero a dedicated static ip.
The only odd thing I see on my Pi on shutdown now is “A startup job is running to query time HTTP” something along those lines.
That’s still verbosity level 1. I believe you need to “import” the changed openvpn config into Brian Hornsby’s add-on for it to take effect.
One other small point. I downloaded at the PIA config files (http://privateinternetaccess.com/openvpn/openvpn.zip) and for France it shows a domain name of france.privateinternetaccess.com, whereas yours starts with fr.
I redownloaded the config files and changed everything to the way I did it on my pi (which was almost the same).
Instead of user.txt I used login.conf (was suggested somewhere) and it connects on both devices. My Pi was just on a name server that was down added googles dns as a test.
The problem now is that they constantly drop, it can take an hour or 1 second but the connection doesn’t persist for some reason.
they just always drop.
i set my static DNS to 209.222.18.222 and 209.222.18.218.
I dont know if it will help with stabilizing the connection but it’s worth to try.
it would be nice if it could automatically run on vero startup and keep the tunnel on or automatically reconnect if it drops.
I think the answer is that you can configure the system to run the Brian Hornsby add-on on startup:
but the add-on won’t automatically re-start openvpn if it stops/crashes. For that to happen you would need to run openvpn using systemd – and not use the add-on.
If you want to solve the dropping connection, we will need a log with a verbosity level of 3.
I thought systemd wasn’t an option with the latest version.
I could just as well set it up as systemd if someone could guide me through it, it’s an always on mediacenter so I wouldn’t mind for the vpn to just always be on by default, and since I’m doing the initial setup of everything now anyway be against it at all.
If the connection drops again i’ll post a verbose 3 log for now, it seems like I can’t connect with my pi anymore being unable to resolve the host through the DNS it used 10 minutes ago and the address it resolved at the moment so I wouldn’t call it stable.