Results 1 to 5 of 5

Thread: configure VPN (ipvanich) to start automatically when starting ubuntu 20.04

  1. #1
    Join Date
    Feb 2021
    Beans
    5

    configure VPN (ipvanich) to start automatically when starting ubuntu 20.04

    Dear friends, i have a contrat whit IPVanich vpn, but always i need start manually the VPN when i restart the computer, it may start automatically when i restart the computer.

  2. #2
    Join Date
    Apr 2020
    Location
    where the work takes me
    Beans
    243
    Distro
    Ubuntu 20.04 Focal Fossa

    Re: configure VPN (ipvanich) to start automatically when starting ubuntu 20.04

    I have a contract with Proton VPN, but I use the 'openvpn' command line program as the client, instead of the official Proton VPN client. You could create a command that starts the openvpn client, and set it to run each time you turn the computer on. As an example, the command I use is...
    Code:
    sudo openvpn --config ~/.config/protonvpn/serverconfigs/[CONFIGURATION_FILE_HERE]
    The file path at the end is the path to the configuration file that determines which VPN server the openvpn client will connect with, and inside that file is a line which points to another file that contains my login information, so I don't need to enter the username and password every time the vpn connection starts. Proton VPN let you download these configuration files from their website, one file for each different server you can connect to, I'm guessing IPvanish will offer a similar thing?

    If you press the 'super' key on your keyboard (on the bottom left, inbetween 'ctrl' and 'alt') and then type "Startup Applications" and press 'enter', it will open the application you can use to save commands that will run each time the computer starts. Here you can save a command similar to the one I wrote above which starts the openvpn client. Then all you have to do is add one line to the configuration file which points to another file that contains your login details (only the root user should have permission to read or write this file)

    If all that makes sense I'm happy to go through the steps in more detail (or try to explain in my bad spanish), but you might want to wait for one or two days because somebody else on the forum might know a much easier way for you to do it, or possibly someone with better spanish will be able to help you

  3. #3
    Join Date
    May 2010
    Beans
    1,265

    Re: configure VPN (ipvanich) to start automatically when starting ubuntu 20.04

    Could make a service file yo start and stop the VPN. You could then add the start command to /etc/rc.local to run at boot.

  4. #4
    Join Date
    Feb 2021
    Beans
    5

    Re: configure VPN (ipvanich) to start automatically when starting ubuntu 20.04

    Quote Originally Posted by jcdenton1995 View Post
    I have a contract with Proton VPN, but I use the 'openvpn' command line program as the client, instead of the official Proton VPN client. You could create a command that starts the openvpn client, and set it to run each time you turn the computer on. As an example, the command I use is...
    Code:
    sudo openvpn --config ~/.config/protonvpn/serverconfigs/[CONFIGURATION_FILE_HERE]
    The file path at the end is the path to the configuration file that determines which VPN server the openvpn client will connect with, and inside that file is a line which points to another file that contains my login information, so I don't need to enter the username and password every time the vpn connection starts. Proton VPN let you download these configuration files from their website, one file for each different server you can connect to, I'm guessing IPvanish will offer a similar thing?

    If you press the 'super' key on your keyboard (on the bottom left, inbetween 'ctrl' and 'alt') and then type "Startup Applications" and press 'enter', it will open the application you can use to save commands that will run each time the computer starts. Here you can save a command similar to the one I wrote above which starts the openvpn client. Then all you have to do is add one line to the configuration file which points to another file that contains your login details (only the root user should have permission to read or write this file)

    If all that makes sense I'm happy to go through the steps in more detail (or try to explain in my bad spanish), but you might want to wait for one or two days because somebody else on the forum might know a much easier way for you to do it, or possibly someone with better spanish will be able to help you



    thanks for you response, but i am honest don't understand very good, i think i need to do a couse about Linux, any advice...

  5. #5
    Join Date
    Feb 2021
    Beans
    5

    Re: configure VPN (ipvanich) to start automatically when starting ubuntu 20.04

    Quote Originally Posted by ActionParsnip View Post
    Could make a service file yo start and stop the VPN. You could then add the start command to /etc/rc.local to run at boot.
    i think this solution is easier, but i don't know how create a service file? someone cuold have a patience to explain me how i can create the connection service to the VPN, the file name for VPN connection is "ipvanish-ES-Madrid-mad-a15.ovpn", thank you very much for you support.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •