25

I am using Ubuntu 12.04.2 LTS, 64-bit, OpenVPN client 2.3.1

How do I prevent OpenVPN from autostarting at boot-up or reboot?

Eric Carvalho
  • 55,453
n00b
  • 1,927

2 Answers2

41

You have two options:

  • Run:

    sudo update-rc.d openvpn disable
    

    Then you'll have to run sudo service openvpn start to manually start the VPN.

  • Or edit the file /etc/default/openvpn

    sudo gedit /etc/default/openvpn
    

    And uncomment the line:

    #AUTOSTART="none"
    

    So it looks like:

    AUTOSTART="none"
    

    Then you'll have to run sudo service openvpn start <vpn-name> to manually start the VPN. <vpn-name> is the config file name without .conf.

Eric Carvalho
  • 55,453
2

Nothing on this page helped me, but it was pinned by Google.

The command that fixed my problem:

sudo systemctl disable openvpn@client.service

I am running Ubuntu 20.10 with Openvpn v. 2.4.9

RE: https://www.ivpn.net/knowledgebase/linux/linux-autostart-openvpn-in-systemd-ubuntu/