[drivers] cifs and tun

Search This thread

Ectoplasmic

Senior Member
Dec 4, 2011
210
43
Thanks! I have this working partially. So far I can mount my remote share from ADB. Still trying to get CifsManager to work. I'll post my notes when I have it all figured out.
 

SwingBlade

Senior Member
Aug 14, 2008
64
6
How fortunate that this comes up the day I'm looking into OpenVPN for my KF! Could I get a little assistance in setting this up? Would I need to install these drivers before OpenVPN and, if so, how?
 

riverzhou

Senior Member
Dec 2, 2006
203
83
Shanghai
How fortunate that this comes up the day I'm looking into OpenVPN for my KF! Could I get a little assistance in setting this up? Would I need to install these drivers before OpenVPN and, if so, how?

I do not use OpenVpn. I have tested the driver by a tool written myself, the tun.ko work fine.
I think you can find a guild about OpenVpn on Android from google.

A difference between android and linux is , the devices file is /dev/tun in Androind and is /dev/net/tun in Linux.
 
Last edited:

alchemyst

Senior Member
Nov 9, 2008
67
6
Couldnt get OpenVPN working either, but dont know if its because of the tun.ko

It just goes from auth to 'get config' and doesnt connect. I cant get logcat working on my device for some reason to check the logs.

Tell a lie, gotthe logs, telling me EXITING, auth-failure

Definitely right user/pass
 
Last edited:

riverzhou

Senior Member
Dec 2, 2006
203
83
Shanghai
Couldnt get OpenVPN working either, but dont know if its because of the tun.ko

It just goes from auth to 'get config' and doesnt connect. I cant get logcat working on my device for some reason to check the logs.

Tell a lie, gotthe logs, telling me EXITING, auth-failure

Definitely right user/pass

/data/local/tmp # insmod tun.ko

/data/local/tmp # dmesg |tail -n5
[13042.453582] TIWLAN: 3276.841719: connInfra , CONSOLE:****************************************
[13042.464141] TIWLAN: 3276.852248: ****************************************
[13053.277160] tiwlan0: no IPv6 routers present
[13083.014495] tun: Universal TUN/TAP device driver, 1.6
[13083.019775] tun: (C) 1999-2004 Max Krasnyansky <maxk@qualcomm.com>

/data/local/tmp # ls /dev/tun -l
crw-r----- 1 1016 1016 10, 200 Dec 18 06:16 /dev/tun

/data/local/tmp # ./testtun
tun_name is icevpn. tun_fd is: 3

tun_setip interface icevpn ip 192.168.0.2 netmask 255.255.255.0 MTU 1460 TXQ 1000

TUN_FD 3

tun_read , len is 84

tun_read , len is 84

tun_read , len is 84

tun_read , len is 84

tun_read , len is 84

tun_read , len is 84


After testtun start,in another ssh console:

/data # ifconfig
icevpn Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
inet addr:192.168.0.2 P-t-P:192.168.0.2 Mask:255.255.255.0
UP POINTOPOINT RUNNING MTU:1460 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:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:13002 errors:0 dropped:0 overruns:0 frame:0
TX packets:13002 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:3484632 (3.3 MiB) TX bytes:3484632 (3.3 MiB)

tiwlan0 Link encap:Ethernet HWaddr F0:A2:25:D8:DA:48
inet addr:192.168.1.108 Bcast:192.168.1.255 Mask:255.255.255.0
inet6 addr: fe80::f2a2:25ff:fed8:da48/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:28903 errors:0 dropped:0 overruns:0 frame:0
TX packets:27964 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:100
RX bytes:8814147 (8.4 MiB) TX bytes:1956943 (1.8 MiB)

/data # ping 192.168.0.1
PING 192.168.0.1 (192.168.0.1): 56 data bytes
^C
--- 192.168.0.1 ping statistics ---
8 packets transmitted, 0 packets received, 100% packet loss


/data # ifconfig
icevpn Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
inet addr:192.168.0.2 P-t-P:192.168.0.2 Mask:255.255.255.0
UP POINTOPOINT RUNNING MTU:1460 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:8 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:672 (672.0 B)

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:13002 errors:0 dropped:0 overruns:0 frame:0
TX packets:13002 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:3484632 (3.3 MiB) TX bytes:3484632 (3.3 MiB)

tiwlan0 Link encap:Ethernet HWaddr F0:A2:25:D8:DA:48
inet addr:192.168.1.108 Bcast:192.168.1.255 Mask:255.255.255.0
inet6 addr: fe80::f2a2:25ff:fed8:da48/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:29136 errors:0 dropped:0 overruns:0 frame:0
TX packets:28105 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:100
RX bytes:8859490 (8.4 MiB) TX bytes:1996726 (1.9 MiB)



So, I think it's the problem of OpenVpn setting.
 

Attachments

  • testtun.zip
    6.2 KB · Views: 44
Last edited:

uzi74

Member
Dec 15, 2009
36
1
I've insmodded tun.ko on my rooted file, but had no luck with the openvpn apps from the market. Could please someone point me to a working one (openvpn or pptp)? Do I need to have busybox installed? (I just have my device rooted)
 

ttabbal

Senior Member
Jul 1, 2009
2,076
723
Samsung Galaxy S21 Ultra
I've insmodded tun.ko on my rooted file, but had no luck with the openvpn apps from the market. Could please someone point me to a working one (openvpn or pptp)? Do I need to have busybox installed? (I just have my device rooted)

You do need busybox. I'm on the CM7 rom as well, which includes both busybox and the openvpn binary. I then use the OpenVPN Settings app from the market to connect to the VPN. Make sure you go into advanced settings and set the path to the tun.ko module and tell it to load it. Or manually load it some other way. The config files I set up a long time ago just using adb shell on my phone and copied them and the keys to the fire's SD card. The tun.ko came from this thread.
 

Top Liked Posts