EnderUNIX Team.


EnderUNIX tips

Mail to My Friend , Home Page

[ OpenBSD ]

"Adding static routes" - Huzeyfe Ínal - (2006-01-18 13:00:04)   [9015]

How to save routing entries in OpenBSD?

1) create file /etc/routes in the following format:

[-net | -host] destination gateway

where destination and gateway can be symbolic names if you have entries in
/etc/networks
and /etc/hosts respectively or have running DNS in latter case.

For example:
-net acct 10.0.255.251
10.10.0.0 gate02


2) put these into /etc/netstart:

if [ -f /sbin/route ]; then
if [ -f /etc/routes ]; then
cat /etc/routes | while read line
do
/sbin/route add $line
done
fi
else
echo "$0: /sbin/route does not exist"
exit 1
fi

from openbsd @tech mailing list..( radecki)



Mail to My Friend , Home Page