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

Re: routing in openbsd

ktb <xyf_(_at_)_nixnotes_(_dot_)_org> writes:

> The routing table on the OpenBSD box I've been working with looks like -
> Internet:
> Destination      Gateway            Flags 
> default      UG     
>          UG     
>          UH     
>      link#2             U      
>          UGH    
>      link#1             U      
>    0:7:eb:2f:6c:2     UH     
>          U      
> I have been trying to add routes that would allow a client machine on
> to assess the net though our gateway (outside of our
> building).  The subnet assigned to our building is 147.48.64/21 of the
> larger 137.48. class B network.
> The OpenBSD router/firewall has an internal nic ( and
> external nic (

Not sure why you don't see an entry like:      UGH

However, you don't need anything fancy to route from the internal to
external network here.  Configuring the interface addresses and
netmasks correctly and turning on ip forwarding should do the trick.

To turn on ip forwarding:

# sysctl -w net.inet.ip.forwarding=1

To make this survive reboot, edit /etc/sysctl.conf.  See sysctl(8),
sysctl.conf(5), hostname.if(5) and ifconfig(8).

More to the point, go read FAQ section 6, particularly 6.1.2 -
"Setting up your OpenBSD box as a Gateway", where this is all

Good luck,