How can I automatically connect to wifi + openvpn on startup/resume when “Automatically connect to wifi”...












0















I want to automatically connect to wifi and an openvpn connection on startup and resume. I am able to connect to my wifi network automatically on startup. I am also able to select and connect to my VPN manually after logging in.



I selected Automatically connect to this VPN when using this connection for my wifi connection in the Network Connections settings menu (I ran nm-connection-editor to open it).



When I start up, I see the icons on the top right of the taskbar repeatedly toggle the Wifi and Openvpn icons, followed by error messages stating that it failed to establish a connection.



I'm running Ubuntu 18.04 on an HP ENVY x360.



Network device info:



  *-network                 
description: Wireless interface
product: Wireless 7265
vendor: Intel Corporation
physical id: 0
bus info: pci@0000:02:00.0
logical name: wlo1
version: 61
serial: 7c:b0:c2:f8:8d:29
width: 64 bits
clock: 33MHz
capabilities: pm msi pciexpress bus_master cap_list ethernet physical wireless
configuration: broadcast=yes driver=iwlwifi driverversion=4.15.0-46-generic firmware=29.1044073957.0 ip=192.168.1.126 latency=0 link=yes multicast=yes wireless=IEEE 802.11
resources: irq:156 memory:df100000-df101fff
*-network
description: Ethernet interface
physical id: 2
logical name: docker0
serial: 02:42:b1:a1:76:c3
capabilities: ethernet physical
configuration: broadcast=yes driver=bridge driverversion=2.3 firmware=N/A ip=172.17.0.1 link=no multicast=yes









share|improve this question







New contributor




snchzsrg is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.

























    0















    I want to automatically connect to wifi and an openvpn connection on startup and resume. I am able to connect to my wifi network automatically on startup. I am also able to select and connect to my VPN manually after logging in.



    I selected Automatically connect to this VPN when using this connection for my wifi connection in the Network Connections settings menu (I ran nm-connection-editor to open it).



    When I start up, I see the icons on the top right of the taskbar repeatedly toggle the Wifi and Openvpn icons, followed by error messages stating that it failed to establish a connection.



    I'm running Ubuntu 18.04 on an HP ENVY x360.



    Network device info:



      *-network                 
    description: Wireless interface
    product: Wireless 7265
    vendor: Intel Corporation
    physical id: 0
    bus info: pci@0000:02:00.0
    logical name: wlo1
    version: 61
    serial: 7c:b0:c2:f8:8d:29
    width: 64 bits
    clock: 33MHz
    capabilities: pm msi pciexpress bus_master cap_list ethernet physical wireless
    configuration: broadcast=yes driver=iwlwifi driverversion=4.15.0-46-generic firmware=29.1044073957.0 ip=192.168.1.126 latency=0 link=yes multicast=yes wireless=IEEE 802.11
    resources: irq:156 memory:df100000-df101fff
    *-network
    description: Ethernet interface
    physical id: 2
    logical name: docker0
    serial: 02:42:b1:a1:76:c3
    capabilities: ethernet physical
    configuration: broadcast=yes driver=bridge driverversion=2.3 firmware=N/A ip=172.17.0.1 link=no multicast=yes









    share|improve this question







    New contributor




    snchzsrg is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
    Check out our Code of Conduct.























      0












      0








      0








      I want to automatically connect to wifi and an openvpn connection on startup and resume. I am able to connect to my wifi network automatically on startup. I am also able to select and connect to my VPN manually after logging in.



      I selected Automatically connect to this VPN when using this connection for my wifi connection in the Network Connections settings menu (I ran nm-connection-editor to open it).



      When I start up, I see the icons on the top right of the taskbar repeatedly toggle the Wifi and Openvpn icons, followed by error messages stating that it failed to establish a connection.



      I'm running Ubuntu 18.04 on an HP ENVY x360.



      Network device info:



        *-network                 
      description: Wireless interface
      product: Wireless 7265
      vendor: Intel Corporation
      physical id: 0
      bus info: pci@0000:02:00.0
      logical name: wlo1
      version: 61
      serial: 7c:b0:c2:f8:8d:29
      width: 64 bits
      clock: 33MHz
      capabilities: pm msi pciexpress bus_master cap_list ethernet physical wireless
      configuration: broadcast=yes driver=iwlwifi driverversion=4.15.0-46-generic firmware=29.1044073957.0 ip=192.168.1.126 latency=0 link=yes multicast=yes wireless=IEEE 802.11
      resources: irq:156 memory:df100000-df101fff
      *-network
      description: Ethernet interface
      physical id: 2
      logical name: docker0
      serial: 02:42:b1:a1:76:c3
      capabilities: ethernet physical
      configuration: broadcast=yes driver=bridge driverversion=2.3 firmware=N/A ip=172.17.0.1 link=no multicast=yes









      share|improve this question







      New contributor




      snchzsrg is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.












      I want to automatically connect to wifi and an openvpn connection on startup and resume. I am able to connect to my wifi network automatically on startup. I am also able to select and connect to my VPN manually after logging in.



      I selected Automatically connect to this VPN when using this connection for my wifi connection in the Network Connections settings menu (I ran nm-connection-editor to open it).



      When I start up, I see the icons on the top right of the taskbar repeatedly toggle the Wifi and Openvpn icons, followed by error messages stating that it failed to establish a connection.



      I'm running Ubuntu 18.04 on an HP ENVY x360.



      Network device info:



        *-network                 
      description: Wireless interface
      product: Wireless 7265
      vendor: Intel Corporation
      physical id: 0
      bus info: pci@0000:02:00.0
      logical name: wlo1
      version: 61
      serial: 7c:b0:c2:f8:8d:29
      width: 64 bits
      clock: 33MHz
      capabilities: pm msi pciexpress bus_master cap_list ethernet physical wireless
      configuration: broadcast=yes driver=iwlwifi driverversion=4.15.0-46-generic firmware=29.1044073957.0 ip=192.168.1.126 latency=0 link=yes multicast=yes wireless=IEEE 802.11
      resources: irq:156 memory:df100000-df101fff
      *-network
      description: Ethernet interface
      physical id: 2
      logical name: docker0
      serial: 02:42:b1:a1:76:c3
      capabilities: ethernet physical
      configuration: broadcast=yes driver=bridge driverversion=2.3 firmware=N/A ip=172.17.0.1 link=no multicast=yes






      networking wireless network-manager vpn openvpn






      share|improve this question







      New contributor




      snchzsrg is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.











      share|improve this question







      New contributor




      snchzsrg is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.









      share|improve this question




      share|improve this question






      New contributor




      snchzsrg is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.









      asked 1 hour ago









      snchzsrgsnchzsrg

      12




      12




      New contributor




      snchzsrg is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.





      New contributor





      snchzsrg is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.






      snchzsrg is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.






















          1 Answer
          1






          active

          oldest

          votes


















          0














          The actual steps depend on how OpenVPN was installed, but if it was installed via the package manager (vs built manually or tarball), there should be a startup script already available. If your (single) config file is in /etc/openvpn/, it should be used to start your OpenVPN daemon (background process).



          Notes:




          1. https://openvpn.net/community-resources/how-to/#configuring-openvpn-to-run-automatically-on-system-startup

          2. in the past, I recall the extension had to be .conf on linux, and .opvn on windows? (going off memory, I've used several OS's w/ OpenVPN)

          3. add only a single config file to that directory, because by default (it's configurable), openvpn is going to start all config files located there: see /etc/default/openvpn & /etc/init.d/openvpn

          4. This also assumes the authentication info is supplied in the ovpn config file.






          share|improve this answer
























          • Related: askubuntu.com/questions/464264/… and askubuntu.com/questions/426211/…

            – michael
            55 mins ago











          Your Answer








          StackExchange.ready(function() {
          var channelOptions = {
          tags: "".split(" "),
          id: "89"
          };
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function() {
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled) {
          StackExchange.using("snippets", function() {
          createEditor();
          });
          }
          else {
          createEditor();
          }
          });

          function createEditor() {
          StackExchange.prepareEditor({
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader: {
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          },
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          });


          }
          });






          snchzsrg is a new contributor. Be nice, and check out our Code of Conduct.










          draft saved

          draft discarded


















          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1128701%2fhow-can-i-automatically-connect-to-wifi-openvpn-on-startup-resume-when-automa%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes









          0














          The actual steps depend on how OpenVPN was installed, but if it was installed via the package manager (vs built manually or tarball), there should be a startup script already available. If your (single) config file is in /etc/openvpn/, it should be used to start your OpenVPN daemon (background process).



          Notes:




          1. https://openvpn.net/community-resources/how-to/#configuring-openvpn-to-run-automatically-on-system-startup

          2. in the past, I recall the extension had to be .conf on linux, and .opvn on windows? (going off memory, I've used several OS's w/ OpenVPN)

          3. add only a single config file to that directory, because by default (it's configurable), openvpn is going to start all config files located there: see /etc/default/openvpn & /etc/init.d/openvpn

          4. This also assumes the authentication info is supplied in the ovpn config file.






          share|improve this answer
























          • Related: askubuntu.com/questions/464264/… and askubuntu.com/questions/426211/…

            – michael
            55 mins ago
















          0














          The actual steps depend on how OpenVPN was installed, but if it was installed via the package manager (vs built manually or tarball), there should be a startup script already available. If your (single) config file is in /etc/openvpn/, it should be used to start your OpenVPN daemon (background process).



          Notes:




          1. https://openvpn.net/community-resources/how-to/#configuring-openvpn-to-run-automatically-on-system-startup

          2. in the past, I recall the extension had to be .conf on linux, and .opvn on windows? (going off memory, I've used several OS's w/ OpenVPN)

          3. add only a single config file to that directory, because by default (it's configurable), openvpn is going to start all config files located there: see /etc/default/openvpn & /etc/init.d/openvpn

          4. This also assumes the authentication info is supplied in the ovpn config file.






          share|improve this answer
























          • Related: askubuntu.com/questions/464264/… and askubuntu.com/questions/426211/…

            – michael
            55 mins ago














          0












          0








          0







          The actual steps depend on how OpenVPN was installed, but if it was installed via the package manager (vs built manually or tarball), there should be a startup script already available. If your (single) config file is in /etc/openvpn/, it should be used to start your OpenVPN daemon (background process).



          Notes:




          1. https://openvpn.net/community-resources/how-to/#configuring-openvpn-to-run-automatically-on-system-startup

          2. in the past, I recall the extension had to be .conf on linux, and .opvn on windows? (going off memory, I've used several OS's w/ OpenVPN)

          3. add only a single config file to that directory, because by default (it's configurable), openvpn is going to start all config files located there: see /etc/default/openvpn & /etc/init.d/openvpn

          4. This also assumes the authentication info is supplied in the ovpn config file.






          share|improve this answer













          The actual steps depend on how OpenVPN was installed, but if it was installed via the package manager (vs built manually or tarball), there should be a startup script already available. If your (single) config file is in /etc/openvpn/, it should be used to start your OpenVPN daemon (background process).



          Notes:




          1. https://openvpn.net/community-resources/how-to/#configuring-openvpn-to-run-automatically-on-system-startup

          2. in the past, I recall the extension had to be .conf on linux, and .opvn on windows? (going off memory, I've used several OS's w/ OpenVPN)

          3. add only a single config file to that directory, because by default (it's configurable), openvpn is going to start all config files located there: see /etc/default/openvpn & /etc/init.d/openvpn

          4. This also assumes the authentication info is supplied in the ovpn config file.







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered 58 mins ago









          michaelmichael

          1,49411522




          1,49411522













          • Related: askubuntu.com/questions/464264/… and askubuntu.com/questions/426211/…

            – michael
            55 mins ago



















          • Related: askubuntu.com/questions/464264/… and askubuntu.com/questions/426211/…

            – michael
            55 mins ago

















          Related: askubuntu.com/questions/464264/… and askubuntu.com/questions/426211/…

          – michael
          55 mins ago





          Related: askubuntu.com/questions/464264/… and askubuntu.com/questions/426211/…

          – michael
          55 mins ago










          snchzsrg is a new contributor. Be nice, and check out our Code of Conduct.










          draft saved

          draft discarded


















          snchzsrg is a new contributor. Be nice, and check out our Code of Conduct.













          snchzsrg is a new contributor. Be nice, and check out our Code of Conduct.












          snchzsrg is a new contributor. Be nice, and check out our Code of Conduct.
















          Thanks for contributing an answer to Ask Ubuntu!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid



          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.


          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1128701%2fhow-can-i-automatically-connect-to-wifi-openvpn-on-startup-resume-when-automa%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          GameSpot

          日野市

          Tu-95轟炸機