Can not create TUN interface?
I run debian wheezy on my galaxy s2 and like to run software that uses a TAP/TUN network interface. I can not get the system to create it... On the android side I checked with the 'Tun.ko installer' app and it says 'Tun module is loaded - Your kernel has TUN driver loaded natively' so that looks ok. I think on the linux side the module also needs to load?
This guy seems to do something like it with Debian Kit for Android but I still don't understand: (use ctrl+f to find the word 'tun') http://sven-ola.dyndns.org/repo/debian-kit-en.html
I would really like to use it with linuxdeploy! Hope you can help me out!
Best regards,
Mike.
You need build and install tun kernel module for your kernel.
For what it's worth, on my Nexus 5, tun is located at /dev/net/tun instead of /dev/tun. Creating a symlink
ln -s /dev/net/tun /dev/tun
got openvpn working for me. Other software probably expects to find tun at /dev/tun as well.
If someone ever runs through this problem, I had the same issue while running on Cyanogen Mod 12.1 and actually OpenVPN expected tun to be in /dev/net/tun so I had to do
mkdir /dev/net
ln -s /dev/tun /dev/net/tun
Hope it helps
Thanks @g-goessel , vpn works, connected and tun0 with ip. The problem is I cant ping to vpn network. It claims that the packet is filtered. Anyone knows the iptables rules to add? I´ve tried a few with no luck.
Thanks in advance!
the problem is with tun interface, not with firewall. Something wrong. My issue is described detailed here: https://github.com/meefik/linuxdeploy/issues/1130
ip rule add from all lookup main pref 1
Actually, if "/dev/net/tun" has already existed, you should authorize to it.
chmod 0666 /dev/net/tun
Then, you should stop and start the service which needs to use TUN/TAP.
https://docs.kernel.org/networking/tuntap.html