Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 7 Dec 2008 12:10:10 +0300
From:      "Odhiambo Washington" <odhiambo@gmail.com>
To:        "freebsd-questions@freebsd.org" <freebsd-questions@freebsd.org>
Subject:   Adding Static Routes - Tricky situation
Message-ID:  <991123400812070110r6734e4bexf761705e20efd1dd@mail.gmail.com>

next in thread | raw e-mail | index | archive | help
Hello list,

I have a situation where I am connecting two sites using mpd. mpd5 is
running at site A on server mode while mpd5 is also running on site B but on
initiator mode. Site B establishes a connection to site B to complete the
tunnel. This works so far, and users on the LAN on site B are able to reach
site A. Now I'd like to enable users on site A to also reach site B side of
the LAN, but I don't see where in mpd I can do it. After some little
thinking, I have noticed that I can add a static route definition to site A
from site A, but this route can only be added when the tunnel interface is
up.

So far, I have assumed that in 120secs after (re)booting the server on site
A, and assuming server on site B is up, it will be able to (re)establish the
vpn connection to site A, and thus ng0 will be up.
With that in mind, I am running a small primitive script in
/usr/local/etc/rc.d/ng0.sh that:

sleep 120
/sbin/route add -net a.b.c.d/24 -iface ng0

This is working, but it is quote primitive for me.
I'd like this script to run based on the following conditions:

1. That mpd is started successfully
2. That ng0 is up

Site A is FreeBSD 5.5-STABLE (yeah, I will soon upgrade it) while site B is
FreeBSD-7.1-PRE, so both sides should support rcNG type scripts.

Appreciate your help on how I can check for the two conditions.

-- 
Best regards,
Odhiambo WASHINGTON,
Nairobi,KE
+254733744121/+254722743223
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
"Okay guys. This is Kenya. You pay taxes because you feel philanthropic,
unlike our MPs!"
                    -- Kenneth Marende, Speaker, 10th Parilament.



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