RPi3/Vero OVPN doesn't work (addon/manual)

I have 2 RPi3’s and a Vero 4k so I’ll just post this in RPi
I can’t seem to get my OpenVPN to function.

I tried this

sudo apt-get update
sudo apt-get upgrade
sudo apt-get install network-manger-openvpn
sudo apt-get install openvpn
Run sudo wget https://www.yourVPNprovidergoeshere.com/openvpn/openvpn.zip
Extract the files from the zip with unzip openvpn.zip

Now try and connect to the VPN of your choice ending in ovpn.

sudo openvpn --config ./Netherlands.ovpn

It’ll ask you for your user and password. Enter these and hopefully you get 'Initialization Sequence Completed’. If not, go over the process before.
On the Raspberry Pi you need to press ‘CTRL -c’ to cancel the sequence and take control again.
After this you need to change the config to keep your User and Password in it.
sudo nano /etc/openvpn/login.conf

here you need 2 lines

USERNAME- add your credentials
PASSWORD- add your credentials

now
sudo chmod 400 /etc/openvpn/login.conf

And now make a copy of the .ovpn config file and add the login.conf file onto the existing line with auth-user-pass. The * depicts the .opvn file of your choice.

sudo cp .ovpn /etc/openvpn/.conf

so: sudo nano /etc/openvpn/*.conf

At the line auth-user-pass add login.conf so it looks exactly like

auth-user-pass login.conf

Now the important part. Move both the ca.crtfile and the crl.pem file into /etc/openvpn folder.

Run another test to make sure your username and password are automatically accepted by running:

sudo openvpn *.conf

You should get the 'Initialization Sequence Completed’ again and no interaction. Please CTRL -c’ out of it.

To make it work on start up we need to change the startup file for openvpn.
sudo nano /etc/default/openvpn

Look down the file for these lines:
Add the name of your VPN WITHOUT .opvn extension. For me its Netherlands

#AUTOSTART=“all”
#AUTOSTART=“none”
#AUTOSTART="home office”
AUTOSTART=“Netherlands”

Now reboot your Pi:

sudo reboot

Then to make sure it’s working find my external IP

wget http://ipecho.net/plain -O - -q ; echo

Which forces all LAN IP’s (vero and Rpi’s) to the same LAN IP 192.168.1.102 which I use on my main computer so it keeps kicking me off. If I try to set /network/interfaces to a static IP and test my ovpn it gets a Linux routing error because of it, I tried to set a static DHCP from my router but that causes a routing error as well.
If I wget http://ipecho.net/plain - O - -q ; echo while not changing the routing it returns nothing and has no access to the internet.

I tried using the Brian Hornsby addon afterwards and followed his tutorial, if I check ipecho after that it worked and my IP returned is right, but if I check again after about an hour it returns my home IP again while the addon still says I’m connected.

I didn’t even reach setting iptables because the connection isn’t stable, if I can get it to stabilize I would need iptable settings as well because I’m no hero when it comes to iptables.

Does anyone know how to get this to work?
Making a hotspot shield or router setup is not an option unfortunately so I have to get them to work on each device (no i’m not using it on more then the allowed clients from the VPN service) but I just can’t seem to figure out why it screws up. It works fine on openelec but I don’t like using openelec.

With this you are breaking the OSMC way of handling the network (Connman).
Openvpn is now (since January) part of the OSMC install. You only need Brian Hornsby Addon and provide your configuration files.
Suggest you start from a clean install.

Can’t I just uninstall the package or reconfig it someway?
I’ve got everything set up and running for months now I really don’t want to start over again :frowning:

I would have to reinstall and setup everything on 3 setups again because of one apt-get, that will take me a few days

Give it a try with sudo apt-get remove network-manger-openvpn

sudo apt remove network-manager-openvpn
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
  armv7-libcrossguid-osmc dconf-gsettings-backend dconf-service
  glib-networking glib-networking-common glib-networking-services
  gsettings-desktop-schemas libapt-inst1.5 libass5 libavcodec56 libavresample2
  libavutil54 libbind9-90 libbluetooth3 libdbus-1-dev libdconf1 libdns100
  libdpkg-perl libfftw3-single3 libgif4 libgnutls-deb0-28 libhogweed2 libicu52
  libisc95 libisccc90 libisccfg90 libjansson4 libjasper1 libjson-c2 liblwres90
  libmicrohttpd10 libmm-glib0 libmysqlclient18 libndp0 libnettle4 libnewt0.52
  libnm0 libntdb1 libopenjpeg5 libplist2 libpng12-0 libproxy1v5 libpsl0
  libschroedinger-1.0-0 libsoup2.4-1 libssl1.0.0 libteamdctl0 libvpx1 libwebp5
  libwebpdemux1 libwebpmux1 libwebrtc-audio-processing-0 libx264-142
  libxtables10 network-manager pkg-config python-dbus-dev
Use 'sudo apt autoremove' to remove them.
The following packages will be REMOVED:
  network-manager-openvpn
0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
After this operation, 1055 kB disk space will be freed.
Do you want to continue? [Y/n] y
(Reading database ... 27529 files and directories currently installed.)
Removing network-manager-openvpn (1.2.8-2) ...

It seems like it removed just the one thing, i’m testing vpn now and it wget http://ipecho.net/ -O - -q ; echo seems to respond with the correct IP for now. It’s too bad that Brian Hornsby didn’t add a connection check function and connect/disconnect toasts to his script so you know if you are connected or not.
I’ll check again in an hour to see if it stays on.
What kind of iptables could I use to force tun everything?

Just use zomboied VPN manager add-on. Simple setup enter VPN details and connect. See here

That has so many features, I really need to sit down to get that to work correctly, it most likely looks more complex then it is but reading through it at first left me clueless but I’m not that familiar with linux based networking, or better said I just hate networking in general because it breaks with 1 typo and is hard (for me) to debug.

But thanks for sharing I’ll have a look at it.
Kodi just crashed. like it always does since last fall, after scanning multiple instances of new files and syncing with trakt but it did connect to the vpn on startup so I’ll see report back in an hour or so to see if the vpn stays up. If it keeps dropping I will give Zomboided a try.