Jump to content

OpenVPN on Paul's Froyo Custom ROM


Guest yazooo

Recommended Posts

Guest fatwolf
Here is update.

I create package but main content is from linxtx ()

No busybox is needed, openvpn binary use "ip" command.

Copy to sdcard and with ROM Manager Flash ROM from sdcard.

Package contain /system/lib/modules/tun.ko, /system/xbin/openvpn and /system/xbin/openvpn-iproute-wrapper.sh

With iproute wrapper is all routes added/deleted to/from vpn table.

Tested with Android OpenVPN settings on PAUL stock desire froyo ROM without bootloader. It working with no compromise!

NOTE: you need to add to .ovpn config files next line to use iproute wrapper:

iproute /system/xbin/openvpn-iproute-wrapper.sh

Tried to apply this and its refusing to load tun.ko

# insmod tun.ko

insmod: can't insert 'tun.ko': invalid module format

I have also tried various other versions in this thread and now that's all i am getting.

what does invalid module format even mean?

Sometimes linux errors just suck.

Ok from research it seems that that's the sign the module was built for the wrong kernel.

Is there a version of tun.ko built against the current rooted kernel?

Linux localhost 2.6.32.15-gf9c0527 #1 PREEMPT Fri Jul 23 17:26:53 CST 2010 armv7l GNU/Linux

Edited by fatwolf
Link to comment
Share on other sites

Tried to apply this and its refusing to load tun.ko

# insmod tun.ko

insmod: can't insert 'tun.ko': invalid module format

I have also tried various other versions in this thread and now that's all i am getting.

what does invalid module format even mean?

Sometimes linux errors just suck.

Ok from research it seems that that's the sign the module was built for the wrong kernel.

Is there a version of tun.ko built against the current rooted kernel?

Linux localhost 2.6.32.15-gf9c0527 #1 PREEMPT Fri Jul 23 17:26:53 CST 2010 armv7l GNU/Linux

I'm very sorry, you are right. I upload package with another version of tun.ko. :D

Now I fix it in my previous post.

Again, sorry.

You need to overwrite your tun.ko with one from current package in recovery mode.

Link to comment
Share on other sites

Guest fatwolf
I'm very sorry, you are right. I upload package with another version of tun.ko. :D

Now I fix it in my previous post.

Again, sorry.

You need to overwrite your tun.ko with one from current package in recovery mode.

I will give it a try and let you know.

Link to comment
Share on other sites

Guest fatwolf
I will give it a try and let you know.

All worked well.

Because of the new rule based routing i had to make a convoluted routing up script.

Checks which network i am on and if its not my home one applies the route to home via the vpn.

Before i just had a 1 line up script that set home as a metric of 10 so if i was home the lan metric of 1 would be priority

If i was out then the metric 10 route to home over the vpn kicked in.

same route did not matter where i was connected from. Now its alittle harder and the route command needs to be given a table and such but hey it works so im happy.

Link to comment
Share on other sites

Guest yeoman999
I'm very sorry, you are right. I upload package with another version of tun.ko. :D

Now I fix it in my previous post.

Again, sorry.

You need to overwrite your tun.ko with one from current package in recovery mode.

you are the king.

i searched for a solution since 4 weeks.

thanks a lot.

alex

Link to comment
Share on other sites

Guest muhabla

i flashed the zip, and everything looked like working perfect...

openvpn settings shows me that i'm connectet to the server, but if i check my ip i have my "normal" ip.

can anybody tell me what's the problem and how i could fix it?

Edited by muhabla
Link to comment
Share on other sites

Guest muhabla

nobody could help me?

what could be the reason that my traffic don't go over the vpn connection?

i think the connection is succesfully established, because openvpn settings show to me that i'm connected with the server...

So, how i could route the traffic over the vpn connection?

Link to comment
Share on other sites

nobody could help me?

what could be the reason that my traffic don't go over the vpn connection?

i think the connection is succesfully established, because openvpn settings show to me that i'm connected with the server...

So, how i could route the traffic over the vpn connection?

If you don't use iproute wrapper it don't work!

NOTE: you need to add to .ovpn config files next line to use iproute wrapper:

iproute /system/xbin/openvpn-iproute-wrapper.sh

Link to comment
Share on other sites

Guest muhabla
If you don't use iproute wrapper it don't work!

NOTE: you need to add to .ovpn config files next line to use iproute wrapper:

iproute /system/xbin/openvpn-iproute-wrapper.sh

thanks for your help!

But i doesn't work... I add the iproute line to my openvpn config file (at the last line)... then i start openvpn settings and connect to the server, everything seems to be working...

then i open the browser and test it, but now i can't open any website... nothing happens - couldn't open any website.

at 2.1 everything works fine... hate it :huh:

Link to comment
Share on other sites

thanks for your help!

But i doesn't work... I add the iproute line to my openvpn config file (at the last line)... then i start openvpn settings and connect to the server, everything seems to be working...

then i open the browser and test it, but now i can't open any website... nothing happens - couldn't open any website.

at 2.1 everything works fine... hate it :huh:

Ok, in your .ovpn config file you have:

dev tun

or

dev tap ?

If tun, when your openvpn is connected, run in shell (adb shell on in android terminal):

lsmod

ifconfig

ip rule show

ip route show table vpn

ip route show table main

and if you connected over wifi:

ip route show table wifi

or if you connected over "gprs"

ip route show table gprs

Link to comment
Share on other sites

Guest muhabla
Ok, in your .ovpn config file you have:

dev tun

or

dev tap ?

If tun, when your openvpn is connected, run in shell (adb shell on in android terminal):

lsmod

ifconfig

ip rule show

ip route show table vpn

ip route show table main

and if you connected over wifi:

ip route show table wifi

or if you connected over "gprs"

ip route show table gprs

in my openvpn config file i have:

dev tun

and this are the outputs from the shell (with running openvpn):

# lsmod

lsmod

tun 10734 2 - Live 0xbf039000

perflock_disable 752 0 - Live 0xbf000000

# ifconfig

ifconfig

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:854 errors:0 dropped:0 overruns:0 frame:0

TX packets:854 errors:0 dropped:0 overruns:0 carrier:0

collisions:0 txqueuelen:0

RX bytes:132079 (128.9 KiB) TX bytes:132079 (128.9 KiB)

rmnet0 Link encap:Ethernet HWaddr 4E:57:82:76:EF:B1

inet addr:77.118.197.126 Bcast:77.118.197.127 Mask:255.255.255.252

inet6 addr: fe80::4c57:82ff:fe76:efb1/64 Scope:Link

UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1

RX packets:5096 errors:0 dropped:0 overruns:0 frame:0

TX packets:3604 errors:0 dropped:0 overruns:0 carrier:0

collisions:0 txqueuelen:1000

RX bytes:5452158 (5.1 MiB) TX bytes:648449 (633.2 KiB)

tun0 Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00

-00

inet addr:10.0.111.50 P-t-P:10.0.111.49 Mask:255.255.255.255

UP POINTOPOINT RUNNING 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 :huh: TX bytes:0 (0.0 ;)

# ip rule show

ip rule show

0: from all lookup local

3000: from all lookup vpn

3001: from all lookup wifi

3002: from all lookup gprs

32766: from all lookup main

32767: from all lookup default

# ip route show table vpn

ip route show table vpn

10.0.111.1 via 10.0.111.49 dev tun0

95.211.99.92 via 77.118.197.125 dev rmnet0

0.0.0.0/1 via 10.0.111.49 dev tun0

128.0.0.0/1 via 10.0.111.49 dev tun0

# ip route show table main

ip route show table main

10.0.111.49 dev tun0 proto kernel scope link src 10.0.111.50

77.118.197.124/30 dev rmnet0 proto kernel scope link src 77.118.197.126

default via 77.118.197.125 dev rmnet0

Edited by muhabla
Link to comment
Share on other sites

Guest muhabla

@luboz (or anybody else)

can you help me?

don't understand the output...

i would use openvpn for "PerfectPrivacy" to surf anonymous, but when i open the browser and check my ip it is not a PerfectPrivacy ip...

so what is the problem

for me it looks like openvpn is running, but why the traffic dont run over the vpn connection?

Link to comment
Share on other sites

Guest HTC Desire Owner
then i open the browser and test it, but now i can't open any website... nothing happens - couldn't open any website.

when i open the browser and check my ip it is not a PerfectPrivacy ip...

Sorry, which one is the issue? Nothing happens (connection timeout) or the traffic is not being redirected? Just to make sure the routing is set up correctly, you can run "ping -c 4 10.0.111.49" (or any host on the vpn server's subnet).

Link to comment
Share on other sites

Guest muhabla
Sorry, which one is the issue? Nothing happens (connection timeout) or the traffic is not being redirected? Just to make sure the routing is set up correctly, you can run "ping -c 4 10.0.111.49" (or any host on the vpn server's subnet).

Sorry couldn't check it, because now openvpn setting everytime crashes...

i think i will cook a new rom... have seen in the changelog that at the 18. Aug. Paul have updated the iptables and tun.ko...

maybe it will run without changing anything, but if not i will tell it here :huh:

thanks for the help!

Link to comment
Share on other sites

Sorry couldn't check it, because now openvpn setting everytime crashes...

i think i will cook a new rom... have seen in the changelog that at the 18. Aug. Paul have updated the iptables and tun.ko...

maybe it will run without changing anything, but if not i will tell it here :huh:

thanks for the help!

try to uninstall openvpn settings and install it again, or delete its data. I have same problem with crashing openvpn settings.

tun.ko you have loaded, no need to update it.

You want to redirect all trafic to openvpn tunel. This is diferent from my config and probably there is problem. Have a look to routing tables...

Edited by luboz
Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.