Active Topics

 


Reply
Thread Tools
Posts: 372 | Thanked: 9 times | Joined on Mar 2007
#41
An update...

I replaced the ip-up with the following

#!/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?
 
Posts: 46 | Thanked: 15 times | Joined on Feb 2007
#42
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"
 
Posts: 372 | Thanked: 9 times | Joined on Mar 2007
#43
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
 
Posts: 46 | Thanked: 15 times | Joined on Feb 2007
#44
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.



Originally Posted by luketoh View Post
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
 
Posts: 372 | Thanked: 9 times | Joined on Mar 2007
#45
Hi,

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

Luke
 
Posts: 53 | Thanked: 9 times | Joined on Nov 2005
#46
hey guys,

here is my functional configuration:


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

Last edited by loki; 2007-04-22 at 13:56.
 
Posts: 46 | Thanked: 15 times | Joined on Feb 2007
#47
http://uits.iu.edu/scripts/ose.cgi?akct.def.help

Originally Posted by luketoh View Post
Hi,

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

Luke
 
Posts: 48 | Thanked: 2 times | Joined on Jan 2007
#48
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!
 
Posts: 372 | Thanked: 9 times | Joined on Mar 2007
#49
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

Last edited by luketoh; 2007-04-24 at 19:21.
 
Posts: 372 | Thanked: 9 times | Joined on Mar 2007
#50
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
 
Reply


 
Forum Jump


All times are GMT. The time now is 10:52.