IPFW and the IP stack

Clifton Royston cliftonr at tikitechnologies.com
Thu Dec 4 12:16:21 PST 2003


On Thu, Dec 04, 2003 at 12:00:47PM -0800, freebsd-hackers-request at freebsd.org wrote:
> From: Robert Watson <rwatson at freebsd.org>
> Subject: Re: IPFW and the IP stack
> To: "Devon H.O'Dell" <dodell at sitetronics.com>
> Cc: freebsd-hackers at freebsd.org
> 
> On Thu, 4 Dec 2003, Devon H.O'Dell wrote:
> 
> > This is obviously the most logical explanation. There's a good bit of
> > questioning for PFIL_HOOKS to be enabled in generic to allow ipf to be
> > loaded as a module as well. If this is the case, we'll have two
> > firewalls that have their hooks compiled in by default allowing for them
> > both to be loaded as modules. (Is this still scheduled for 5.2?) 
> > 
> > But at this point, there's no way to allow one to turn the IPFW hooks
> > *off*. Is there a reason for this? 
> > 
> > Would it be beneficial (or possible) to hook ipfw into pfil(9)? This
> > way, we could allow the modules to be loaded by default for both and
> > also allow for the total absence of both in the kernel. Sorry if I've
> > missed discussions on this and am being redundant. 
> 
> Sam Leffler has done a substantial amount of work to push all of the
> various "hacks"" (features?) behind PFIL_HOOKS, and I anticipate we'll
> ship PFIL_HOOKS enabled in GENERIC in 5.3 and use it to plug in most of
> these services.  This also means packages like IPFilter and PF will work
> "out of the box" without a kernel recompile, not to mention offering
> substantial architectural cleanup. 

  While we're on the subject of IPFilter, has anyone gotten it to work
correctly on FreeBSD-stable to filter bridged packets in a bridged
configuration?  I have a 4.8p13 kernel compiled with bridging and IPF,
and running a ruleset that was working under an old OpenBSD install for
a "transparent firewall".

  IPF with bridging can be turned on with 
"sysctl net.link.ether.bridge_ipf=1"
  but my testing and examination of the logged stats so far *seems* to
show that it's both failing to firewall connections to the other hosts
that it's bridging to, and blocking some connections to itself that it
should accept.  I haven't started tcpdumping yet to see what's really
going on in terms of where the packets are going and not going.

  I suppose it may be that this is too weird a configuration to be
supported, but I had hoped it would work on FreeBSD since I had had it
running fine under OpenBSD 2.6 for several years.
  -- Clifton

-- 
          Clifton Royston  --  cliftonr at tikitechnologies.com 
         Tiki Technologies Lead Programmer/Software Architect
Did you ever fly a kite in bed?  Did you ever walk with ten cats on your head?
  Did you ever milk this kind of cow?  Well we can do it.  We know how.
If you never did, you should.  These things are fun, and fun is good.
                                                                 -- Dr. Seuss


More information about the freebsd-hackers mailing list