On Wed, Feb 25, 2004 at 10:58:32AM +0100, [EMAIL PROTECTED] wrote: > Hi > I've setup a box here to act as a router/firewall for a bunch of > servers that will be behind it. Both nics seem to respond nicely but > only the first one thats connected to the outside was able to be > configured from sysinstall the second one thats connected to a, right > now empty, switch i had to set myself with ifconfig dc0 inet <ip> but > i need to set gateway and so on for it. Where can i do this? Also, if > it now IS correctly configured, how come it wont route packets? I > hooked up the office wlan to it and set an allow any to any rule but > it still wont work. > > Med v�nliga h�lsningar > > Stefan Midjich, Swebase AB
To set a default gateway, you can issue the follwing command: # route add default <gateway ip address> To make sure it gets set on each reboot you define a default gateway in your /etc/rc.conf file with a line like: defaultrouter="<some ip address>" If you want the machine to act as a router then you need to turn on ip forwarding. You can do this immediately by issuing the following command: # sysctl net.inet.ip.forwarding=1 ... and then you can add the following line to /etc/rc.conf to make sure that this sysctl is set on each reboot: gateway_enable="YES" Nathan -- gpg --keyserver pgp.mit.edu --recv-keys D8527E49
pgp00000.pgp
Description: PGP signature
