Crouton: Openvpn startup problem

Created on 22 Sep 2013  路  12Comments  路  Source: dnschneid/crouton

I'm able to run an openvpn client from my Debian wheezy chroot, but starting it generally requires two or more attempts. When it fails, its log ends with:

Sat Sep 21 17:32:18 2013 TUN/TAP device tun0 opened
Sat Sep 21 17:32:18 2013 TUN/TAP TX queue length set to 100
Sat Sep 21 17:32:18 2013 do_ifconfig, tt->ipv6=0, tt->did_ifconfig_ipv6_setup=0
Sat Sep 21 17:32:18 2013 /sbin/ifconfig tun0 10.21.83.11 pointopoint 10.21.83.12 mtu 1500
SIOCSIFADDR: No such device
tun0: ERROR while getting interface flags: No such device
SIOCSIFDSTADDR: No such device
tun0: ERROR while getting interface flags: No such device
SIOCSIFMTU: No such device
Sat Sep 21 17:32:18 2013 Linux ifconfig failed: external program exited with error status: 1
Sat Sep 21 17:32:18 2013 Exiting

When successful:

Sat Sep 21 17:33:46 2013 TUN/TAP device tun0 opened
Sat Sep 21 17:33:46 2013 TUN/TAP TX queue length set to 100
Sat Sep 21 17:33:46 2013 do_ifconfig, tt->ipv6=0, tt->did_ifconfig_ipv6_setup=0
Sat Sep 21 17:33:46 2013 /sbin/ifconfig tun0 10.21.83.11 pointopoint 10.21.83.12 mtu 1500
Sat Sep 21 17:33:46 2013 /sbin/route add -net 10.21.83.31 netmask 255.255.255.255 gw 10.21.83.12
Sat Sep 21 17:33:46 2013 /sbin/route add -net 10.20.40.83 netmask 255.255.255.255 gw 10.21.83.12
Sat Sep 21 17:33:46 2013 GID set to nogroup
Sat Sep 21 17:33:46 2013 UID set to nobody
Sat Sep 21 17:33:46 2013 Initialization Sequence Completed

Once up it works fine. If killed, it will re-start on the first try. It looks like a problem creating and/or accessing the tun0 device. Suggestions?

question

Most helpful comment

Thankyou thankyou @pippo0312!

sudo stop shill
sudo start shill BLACKLISTED_DEVICES=tun0

did the trick for me!

All 12 comments

You'll have much better luck using OpenVPN inside Chromium OS itself.

I prefer to run Openvpn inside the chroot in order to keep everything compatible with my other systems. So I'm willing to put up with false starts.

But I just found a solution -- I think. Creating a persistent tunnel

openvpn --mktun --dev tun0

before starting openvpn hasn't failed yet. (Why didn't I try it sooner..?)

Oh snap! If that seems reliable, maybe update the wiki?

Maybe -- if it keeps working. I guess it would be a very short openvpn item under Tips & Tricks.

Having the same issue here... tried running openvpn either in Chrome OS or the chroot and both fail with the same message. Even tried the trick of creating the persistent tunnel upfront... all it does during execution is try to create a new tunnel instead of using the existing one. Any tips?

"all it does during execution is try to create a new tunnel instead of using the existing one". same here. any help?

I've been having the same problem. the openvpn --mktun --dev tun0 seems to work sometimes but honestly I'm not sure if it works at all because other times I try that I still get the same errors everyone else has been getting with the 'no such device' stuff. But what has been working for me recently is to power off my chromebook completely and then power back up and then run the openvpn commands again.

using the --mktun ends me at
resolvconf: Error: /run/resolvconf/interface either does not exist or is not a directory
off course I did try creating said directory, but that didn't get me any further. Using openvpn from ChromeOS, isn't all that straightforward neither, still wrestling with that part.

If you are getting the issue where OpenVPN tries to create another tunnel when using:

openvpn --mktun --dev tun0

Changing the OpenVPN config file from dev tun to dev tun0 should cause it to use the one you created.

I've personally been using the following because I had some issues rerunning OpenVPN but it might not be necessary.

openvpn --rmtun --dev tun0
openvpn --mktun --dev tun0
openvpn --config /path/to/config

Following Flamewires' suggestions has worked very well for me so far with an Ubuntu 14.04 chroot on a Toshiba Chromebook 2

In case of problem of stability of the tun0 interface, problem with DNS and in general problems starting the openvpn connection inside chromium, you can have a look here

Thankyou thankyou @pippo0312!

sudo stop shill
sudo start shill BLACKLISTED_DEVICES=tun0

did the trick for me!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

rossjrw picture rossjrw  路  5Comments

killshot13 picture killshot13  路  3Comments

anonymouseprogrammer picture anonymouseprogrammer  路  4Comments

jvschiavo picture jvschiavo  路  4Comments

jbaum98 picture jbaum98  路  4Comments