Charles,
    You can actually insert the route command in your hostname.if
(replace 'if' with the interface you are using).  you would insert the
following line at the end of the file to add the router after the
interface comes up.  There may be a better way to do this, but this will
work.

!/sbin/route add 10.82/15 172.18.254.1




charles Collin wrote:
> Hi,
>
> I'm really new to OpenBSD.
> I recently installed version 3.9 and am trying to set it up as a
> router/NAT.
>
> I have 4 interfaces on this box:
> 1 for man LAN
> 1 for my DMZ
> 1 for a my client's private network reachable via a Cisco router
> linked to a T1.
> 1 for Inet (i got 8 public addresses, among which one for my box
> interface and another for a Cisco router connected to internet via
> ADSL, let's say my IP is I.N.E.T2 and the router's is I.N.E.T1)
>
> The IP address of the LAN interface on the Cisco router is
> 172.18.254.1 and i cannot change it (i don't own it, it is my client's).
> The private network's address is 10.82/15
>
> I set up /etc/mygate with the default gateway I.N.E.T1.
> Now i would like machines on my LAN to be routed towards 172.18.254.1.
> I can do that with a:
>
>     route add 10.82/15 172.18.254.1
>
> The only problem is when i reboot the OpenBSD box, this route disappears!
>
> I can't figure out how to make new routes persistent, though i've been
> googleing quite a lot.
>
> Is there any file in /etc that gets read by the system at boot time
> that configures additional routes like /etc/mygateway ?
>
> Thx a lot
>
> Cheers

Reply via email to