![]() |
VPN connection & gateway problem
Hi,
I'm using vpnc (a client for Cisco/VPN routers) through a WiFi connection at my job (N800+OS2008) . The problem: in order to work VPNC needs to replace the default gateway (wlan0 interface) by its own gateway (tun0 interface), but it seems that the tablet's connection manager automatically restore the wlan0 gateway if I delete it. Reproducing the bug into a "normal" wifi session: 1: make a wifi connection 2: open a web browser an make sure internet access is ok. 3: open xterm and type (as root) : "route del default" this command removes the gateway (type "route" to check it) . 4: now retry internet surfing and check that internet is no more reachable. 5: try to access to some web sites during 1-2 minutes and suddenly: it works again! 6: finally return to xterm and type "route" : the gateway has been restored ! So how to say to the tablet: "please DO NOT touch the gateway!" :-E Any ideas ? Thanks a lot! -- Fab |
Re: VPN connection & gateway problem
Hm, I also use vpnc and after vpnc connected, it sets the routing table as follows. I don't have to set up any routing by hand.
Code:
Kernel IP routing table |
Re: VPN connection & gateway problem
Yes, this is exactly what i have at the first vpnc connection (tun0 first, then wlan0 gateway). It works effectively, but after some time (1 to 5 min), the web browser tell me "unable to connect to server XXX". Then I look at the route and I see the two gateways have been reversed! (wlan0 FIRST then tun0) :confused:
The first time I've encountered this problem I thought these two gateways were the problem, an this is the reason why I've tried to manually remove the extra "wlan0" . Strange, isn't it ? |
Re: VPN connection & gateway problem
@tvogel:
There should be only one default route, because that's where any destination not matching the 172.187.0.0 net is going. So, the second default route should really be deleted. The reason it works for you is probably, as you say, that the "correct" default route happens to be the first one listed. |
Re: VPN connection & gateway problem
Anyway, I just checked and also after 10 min. the routing table is still the same and pings go through. No idea...
|
Re: VPN connection & gateway problem
Thanks for trying !
But I agree with TA-t3 . There should be only one default route. I've tried to trace vpnc's output from xterm by running this command (as root): vpnc --no-detach --debug 2 <my_config_file> the connection appens but it prints: "route: SIOC[ADD|DEL]RT: no such device" . Have you ever seen this message ? |
Re: VPN connection & gateway problem
Yes, and I found the cause:
Look at line 156f of /etc/vpnc/vpnc-script which looks like Code:
route $route_syntax_del default "$DEFAULTGW" Code:
route $route_syntax_del default $route_syntax_gw "$DEFAULTGW" BTW, I checked again and my N810 doesn't fiddle around with the default route. So, mcfab, could it be that your WLAN connection is not stable? If your tablet re-establishes the link it will redo DHCP and reset the default gw... Tilman |
Re: VPN connection & gateway problem
Thank you Tilman!
Now gateways are correctly set, and a bug has been erased from Earth :) Your suggestion to look around DHCP is very interesting and I will investigate into this way. |
Re: VPN connection & gateway problem
Good news! :D
I've got the answer from the vpnc maemo-port's maintainer : Quote:
Many thanks to you Fabrice |
Re: VPN connection & gateway problem
Good info from mcfab and tvogel here, thanks button engaged. Now, if those tidbits could be put into the wiki somehow.. it could be useful for others.
|
Re: VPN connection & gateway problem
I sent the vpnc maemo maintainer an email about this. He'll include the fix into the package when he comes around to do it.
|
Re: VPN connection & gateway problem
I realize this thread is quite old at this point, but I just got my N800 and I'm having a blast with it. Only problem is my campus wireless service requires either VPN access to be able to use the wireless, or 802.1x GTC-PEAP with dynamic WEP, the WEP bit the N800 does not support and I read there is no plan to support it. So that leaves VPN as the only option. I've been struggling with the same problem outlined here, as I just found out. I can connect just fine and browse the internet, but after 5-10 minutes, I can't connect any longer. The VPN connecting remained up, but network connectivity is dead. According to this post, the problem has to do with the routing table. After reading this thread, I checked my routing tables before establishing the vpn, while the vpn is up and internet connectivity is good, and after connectivity drops. I can confirm that the routing table gets changed. So I edited the vpnc-script file according to the thread and the problem persists.
I am using the latest vpnc on diablo. I can provide routing tables if requested. My question is if this problem was known, why has it not been addressed yet? Am I the only one having this problem? It actually looks like vpnc-script has changed since this thread was posted. The route deletion line is not located at the cited line number as well as the actual contents being slightly different (missing the "DEFAULTGW" after route delete bit) If this is not a problem in older versions of vpnc (I have 0.5.1 installed), where can I download one? I really need functional vpn connectivity. Thank you, --MrAnt-- --edit-- I am able to reestablish connectivity by executing route del default after the other default route is recreated. Any way to auto-delete it? or prevent the auto recreation? |
All times are GMT. The time now is 10:55. |
vBulletin® Version 3.8.8