Welcome, Guest. Please login or register.
Did you miss your activation email?

Author Topic:  open vpn cannot create tun  (Read 2419 times)

louispolaire

  • Guest
open vpn cannot create tun
« on: 2015/03/16, 22:06:22 »
Hi, since last upgrade, openvpn cannot create tun device.


The only way to get it started is to do :


Code: [Select]
mknod /dev/net/tun c 10 200
but that does not persist after reboot.

Is the issue coming from my system only or is it related to the upgrade of the kernel ?

Anyways, if you have ideas on how to fix that properly that would be great !

Offline musca

  • User
  • Posts: 725
  • sid, fly high!
Re: open vpn cannot create tun
« Reply #1 on: 2015/03/17, 14:22:53 »
hello louispolaire,

loading the modul tun is sufficient to create /dev/net/tun and unloading the modul will remove the devicenode.

But I see the point ... you don't want root actions.

You can load the tun module at boottime:  echo tun >> /etc/modules
(well, so it will run always, not only if needed, but ... meh.)

greetings
musca
« Last Edit: 2015/03/17, 14:29:18 by musca »
„Es irrt der Mensch, solang er strebt.“  (Goethe, Faust)

louispolaire

  • Guest
Re: open vpn cannot create tun
« Reply #2 on: 2015/03/17, 18:49:46 »
I'm not an expert but isn't Openvpn supposed to be allowed to create a tun device when it starts ?

then would it be a problem of permission for openvpn ?

What I don't understand is why this stopped working even though Openvpn has not been upgraded recently ...

Unfortunately I have the bad habit to do an apt-get autoremove after each upgrade, so I am not able to check if this problem is related to the recent upgrades by starting with an old version of the kernel.

Offline musca

  • User
  • Posts: 725
  • sid, fly high!
Re: open vpn cannot create tun
« Reply #3 on: 2015/03/17, 20:21:25 »
hello louispolaire,

the older kernel-images are still available in the repo, just get it back like this:
Code: [Select]
apt-get install linux-image-3.19-0.towo.2-siduction-amd64 linux-headers-3.19-0.towo.2-siduction-amd64
[hint: use tab-completion and let it guess the right name of the packages]

greetings
musca
„Es irrt der Mensch, solang er strebt.“  (Goethe, Faust)

Offline bad_aptitude

  • User
  • Posts: 78
Re: open vpn cannot create tun
« Reply #4 on: 2015/03/20, 05:58:36 »
I also have observed the same problem with my last dist-upgrade.
I went back to the previous kernel but the problem persists, so it seems to be related to a change outside of the kernel.

bad_

louispolaire

  • Guest
Re: open vpn cannot create tun
« Reply #5 on: 2015/03/20, 10:45:29 »
Yes I confirm also that using an older kernel or a newer one does not change anything.

As root I can create a tun device, would it be a problem of permission for openvpn ?
« Last Edit: 2015/03/20, 11:50:44 by louispolaire »

Offline musca

  • User
  • Posts: 725
  • sid, fly high!
Re: open vpn cannot create tun
« Reply #6 on: 2015/03/20, 13:35:18 »
which commands do you run as root, which results do you get?
which commands do you run as user, which results do you get?
Please paste exact messages.
# modprobe tun
# ls -l /dev/net/tun
crw-rw-rw- 1 root root 10, 200 Mär 20 13:36 /dev/net/tun

So the knode is created with a mode of 666 and every user can write to /dev/net/tun.
« Last Edit: 2015/03/20, 13:40:39 by musca »
„Es irrt der Mensch, solang er strebt.“  (Goethe, Faust)

Offline paxmark2

  • User
  • Posts: 85
Re: open vpn cannot create tun
« Reply #7 on: 2015/03/20, 23:00:32 »
I haven't had any problems.  I have seen via apt-listbugs that kmod 20 has problems and so I have held at kmod 18.3  Numerous bugs been put together over kmod  20 and udev <219 - some involving tun and ppp  780255 780256 780299, etc. - which all hinge on 780263.  These bugs started up about March 11th. 


If I read it right, the problem is confined to sysvinit systems, but I might be quite wrong about that.   It appears that today (March 20) they  are coming together about how to fix this to smooth the transition of jessie to stable and also for the next transition when jessie departs. 


Of course, your problem might not have anything to do with kmod. 



Not trying to hijack or anything, but since I started using openvpn less than 2 months ago, I initiate it in tty2 as rootj ust prior to going to gui via init 5 in tty1.  If I should not be doing that, I would appreciate a message.  Peace