I am trying to capture packets on a tun interface with libpcap. I am creating the interface with:
openvpn --mktun --dev tun0
When the adapter is setup it appears as so when I run ifconfig:
tun0 Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
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)
The adapter needs to be running in order for libpcap to detect the packets:
POINTOPOINT NOARP RUNNING MULTICAST MTU:1500 Metric:1
Is there any way to force the tun interface to be running so I can capture packets on it?