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

Re: network manager / vpnc question

On Mon, Jan 19, 2009 at 10:40:45PM -0800, Patrick Mansfield wrote:
> On Mon, Jan 19, 2009 at 03:01:49PM -0500, Mail Lists wrote:
> > 
> >   I have set up a vpnc connection just fine (to cisco) - while there is
> > a button to add routes, it seems to not understand the usual ip route
> > arguments ...
> > 
> >   I need to keep a default route via a standard gateway (not using the
> > vpnc tun0 route) and then set a bunch of other routes to tun0 .. ie i
> > need to create these routes and am stumped how to do them -
> > 
> >   At its simplest,  i'd like the routing table to be unchanged from
> > before I connect vpnc (esp the default route) which I asume 'ignore
> > automatically obtained routes' radio button will do - and in addition
> > add these 2 routes - which I cannot find how to do:
> > 
> >    ip route add x.x.x.x/16 dev tun0
> >    ip route add y.y.y.y/17 dev tun0
> > 
> >  Also I don't know for sure I will get 'tun0' so it should probably be a
> > meta token but the window to add routes only takes gateway ip type of
> > routes ...
> I'm on Fedora 9, with NetworkManager-vpnc-0.7.0-0.11.svn4326.fc9.i386
> I used entries like this in the routes table gui thing (nm -> VPN
> connections -> configure VPN, click VPN tab, click vpn connection, click
> edit, click IPv4 settings, click routes):
> address  netmask     gateway   metric
> x.y.0.0
> f.g.0.0
> With nothing set for gateway or metric.
> Note: I haven't been able to find the file with this data! It was easy to
> find with earlier versions, it's a real pain to add a lot of routes, plus
> you can't cut and paste via the gui form.

It's stored in the GConf registry under
/system/networking/connections/<#>/ipv4 where <#> is a simple integer
assigned by NM.  The actual key is "routes" and the format appears to
be a list of integers, in the order [addr, mask, gw, metric] with each
integer being a net-ordered (?) value.  So if your route is, you'd see the values [4268, 16, 0, 0] in the list.

4268 => 0x10AC => 0x000010AC ~= ""

Not the easiest thing to edit directly by hand, you're definitely right.

Paul W. Frields                                http://paul.frields.org/
  gpg fingerprint: 3DA6 A0AC 6D58 FEC4 0233  5906 ACDB C937 BD11 3717
  http://redhat.com/   -  -  -  -   http://pfrields.fedorapeople.org/
  irc.freenode.net: stickster @ #fedora-docs, #fedora-devel, #fredlug

Attachment: pgpissAXhv4Yx.pgp
Description: PGP signature

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