# OpenVPN TUN error, but TUN is compiled into kernel [SOLVED]

## tsftd

So I'm trying to set up an OpenVPN server, and am following the tutorial here: http://en.gentoo-wiki.com/wiki/OpenVPN

I have compiled my kernel with TUN/TAP support, but have removed the module option -- so I compiled it directly into the kernel:

```
Device Drivers --->

   Network device support --->

[*]Network device support

<*>   Universal TUN/TAP device driver support
```

Yet, when I try to start OpenVPN, I get the following error:

```
linux # /etc/init.d/openvpn start

 * Starting openvpn ...

FATAL: Module tun not found.

 * TUN/TAP support is not available in this kernel

 * ERROR: openvpn failed to start
```

I have googled extensively, but unfortunately hits about people getting that error who *haven't* compiled TUN/TAP support flood out anyone who may have had the same issue as me.  Does anyone know what could cause this?  Or how I can confirm that TUN/TAP support is actually being built into the kernel/available? (I have double checked both menuconfig and the .config file, and it IS enabled)

for troubleshooting purposes, I have heavily modified the .config and have disabled everything that is non-essential (given that this is a production server), but I have no other issues on this system.  It's possible that I have disabled something else that is required for TUN/TAP (despite not being listed under menuconfig), so here is my full config in pastebin: http://pastebin.com/24UL7Pj5

thanks for the help!Last edited by tsftd on Thu Oct 11, 2012 10:10 am; edited 1 time in total

----------

## b0nafide

Try 

```
# dmesg | grep TUN

# ls -l /dev/net/tun
```

----------

## tsftd

dmesg | grep TUN -> returns nothing

ls -l /dev/net/tun -> no such file or directory (in fact, there isn't even a /dev/net/ directory)

i'm particularly worried that something in

```
networking support-->

      networking options-->

            TCP/IP networking
```

is a hidden dependency, maybe something under advanced routing?

EDIT:

also, here is a pastebin of the actual kernel compilation.  not sure if it's helpful, but http://pastebin.com/yLaqmF8GLast edited by tsftd on Thu Oct 11, 2012 1:46 am; edited 1 time in total

----------

## Hu

You are not using devtmpfs, so your device manager will need to create the net/tun node.

----------

## tsftd

that is absolutely correct, compiling that (and automount) into the kernel fixed the issue.  thanks a bunch!

----------

