Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 10 Jan 2012 21:55:18 -0800
From:      Drew Tomlinson <drew@mykitchentable.net>
To:        FreeBSD Questions <freebsd-questions@freebsd.org>
Subject:   mpd5 up-script Example?
Message-ID:  <4F0D2446.3030307@mykitchentable.net>

next in thread | raw e-mail | index | archive | help
I've installed mpd5 and am using it to access a pptp VPN server at 
work.  I've got the config working but am trying to use the 'set iface 
up-script <script>' function to do some special routing.  After the 
connection is set, I have these routes:

Destination        Gateway            Flags    Refs      Use  Netif Expire
default            192.168.1.2        UGS         0   145071    em0
aaa.bbb.0.0/16     159.145.18.10      UGS         0        0    ng0
aaa.bbb.18.10      link#16            UH          0        2    ng0

And I need to make these routes:

Internet:
Destination        Gateway            Flags    Refs      Use  Netif Expire
default            192.168.1.2        UGS         0   145071    em0
aaa.bbb.0.0/16     159.145.18.10      UGS         0        6    ng0
aaa.bbb.18.10      192.168.1.2        UGHS        0        4    em0

So after my connection is up, I'm manually performing these commands:
route delete aaa.bbb.18.10
route add -host aaa.bbb.18.10 192.168.1.2

I'm sure my answer lies in the up-script.  I created a simple sh script 
to do this but mpd5 is passing lots of stuff to it and it fails.  How 
should I do this?

Thanks,

Drew

-- 
Like card tricks?

Visit The Alchemist's Warehouse to
learn card magic secrets for free!

http://alchemistswarehouse.com





Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4F0D2446.3030307>