Re: nat in GNU/kFreeBSD broken or it's just me?
- To: Jett Tayer <jett@chikka.com>
- Cc: debian-bsd@lists.debian.org
- Subject: Re: nat in GNU/kFreeBSD broken or it's just me?
- From: Robert Millan <rmh@aybabtu.com>
- Date: Mon, 28 Nov 2005 11:11:58 +0100
- Message-id: <20051128101158.GA11692@aragorn>
- In-reply-to: <1132632945.9898.15.camel@shearucar>
- References: <1132632945.9898.15.camel@shearucar>
On Tue, Nov 22, 2005 at 12:15:45PM +0800, Jett Tayer wrote:
> Hello,
>
> 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
> net/ipv4/ip_forward=1
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?
--
Robert Millan
Reply to: