wired does not connect on boot if vpn option enabled

Questions about Wi-Fi and other network devices, file sharing, firewalls, connection sharing etc
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
HiRsch

wired does not connect on boot if vpn option enabled

Post by HiRsch »

Hi there,

I have my Ethernet set to automatically connect to my VPN provider on connection. However, if this is set and I reboot, my machine will not even connect to the local network first. I have to click the network manager and select the wired connection. It then works (local connection plus vpn). However, if I disable the automatic VPN connection it does connect to the local network without any problems.

I would like to have my computer automatically connect to my VPN provider on boot.

Any ideas?

I am running Mint 17 xfce 64 bit.

Cheers
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
HiRsch

Re: wired does not connect on boot if vpn option enabled

Post by HiRsch »

found a workaround in this thread: http://askubuntu.com/questions/328823/vpn-autoconnect

using following script and making it startup with the computer:

Code: Select all

#! /bin/bash

while true
do
   connection="Auto Ethernet"
   vpn_connection="My VPN connection"
   run_interval="60"

   active_connection=$(nmcli con status | grep "${connection}")
   active_vpn=$(nmcli con status | grep "${vpn_connection}")

   if [ "${active_connection}" -a ! "${active_vpn}" ];
   then
      nmcli con up id "${vpn_connection}"
   fi

   sleep $run_interval
done
leetwanker

Re: wired does not connect on boot if vpn option enabled

Post by leetwanker »

Wow! 2 years later and this bug still hasn't been fixed?

I've just run into it myself, trying this workaround: http://unix.stackexchange.com/questions ... -waking-up

Linux Mint Cinnamon 17.3 x64
heinhuiz
Level 1
Level 1
Posts: 18
Joined: Thu Apr 27, 2017 7:25 am

Re: wired does not connect on boot if vpn option enabled

Post by heinhuiz »

Almost another year and it's still there in 18.2 Cinnamon x64.

Thanks for the suggestions, I'll try them.
heinhuiz
Level 1
Level 1
Posts: 18
Joined: Thu Apr 27, 2017 7:25 am

Re: wired does not connect on boot if vpn option enabled

Post by heinhuiz »

Just for the sake of completeness: the bug still exists (I'm using kernel 4.10.0-33 now), but the workaround posted by @leetwanker solved it for me:

Let NetworkManager store the password in plaintext in the configuration file in /etc/NetworkManager/system-connections/. To do this:
  1. Open a terminal.
  2. sudoedit /etc/NetworkManager/system-connections/<VPN>, where <VPN> is the configuration file for your VPN (the filename is usually the name you assigned to your VPN).
  3. Change the line password-flags=1 to password-flags=0
  4. Save and exit.
Bender72
Level 1
Level 1
Posts: 35
Joined: Mon Jul 18, 2016 8:22 pm

Re: wired does not connect on boot if vpn option enabled

Post by Bender72 »

This bug still exists. On my Mint 17.3 Cinnamon with Kernel 4.13.0-32, the password-flags=0 workaround does not fix it.

I use auto-login (the system is a HTPC on which entering a login password would be impractical.)

edit: strangely, after another reboot (and no additional changes made), it's now working.
heinhuiz
Level 1
Level 1
Posts: 18
Joined: Thu Apr 27, 2017 7:25 am

Re: wired does not connect on boot if vpn option enabled

Post by heinhuiz »

Linux Mint 20 now and still no fix.

I can confirm that you have to reboot twice before the password-flags=0 method works.
GeorgeP_A
Level 1
Level 1
Posts: 1
Joined: Fri Sep 18, 2020 5:10 am

Re: wired does not connect on boot if vpn option enabled

Post by GeorgeP_A »

It would be as though you were legitimately associated with the organization at work, however the real organization association would be through the inn's web association.
Locked

Return to “Networking”