maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   OS2007 / Maemo 3 / Bora (https://talk.maemo.org/forumdisplay.php?f=23)
-   -   N800 VPN Client. Cash Reward? (https://talk.maemo.org/showthread.php?t=4755)

luketoh 2007-04-19 17:59

Re: N800 VPN Client. Cash Reward?
 
An update...

I replaced the ip-up with the following

Quote:

#!/bin/sh
PRIMARY=wlan0
SERVER=130.95.11.2
CONNECTION=$6
if [ "${CONNECTION}" = "" ]; then CONNECTION=${PPP_IPPARAM}; fi
TUNNEL=$1
if [ "${TUNNEL}" = "" ]; then TUNNEL=${PPP_IFACE}; fi
if [ "${CONNECTION}" = "tunnel" ] ; then
route add -host ${SERVER} dev ${PRIMARY}
route del default ${PRIMARY}
route add default dev ${TUNNEL}

fi
Is this correct? is PRIMARY supposed to be wlan0 or eth0 or something else? I changed it to wlan0 and SERVER to the IP of the VPN server. Anything else I'm missing?

genome4hire 2007-04-20 01:08

Re: N800 VPN Client. Cash Reward?
 
This is the script that I added to the /etc/ppp/ip-up.d/ directory.

Note: this will only work for the Indiana University VPN. It does work though, most of the time.

And for some strange reason, visiting 'http://www.metafilter.com' from the N800 over the VPN immediately starts generating VPN errors, and kicks me offline. I've not noticed it with any other website. However, I can get around that by using 'SSH -D' and proxying my web connections through another machine. The important thing, is that I now get packets.

Thank you so much.

#!/bin/sh
# pppd ip-up script for all-to-tunnel routing
# name of primary network interface (before tunnel)
GATEWAY=`route -n | grep "UG " | awk '{print $2}'`

# if we are being called as part of the tunnel shutdown
if [ "${GATEWAY}" == "192.168.1.1" ] ; then

echo "Connecting to VPN from non-IU network"

route add -host 156.56.245.6 gw $GATEWAY
route add -host 156.56.245.7 gw $GATEWAY

else

echo "Connecting to VPN from IU Wireless Network"

route add -host 156.56.245.16 gw $GATEWAY
route add -host 156.56.245.6 gw $GATEWAY
route add -host 156.56.245.7 gw $GATEWAY
route add -host 156.56.245.13 gw $GATEWAY

fi
sleep 5
route add default ppp0
echo "Finished Setting up Routes"

luketoh 2007-04-21 08:48

Re: N800 VPN Client. Cash Reward?
 
Hi,

For this last bit, can you explain what the IPs listed are? I mean, where did you get these from? I know its specific to your school, but I would like to find the equivalent from my school, so it would help if you can explain those IPs. Thanks!

route add -host 156.56.245.16 gw $GATEWAY
route add -host 156.56.245.6 gw $GATEWAY
route add -host 156.56.245.7 gw $GATEWAY
route add -host 156.56.245.13 gw $GATEWAY

genome4hire 2007-04-21 22:34

Re: N800 VPN Client. Cash Reward?
 
Sorry, I can't provide much help here.

My school has a "how to setup your VPN under linux page" which mentioned two different sets of routes that need to be setup, depending on if you're connecting from our wireless network or from home. I used their info.



Quote:

Originally Posted by luketoh (Post 45336)
Hi,

For this last bit, can you explain what the IPs listed are? I mean, where did you get these from? I know its specific to your school, but I would like to find the equivalent from my school, so it would help if you can explain those IPs. Thanks!

route add -host 156.56.245.16 gw $GATEWAY
route add -host 156.56.245.6 gw $GATEWAY
route add -host 156.56.245.7 gw $GATEWAY
route add -host 156.56.245.13 gw $GATEWAY


luketoh 2007-04-22 07:55

Re: N800 VPN Client. Cash Reward?
 
Hi,

Can you post the link to that webpage? I want to compare information to get some clues. :)

Luke

loki 2007-04-22 13:35

Re: N800 VPN Client. Cash Reward?
 
hey guys,

here is my functional configuration:
http://www.lancode.de/public/pptp.png

and these lines make it work after building up the tunnel:
Code:

route del -host 192.168.23.1
route add -host 132.252.57.235 gw 192.168.7.1 dev wlan0
route del default
route add default dev ppp0

note: i had to set the mtu value to 1416 in /etc/ppp/options! it caused immense problems no to set it . so, perhaps thats your problem too...
Code:

mtu 1416
here is a copy of my route output:
Code:

/home/user # route -n
Kernel IP routing table
Destination    Gateway        Genmask        Flags Metric Ref    Use Iface
132.252.57.235  192.168.7.1    255.255.255.255 UGH  0      0        0 wlan0
192.168.7.0    0.0.0.0        255.255.255.0  U    0      0        0 wlan0
0.0.0.0        0.0.0.0        0.0.0.0        U    0      0        0 ppp0


genome4hire 2007-04-22 21:38

Re: N800 VPN Client. Cash Reward?
 
http://uits.iu.edu/scripts/ose.cgi?akct.def.help

Quote:

Originally Posted by luketoh (Post 45417)
Hi,

Can you post the link to that webpage? I want to compare information to get some clues. :)

Luke


framerate 2007-04-24 16:07

Re: N800 VPN Client. Cash Reward?
 
awesome work guys!

I'm getting back in town today, and don't have access to a linux computer right now to do the flash, but I'm gonna install it. But it looks like you guys got it to work!

I did offer a small reward for this, so if it works, do I owe someone some money? I'm a man of my word...

If not, I think I'm gonna make a quick frontend for the VPN just to make it easier to launch and we can consider that my contribution to the project :)

Yay!

luketoh 2007-04-24 18:31

Re: N800 VPN Client. Cash Reward?
 
Hi Loki,

Thanks for your help! I think I'm ALMOST there....

I managed to get a stable connect now, esp that tip about the MTU 1416 helped alot.

I have another problem now. I managed to get the tunnel up, the routing etc. But..when I try to ping anything with URL, it doesn't work (eg. ping www.google.com doesn't work) but if I ping 209.85.135.103 it works. That means, I have no access to the DNS.

I noticed that when I did the pon, the debug has this line

Cannot detemine ethernet address for proxy ARP


I wonder if that has contributed to the inability to access the DNS? So I'm pretty close to the end....just need to have some way to resolve the URLs!

If the DNS were
Primary DNS: 130.95.128.2
Secondary DNS: 130.95.128.1

how do I go about adding them in linux? Do I simply add them to the resolv.conf file? Or is there a temporary add only when I need to use the VPN?


Luke

luketoh 2007-04-24 19:30

Re: N800 VPN Client. Cash Reward?
 
Ok, adding the 2 DNS to my resolv.conf makes everything work!

What if I want to connect to a different network? Would having them there interfere in any way?


Luke

luketoh 2007-04-24 19:33

Re: N800 VPN Client. Cash Reward?
 
Quote:

Originally Posted by genome4hire (Post 45131)
And for some strange reason, visiting 'http://www.metafilter.com' from the N800 over the VPN immediately starts generating VPN errors, and kicks me offline. I've not noticed it with any other website.

Hey, www.metafilter.com kicks me off the VPN too! Wierd eh?


BTW, the script you gave to be put into the /etc/ppp/ip-up.d directory, how do you enable that file to be executed? when I ran pon in debug mode, i noticed that it doesn't call the script, eventhough I named it the same as the pon filename.

eg. pon snap

so I made a script in the ip-up.d directory called snap and chmod a+x snap . But it doesn't get executed...how did you get yours working?


Luke

loki 2007-04-25 14:17

Re: N800 VPN Client. Cash Reward?
 
@luketoh:
i checked www.metafilter.com. runs fine on my device. i think it could be something specific with your pptp server.

the names of the scripts in /etc/ppp/ip-up.d/ are irrelevant. they just must be executable. i run
Code:

chmod +x filename
and everything runs fine. btw, the log doesn't show that the script has been run.

if you want to connect to different pptp server you must differentiate between them. eg:
Code:

CONNECTION=$6
if [ "${CONNECTION}" = "" ]; then CONNECTION=${PPP_IPPARAM}; fi

if [ "${CONNECTION}" = "uni1" ] ; then
        route del -host 192.168.23.1
        route add -host 132.252.57.235 gw 192.168.7.1 dev wlan0
        route del default
        route add default dev ppp0
fi

if [ "${CONNECTION}" = "uni2" ] ; then
        route del -host 192.168.19.1
        route add -host 34.3.43.112gw 192.168.45.1 dev wlan0
        route del default
        route add default dev ppp0
fi

@framerate:
thx for the nice words. feedback always feels good.
btw, there is a paypal donate link on my site :)

greetz

framerate 2007-04-25 14:38

Re: N800 VPN Client. Cash Reward?
 
I'm a bit confused on the total steps involved. Please fill me in:

- Install Patched Kernel
- Install pptp client
- edit config files Which files need to be setup?
- edit ip-up.d scripts? What is the right steps here?

What other steps are missing from the list? I'm gonna keep playing with it for now :)

luketoh 2007-04-27 01:19

Re: N800 VPN Client. Cash Reward?
 
Hi Framerate,

- Install Patched Kernel
- Install pptp client
- Ping
- Traceroute

from

http://maemo.lancode.de/

Follow here

http://pptpclient.sourceforge.net/ho...figure_by_hand

Configure by hand

Do it as root...

Note pts. 1, 3, 4 only (I think I skipped 2 cos the file was there and had those things already spread out in that file) and use this command to start instead

Code:

pon $TUNNEL debug dump logfd 2 nodetach
You should see something like this at the end

Code:

Cannot detemine ethernet address for proxy ARP
local IP address 130.95.91.181
remote IP address 192.168.0.144
Script /etc/ppp/ip-up started (pid 2897)
Script / etc/ppp/ip-up finished (pid 2897), status 0x0

If you're using the latest xterm, you can then open a new Tab (basically new xterm instance) and then use this as a guide for the routing

http://www.internettablettalk.com/fo...7&postcount=46

You should not need to play with the ip-up.d/ scripts yet...just get the basics working first.

Switching to the 1st tab on xterm where you ran the pon line should let you monitor whether the script is still running fine or it went down. Mine sometimes does that and I don't know why. But the mtu setting that Loki mentioned in his post helped.

Also, do install the ping and traceroute softwares found on Loki's site (where you got the kernals and pptp client). Those are useful.

If you find that you can traceroute or ping 209.85.135.103 (which is google I think) but you cannot do the same if you used the full URL (www.google.com) then that means you need to edit your resolv.conf file in /etc/resolv.conf and add in some nameservers that are on your VPN network to resolve the URL names.

Let us know how yours goes!


Luke

luketoh 2007-04-27 01:29

Re: N800 VPN Client. Cash Reward?
 
Oh yes, poff doesn't seem to work for me. So what I do is I use the network icon on the top of my N800 and disconnect from the network.

If you reconnect to the network again, then you will notice that the routing table is reset...that means, it would be as if you rebooted. This is a quick way to reset the network settings should you mess up and want to retry (without actually rebooting).


Luke

loki 2007-05-03 10:37

Re: N800 VPN Client. Cash Reward?
 
Hey luke,

thanks for the hint. there is a directory /etc/ppp/ip-down.d/ where u can place scripts which get executed after finishing the tunnel. same precedure as with ip-up.d/.

poff <name> doesn't work for me too, but simply
Code:

poff
works.

greetz,
loki

zestuart 2007-10-29 13:16

Re: N800 VPN Client. Cash Reward?
 
Sorry to come at this so late, but I can't get the PPTP kernel image (access denied when trying to download).

Any chance the access could be un-denied? :)

fanoush 2007-10-29 15:44

Re: N800 VPN Client. Cash Reward?
 
You can get similar kernel also from here http://fanoush.wz.cz/maemo/#pptp It may be a bit more complex for you since I prefer to have additional rarely used features compiled as kernel modules (not hardcoded directly to kernel). So you need also archive with kernel modules, extract it and use insmod command to insert them before using pptp.

zestuart 2007-10-29 15:51

Re: N800 VPN Client. Cash Reward?
 
Thanks for the quick reply, cracking! I'd just found your site and was bracing myself for on-device flashing, but sadly the tar files are exhibiting an unexpected EOF in archive on both my (Ubuntu) tablet PC and n800. Sad! I suppose I could always try my Windows computer... lol

Update: WinRAR opens and extracts the files fine. Weird. :confused:

fanoush 2007-10-29 16:19

Re: N800 VPN Client. Cash Reward?
 
Quote:

Originally Posted by zestuart (Post 88351)
but sadly the tar files are exhibiting an unexpected EOF in archive on both my (Ubuntu) tablet PC and n800. Sad! I suppose I could always try my Windows computer... lol

Update: WinRAR opens and extracts the files fine. Weird. :confused:

Which ones? Those with suffix .tar.gz or .tgz or both? Both are gzipped tars. can you try both 'tar ztvf' and also without 'z' on the 'broken' file? Maybe your browser silently decompresses gzip files? Just tried and both work fine for me with Firefox on XP and Ubuntu 6.10. Will try also on device but I think I already tried many times since it is easier to get them directly from web if one has freshly flashed firmware and no ssh server on device.

zestuart 2007-10-29 16:43

Re: N800 VPN Client. Cash Reward?
 
Actually I think it was the router; it's been playing up a bit today and my XP computer is connected through a different router. (Both my tablets are connected through one, and my XP through another.)

I just want to check the sequence of things if that's OK: :)
  1. Flash kernel with image
  2. insmod extra packages
  3. Have fun trying to configure PPTP.

PS will try the commands when I get home, let you know if it's any different.

fanoush 2007-10-29 16:48

Re: N800 VPN Client. Cash Reward?
 
Quote:

Originally Posted by zestuart (Post 88370)
  1. Flash kernel with image
  2. insmod extra packages
  3. Have fun trying to configure PPTP.

yes, point 2 must be done after every reboot so it is easiest to add insmod commands to you vpn setup script before using ppp or pptpclient or whatever.

zestuart 2007-10-30 14:35

Re: N800 VPN Client. Cash Reward?
 
Quote:

Originally Posted by fanoush (Post 88361)
Which ones? Those with suffix .tar.gz or .tgz or both? Both are gzipped tars. can you try both 'tar ztvf' and also without 'z' on the 'broken' file? Maybe your browser silently decompresses gzip files? Just tried and both work fine for me with Firefox on XP and Ubuntu 6.10. Will try also on device but I think I already tried many times since it is easier to get them directly from web if one has freshly flashed firmware and no ssh server on device.

Worked fine at home, on Ubuntu and tablet, just a problem with router at work.

Any suggestions for resolving a 'no auth possible' message during PPTP connection? (Using pptpclient.) I've tried all variations of the chaps-secret text as per http://pptpclient.sourceforge.net/ho...th_is_possible, but no joy.

reefdiver 2007-12-11 02:45

Re: N800 VPN Client. Cash Reward?
 
I see that Codebay is maintaing the stinghorn Linux L2TP/IPsec code as open source. Wish someone could talke Nokia into putting it into the next release of OS2008...

reefdiver 2007-12-11 02:58

Re: N800 VPN Client. Cash Reward?
 
Whoops - forgot codebay's address for the code:
http://www.codebay.fi/opensource.html


All times are GMT. The time now is 01:39.

vBulletin® Version 3.8.8