wired does not connect on boot if vpn option enabled

Questions about cabled networking
Forum rules
Before you post please read how to get help
HiRsch
Level 1
Level 1
Posts: 2
Joined: Sun Oct 12, 2014 4:41 am

wired does not connect on boot if vpn option enabled

Postby HiRsch » Sun Oct 12, 2014 4:54 am

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

HiRsch
Level 1
Level 1
Posts: 2
Joined: Sun Oct 12, 2014 4:41 am

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

Postby HiRsch » Sun Oct 12, 2014 8:41 am

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
Level 1
Level 1
Posts: 29
Joined: Sat Jan 17, 2015 5:34 pm

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

Postby leetwanker » Sun Sep 18, 2016 4:27 pm

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: 9
Joined: Thu Apr 27, 2017 7:25 am

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

Postby heinhuiz » Fri Jul 28, 2017 7:50 am

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: 9
Joined: Thu Apr 27, 2017 7:25 am

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

Postby heinhuiz » Mon Sep 04, 2017 8:05 pm

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.


Return to “Ethernet”

Who is online

Users browsing this forum: No registered users and 1 guest