OpenVPN IPVanish on boot

Hi I have a raspi 3 with osmc and I am trying to run openvpn to connect to my ipvanish account on boot. I have looked around on this forum but there are quite a few different posts that I am having trouble deciphering. Is there a relatively straight forward way? Thanks

Due to problems with systemd dependencies OpenVPN will not start correctly at boot. You need to do the following:

sudo nano /etc/rc.local

Then add the following lines just above exit 0

sleep 10
systemctl restart openvpn

So long as ypu have the IPVanish conf file in the right place OpenVPN will start and connect.

i got mine to work rather successfully without editing too much.
I created a directory /home/vpn
i put all of my vpn configurations into that directory
next i created a script named
inside that script added the line to connect to the config file i put in there. here is what i put

openvpn --config /home/vpn/toronto7.ovpn

save that file and i moved it to /etc/init.d
next hit it with the command “chmod ugo+x /etc/init.d/”
lastly “update-rc.d defaults”
i rebooted and everything worked perfectly, now assuming you have your config files correct you should have no issues doing it this way.

1 Like

Thanks so much, I will give these suggestions a try tonight!

thank you, this works for me

anytime my friend, enjoy :slight_smile: