From owner-freebsd-pf@FreeBSD.ORG Fri Jan 25 18:05:16 2008 Return-Path: Delivered-To: freebsd-pf@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6B3D416A420 for ; Fri, 25 Jan 2008 18:05:16 +0000 (UTC) (envelope-from jdc@parodius.com) Received: from mx01.sc1.parodius.com (mx01.sc1.parodius.com [72.20.106.3]) by mx1.freebsd.org (Postfix) with ESMTP id 6676E13C442 for ; Fri, 25 Jan 2008 18:05:16 +0000 (UTC) (envelope-from jdc@parodius.com) Received: by mx01.sc1.parodius.com (Postfix, from userid 1000) id 214371CC038; Fri, 25 Jan 2008 10:05:16 -0800 (PST) Date: Fri, 25 Jan 2008 10:05:16 -0800 From: Jeremy Chadwick To: Gavin Spomer Message-ID: <20080125180516.GA41255@eos.sc1.parodius.com> References: <4799B1CB020000900001301E@hermes.cwu.edu> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4799B1CB020000900001301E@hermes.cwu.edu> User-Agent: Mutt/1.5.16 (2007-06-09) Cc: freebsd-pf@freebsd.org Subject: Re: How does /dev/pf get created? X-BeenThere: freebsd-pf@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Technical discussion and general questions about packet filter \(pf\)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 Jan 2008 18:05:16 -0000 On Fri, Jan 25, 2008 at 09:54:19AM -0800, Gavin Spomer wrote: > I followed your instructions to a "T" and then after I rebooted, I double checked everything to make sure I didn't do > anything stupid. Still no /dev/pf. Running kldstat still shows that pf.ko didn't get loaded. Trying to load it via your > instructions (kldload -v pf) I get: > > kldload: can't load pf: No such file or directory This would indicate that /boot/kernel/pf.ko is missing. It doesn't appear it was built during your last buildkernel/installkernel. An example of kldload working properly: eos# ls -l /boot/kernel/if_nge* -r-xr-xr-x 1 root wheel 27793 Jan 15 00:17 /boot/kernel/if_nge.ko eos# kldload if_nge eos# kldstat Id Refs Address Size Name 1 10 0xc0400000 3f5b50 kernel 2 1 0xc07f6000 64340 acpi.ko 4 2 0xc81b5000 2e000 pf.ko 5 1 0xc83e2000 2000 accf_http.ko 6 1 0xcaf50000 3000 pflog.ko 7 1 0xcd810000 7000 if_nge.ko eos# kldunload if_nge eos# kldstat Id Refs Address Size Name 1 6 0xc0400000 3f5b50 kernel 2 1 0xc07f6000 64340 acpi.ko 4 2 0xc81b5000 2e000 pf.ko 5 1 0xc83e2000 2000 accf_http.ko 6 1 0xcaf50000 3000 pflog.ko > When I ran this before following your instructions I got something like: (I'm doing this partially from memory) > > kldload: can't load pf.ko: File exists > > That doesn't make a lick of sense to me. This is what kldload will say (for most modules) when you already have said module built in to the kernel. The kernel module utilities on FreeBSD are not very "user-friendly" when it comes to error messages; your confusion in this regard is nothing to be ashamed of. If /dev/pf isn't being created despite pf being built-in, it could indicate some strange bug in the pf module (where it prefers to be loaded as a kernel module), OR, a problem with devfs (the filesystem that controls /dev on FreeBSD) on your machine. Can you provide the output of df, and the contents of /etc/fstab? > Stupid (?) question: Is there a way to manually create /dev/pf or can it be copied from another system? No, it needs to be automatically created by pf via devfs. > Thanks for taking the time to help this quasi-newbie. :) No problem. It's a learning experience, and over time you'll eventually be able to help others. :-) -- | Jeremy Chadwick jdc at parodius.com | | Parodius Networking http://www.parodius.com/ | | UNIX Systems Administrator Mountain View, CA, USA | | Making life hard for others since 1977. PGP: 4BD6C0CB |