tun interface not working in ubuntu14.4?

2

I have problem making the tun interface on Ubuntu 14.04 work correctly. The commands

lsmod | grep tun

and

sudo modprobe tun 

return nothing. Even the module, tun.ko.gz in /lib/modules/ and elsewhere can not be found. Yet I have created a tun interface with the following command BUT THE INTERFACE IS NOT OPERATIONAL (i.e. RUNNING) even using the "sudo ip link set dev tun2 up" command.

openvpn --mktun --dev tun2

the interface shows up in ifconfig

tun2      Link encap:UNSPEC  HWaddr   00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00  
  inet addr:10.0.0.1  P-t-P:10.0.0.1  Mask:255.255.255.0
  UP POINTOPOINT NOARP MULTICAST  MTU:1500  Metric:1
  RX packets:0 errors:0 dropped:0 overruns:0 frame:0
  TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
  collisions:0 txqueuelen:100 
  RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

HOW CAN I FORCE THE TUN INTERFACE TO RUNNING STATE? DOES MY SYSTEM SOPPERT THE TUN MODULE? Why doesn't it show up in the lsmod cmd?

ae41

Posted 2015-04-23T10:26:03.327

Reputation: 21

Did you fix this problem? I'm having it right now. – Ashkay – 2015-06-30T20:10:23.437

look my answer below – ae41 – 2015-07-01T11:29:14.597

Answers

0

The problem is easily solved. As soon as I attached a process to the interface it becomes running. By attaching a process I mean running the "software" e.g. simpletun.c in the following link. http://backreference.org/2010/03/26/tuntap-interface-tutorial/ After running the code above, the interface changed its status to running and data sent over it would show up in tcpdump. Hope this answer would help others.

ae41

Posted 2015-04-23T10:26:03.327

Reputation: 21