Ipvanish Lxc

Duff1234

New Member
Nov 6, 2023
2
0
1
I’m looking for some help with something I’m trying to set up.

I’m looking for best practice or guidance on how to get a connection to an ipvanish vpn for an Lxc.

I have spent too many hours trying to accomplish this with endless google searches and can only end up accomplishing part of what I want but not all of it.

If there is a better way to do this, I’m open to suggestions. So far I am able to get an Ubuntu 22.04 server set up in an Lxc. Then I can follow the ipvanish guide to wget the configs zip and extract that. Then I create a credentials.txt file and enter my username on one line and my password in the next and save it. Then I edit the ovpn file that I want to connect to and add the credentials file to the auth- pass line. Then I can initiate the connection with “sudo openvpn --config ServerFile.ovpn”.

My trouble is trying to make that command start at boot. I’ve tried to enter an @reboot entry in crontab -e for the above command, doesn’t connect at boot. I’ve edited that to add the /path/to/file as well without success. I have created a .sh file and made it executable and then entered that in the crontab entry but none of those seem to work at boot.

Has anyone set up a vpn connection either in a container that starts at boot or some connection in the node network settings that will connect to a vpn provider at boot that would be willing to share some tips or config ideas for me to try?
 
I ended up going a different route and am using docker in an Lxc and using gluetun for the vpn connection in docker.
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!