Hi all,
I managed to get OpenVPN working. I tried logging in the VPN using this script and looking at the openvpn.log file it seems to have logged in properly. However when I check my external IP using curl ipinfo.io/ip it still shows my own (private) IP.
This is the OpenVPN log (I ran this instance of OpenVPN from command prompt for testing purposes):
osmc@osmc-Theophilus:~/.kodi/userdata/addon_data/script.openvpn$ sudo openvpn --config Xxx.ovpn
Sun May 28 07:12:14 2017 OpenVPN 2.3.4 arm-unknown-linux-gnueabihf [SSL (OpenSSL)] [LZO] [EPOLL] [PKCS11] [MH] [IPv6] built on Nov 19 2015
Sun May 28 07:12:14 2017 library versions: OpenSSL 1.0.1t 3 May 2016, LZO 2.08
Sun May 28 07:12:14 2017 WARNING: file ‘Xxx.key’ is group or others accessible
Sun May 28 07:12:14 2017 Socket Buffers: R=[87380->131072] S=[16384->131072]
Sun May 28 07:12:14 2017 Attempting to establish TCP connection with [AF_INET]5.79.xx.xx:1194 [nonblock]
Sun May 28 07:12:15 2017 TCP connection established with [AF_INET]5.79.xx.xx:1194
Sun May 28 07:12:15 2017 TCPv4_CLIENT link local: [undef]
Sun May 28 07:12:15 2017 TCPv4_CLIENT link remote: [AF_INET]5.79.xx.xx:1194
Sun May 28 07:12:15 2017 TLS: Initial packet from [AF_INET]5.79.xx.xx:1194, sid=1bd58d63 a2a446a5
Sun May 28 07:12:15 2017 VERIFY OK: depth=1, C=EU, ST=EU, L=Xxx, O=website, OU=Xxx.eu, CN=Xxx.eu, name=Xxx.eu, emailAddress=support@Xxx.eu
Sun May 28 07:12:15 2017 VERIFY OK: nsCertType=SERVER
Sun May 28 07:12:15 2017 VERIFY OK: depth=0, C=EU, ST=EU, L=Xxx, O=website, OU=Xxx.eu, CN=Xxx.eu, name=Xxx.eu, emailAddress=support@Xxx.eu
Sun May 28 07:12:15 2017 Data Channel Encrypt: Cipher ‘BF-CBC’ initialized with 128 bit key
Sun May 28 07:12:15 2017 Data Channel Encrypt: Using 160 bit message hash ‘SHA1’ for HMAC authentication
Sun May 28 07:12:15 2017 Data Channel Decrypt: Cipher ‘BF-CBC’ initialized with 128 bit key
Sun May 28 07:12:15 2017 Data Channel Decrypt: Using 160 bit message hash ‘SHA1’ for HMAC authentication
Sun May 28 07:12:15 2017 Control Channel: TLSv1, cipher TLSv1/SSLv3 DHE-RSA-AES256-SHA, 1024 bit RSA
Sun May 28 07:12:15 2017 [Xxx.eu] Peer Connection Initiated with [AF_INET]5.79.xx.xx:1194
Sun May 28 07:12:17 2017 SENT CONTROL [Xxx.eu]: ‘PUSH_REQUEST’ (status=1)
Sun May 28 07:12:17 2017 PUSH: Received control message: ‘PUSH_REPLY,redirect-gateway,dhcp-option DNS 8.8.8.8,route 10.8.0.1,topology net30,ping 10,ping-restart 120,ifconfig 10.8.0.22 10.8.0.21’
Sun May 28 07:12:17 2017 OPTIONS IMPORT: timers and/or timeouts modified
Sun May 28 07:12:17 2017 OPTIONS IMPORT: --ifconfig/up options modified
Sun May 28 07:12:17 2017 OPTIONS IMPORT: route options modified
Sun May 28 07:12:17 2017 OPTIONS IMPORT: --ip-win32 and/or --dhcp-option options modified
Sun May 28 07:12:17 2017 ROUTE_GATEWAY 192.168.1.254/255.255.255.0 IFACE=eth0 HWADDR=b8:27:eb:09:18:3b
Sun May 28 07:12:17 2017 TUN/TAP device tun0 opened
Sun May 28 07:12:17 2017 TUN/TAP TX queue length set to 100
Sun May 28 07:12:17 2017 do_ifconfig, tt->ipv6=0, tt->did_ifconfig_ipv6_setup=0
Sun May 28 07:12:17 2017 /sbin/ip link set dev tun0 up mtu 1500
Sun May 28 07:12:17 2017 /sbin/ip addr add dev tun0 local 10.8.0.22 peer 10.8.0.21
Sun May 28 07:12:19 2017 /sbin/ip route add 5.79.xx.xx/32 via 192.168.1.254
Sun May 28 07:12:19 2017 /sbin/ip route del 0.0.0.0/0
Sun May 28 07:12:19 2017 /sbin/ip route add 0.0.0.0/0 via 10.8.0.21
RTNETLINK answers: File exists
Sun May 28 07:12:19 2017 ERROR: Linux route add command failed: external program exited with error status: 2
Sun May 28 07:12:19 2017 /sbin/ip route add 10.8.0.1/32 via 10.8.0.21
Sun May 28 07:12:19 2017 Initialization Sequence Completed
Also in this case, when I open a second terminal and try a lookup of my IP i still get my private IP address.
Any clues?
Thanks and regards