Re: Trouble setting VPN for specific IP via NetworkManager



On Sun, 2011-10-23 at 14:33 -0700, Mohan Sfo wrote:
> 
> Hello all,
> 
> 
> I apologize for asking such an elementary question on this list.
> Thanks for your help.  Two question below:
> 
> 
> 
> 1) I am playing with setting up VPN via NetworkManager. I am able to
> successfully setup VPN. Unfortunately, it is setting up *all* the
> routes to go via the VPN.  I want traffic for only a few address to go
> via VPN and everything else to use the existing routes on wlan0. How
> do I do it?

Unfortunately PPtP (which I assume is the VPN you're using here) doesn't
allow routes to be sent in the PPP negotiation, so you're stuck manually
specifying them for now.  Yes, some implementations use DHCP over the
PPP link to grab routes and other parameters, which is something NM-pptp
should eventually support, but doesn't yet do.

So you need to add the routes you explicitly want routed over the VPN in
the IPv4 Routes dialog in nm-connection-editor.  Then check the "only
use this connection for resources on its network" box, which is the
magic "don't claim the default route" box.

> 
> 
> 2) Where are the log files for VPN or pppd stuff in NetworkManager?
> How do I setup so that there is logging so that I can debug why I am
> having connectivity problems.

NM logs to syslog's daemon facility.  So depending on your distro,
that's either /var/log/messages or /var/log/daemon.log.

> 
> 
> After setting up VPN connection:
> #route -n
> Kernel IP routing table
> Destination     Gateway         Genmask         Flags Metric Ref
> Use Iface
> 10.116.78.13    0.0.0.0         255.255.255.255 UH    0      0
> 0 ppp0
> 226.22.44.56   192.168.2.1     255.255.255.255 UGH   0      0        0
> wlan0
> 226.22.44.56   192.168.2.1     255.255.255.255 UGH   0      0        0
> wlan0
> 192.168.2.0     0.0.0.0         255.255.255.0   U     2      0
> 0 wlan0
> 169.254.0.0     0.0.0.0         255.255.0.0     U     1000   0
> 0 wlan0
> 0.0.0.0         0.0.0.0         0.0.0.0         U     0      0
> 0 ppp0
> #
> 
> 
> 
> 
> 
> I deleted the default route below, and then added wlan0 as the new
> default route.  Regular stuff like google.com are working fine over
> wlan0. However, I run into trouble when I tell that specific IP lists
> should go over ppp0. 

Yeah, check out the IPv4 tab of nm-connection-editor, specifically the
routes dialog.  That'll get you what you want.

Dan

> 
> 
> #route del default
> #route add default gw 192.168.2.1 dev wlan0
> 
> 
> 
> 
> Now, I run into trouble when I tell that specific IP 10.10.115.123
> should go over ppp0.
> 
> 
> 
> 
> #route add host 10.10.115.123  gw 0.0.0.0 dev ppp0
> SIOCADDRT: Invalid argument
> 
> 
> 
> 
> Please suggest me how I can do it over command line via route or via
> NetworkManager.
> 
> 
> 
> 
> 
> 
> Thanks,
> Mohan
> 
> _______________________________________________
> networkmanager-list mailing list
> networkmanager-list gnome org
> http://mail.gnome.org/mailman/listinfo/networkmanager-list




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]