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’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?