Re: nat in GNU/kFreeBSD broken or it's just me?
On Tue, Nov 22, 2005 at 12:15:45PM +0800, Jett Tayer wrote:
> I'm using my GNU/kFreeBSD server for weeks now as a standalone webserver
> and it's working perfectly. Now i would like to use it as a PC router.
> I would like to know how to enable ip forwarding in GNU/kFreeBSD?
> The usual gateway_enable="YES" in /etc/rc.conf is not working
I'm not sure why you have this file (maybe a bug in our installer?), but it's
not used in Debian GNU/kFreeBSD.
Instead, you'd use /etc/sysctl.conf or /boot/loader.conf.
> I tried to manually enable "nat" but still no go.
> mach16:~# sysctl net.inet.ip.forwarding=1
> Also tried to enable ip_forwarding "the linux way" :)
> in /etc/sysctl.conf and rebooted my machine but still the same problem.
> # Uncomment the next line to enable packet forwarding for IPv4
If you use Linux-style sysctls, no wonder they don't work :). You can only
use kFreeBSD sysctl names in this file.
> BTW, im using my working openbsd /etc/pf.conf so i'm sure it's working.
> And yes, i have changed the "interfaces" in pf.conf accordingly :)
I've used NAT with PF on GNU/kFreeBSD succesfuly before, so I can assure you it
works. I don't have my config anymore to check with, though.
Maybe you could check somehow if forwarding works before checking with NAT in
your PF setup?