# can't get vtun working - device or resource busy

## feldespato

Hi, I'm trying to set up a vtun tunnel in 127.0.0.1. When I execute "/etc/init.d/vtun start" I get no errors but /var/log/messages says this:

```

Jan  5 23:36:33 hab-juguetes vtund[7911]: VTUN server ver 2.6 01/05/2006 (stand)

Jan  5 23:36:33 hab-juguetes vtund[7915]: VTun client ver 2.6 01/05/2006 started

Jan  5 23:36:33 hab-juguetes vtund[7915]: Connecting to 127.0.0.1

Jan  5 23:36:33 hab-juguetes vtund[7916]: Session tunel[127.0.0.1:32776] opened

Jan  5 23:36:33 hab-juguetes vtund[7915]: Session tunel[127.0.0.1] opened

Jan  5 23:36:33 hab-juguetes vtund[7915]: Can't allocate tap device tap1. Device or resource busy(16)

Jan  5 23:36:33 hab-juguetes vtund[7915]: Session tunel[127.0.0.1] closed

Jan  5 23:36:33 hab-juguetes vtund[7916]: Connection reset by peer (104)

Jan  5 23:36:33 hab-juguetes vtund[7915]: Exit

Jan  5 23:36:33 hab-juguetes vtund[7916]: Session tunel closed

```

It does not complain about tap0, which seems to be allocated fine.

I have the "tun" module loaded into the kernel. My /etc/vtund.conf is:

```

options {

  port 5000;      # Listen on this port.

  ppp       /usr/sbin/pppd;            

  ifconfig    /sbin/ifconfig;

  route    /sbin/route;

}

# Default session options 

default {

  compress no;     # Compression is off by default

  speed 0;      # By default maximum speed, NO shaping

}

# Ethernet example. Session 'lion'.

tunel {

 passwd   lion;   # Password

  type  ether;       # Ethernet tunnel

  device tap0;       # Device tap0 

  proto udp;         # UDP protocol

  compress  lzo:1;   # LZO compression level 1 

  encrypt  no;      # Encryption

  stat  no;         # Log connection statistic 

  keepalive yes;   # Keep connection alive

 up {   

   ifconfig "%% 10.1.0.2 netmask 255.255.255.0";

    route "add -net 10.2.0.0 netmask 255.255.255.0 gw 10.1.0.2";

  };

 down {

   ifconfig "%% down"; 

  };

}

#

# ----- CUT HERE  -------- End -------- CUT HERE -----

#

#

# ----- CUT HERE  --- Client config --- CUT HERE -----

#

options {

  port 5000;      # Connect to this port.

  timeout 60;      # General timeout

#  # Path to various programs

 ppp      /usr/sbin/pppd;            

 ifconfig   /sbin/ifconfig;

 route      /sbin/route;

# firewall   /sbin/ipchains;

# ip      /sbin/ip;

}

# Ethernet example. Session 'lion'. 

tunel {

passwd  lion;   # Password

type  ether;      # Ethernet tunnel

  device tap1;       # Device tap1 

  up {

   # Assign IP address and netmask. 

   ifconfig "%% 10.1.0.4 netmask 255.255.255.0";

  };

  down {

   ifconfig "%% down";

  };

}

```

and /etc/vtund-start.conf is

```

--server-- 5000

tunel 127.0.0.1

```

Any help will be appreciated.

----------

## magic919

Aside from setting up a route to a non-existant network on the server this looks ok.  Have you tested just starting the client part.  Clearly it must fail to connect but can it create the TAP?

----------

