Personally I find it best to keep everything in /etc/openvpn, just means for me it keeps things simple and openvpn can locate everything it needs. You then need to remove all the spaces from the .ovpn files. Make sure you’re in /etc/openvpn and then for example do:
That will take quite a while but it’s worth it in the long run.
When you’ve done that you can configure them just like jFive has done, putting in ‘/etc/openvpn’ in the three places he’s listed (and /login.conf in the middle line). Don’t forget also to make your ‘login.conf’ file:
sudo nano login.conf
And then follow the other guide in the first link to setup Brian Hornsby’s ui add-on. Doing all this, you won’t ever need Putty in the future, you can activate and deactivate openVPN by use of your TV remote control.
By the way, I’d imagine closing putty is probably killing an open foreground process which is probably why OpenVPN is disconnecting.
Also you may want to look at my thread on how to defeat DNS leaks:
If you do that, in order to edit all the ovpn files in one go, I’ve found the following command useful. Change to your /etc/openvpn directory and type
sudo sh -c 'for filename in *.ovpn; do echo "script-security 2\nup /etc/openvpn/update-resolv-conf\ndown /etc/openvpn/update-resolv-conf" >> $filename; done'
Don’t forget to edit your /etc/openvpn/update-resolve-conf file and add the two lines shown in the last post in that thread, that way when you disconnect OpenVPN your DNS will go back to your default setting.
Okay so first, sudo mv UK\ London.ovpn UKLondon.ovpn.
mv: cannot stat ‘UK London.ovpn’: No such file or directory.
That doesn’t work.
Also OpenVPN just disconnected itself and won’t reconnect for seemingly no reason. I say no reason as in I didn’t touch anything. Just dropped connection and now it will not reconnect at all. So I’m stuck without a working VPN when I didn’t do anything to change it.
Also could you elaborate on the last part?
“By the way, I’d imagine closing putty is probably killing an open foreground process which is probably why OpenVPN is disconnecting.”
Are you saying I have to constantly keep putty running?
Basically long story short, how can I keep my VPN running without having to check it constantly to make sure it didn’t disconnect?