From owner-freebsd-security Fri Oct 13 13:42:35 2000 Delivered-To: freebsd-security@freebsd.org Received: from jade.chc-chimes.com (jade.chc-chimes.com [216.28.46.6]) by hub.freebsd.org (Postfix) with ESMTP id 2B43F37B66E for ; Fri, 13 Oct 2000 13:42:32 -0700 (PDT) Received: by jade.chc-chimes.com (Postfix, from userid 1001) id B57DE1C7A; Fri, 13 Oct 2000 16:42:31 -0400 (EDT) Date: Fri, 13 Oct 2000 16:42:31 -0400 From: Bill Fumerola To: Gerhard Sittig Cc: freebsd-security@FreeBSD.ORG Subject: Re: Dynamic rc.firewall Message-ID: <20001013164231.S37870@jade.chc-chimes.com> References: <5.0.0.25.2.20001013032255.00a8ee40@127.0.0.1> <20001013191623.C25237@speedy.gsinet> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0i In-Reply-To: <20001013191623.C25237@speedy.gsinet>; from Gerhard.Sittig@gmx.net on Fri, Oct 13, 2000 at 07:16:23PM +0200 X-Operating-System: FreeBSD 3.3-STABLE i386 Sender: owner-freebsd-security@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org On Fri, Oct 13, 2000 at 07:16:23PM +0200, Gerhard Sittig wrote: > > How can I have rc.firewall automatically pull in ip, netmask > > and network numbers from the currently configured interfaces. > > > > Lets say I was to supply 'xl0' and have it extract the > > information from ifconfig. I started a perl program, but I > > don't have enough documentation available at the moment to > > actually extract the data from what is returned. > > I don't know whether ipfw has a similar "alias", but in ipf > (which is available in FreeBSD, too) you can specify address > 0.0.0.0/32 in your rules when you mean "my current address on > this interface". Just make sure to issue "ipf -y" whenever the > interface address changes (ppp.linkup or the appropriate dhcp > client hook). < /home/billf # ipfw sh 00010 4 336 count ip from any to any via lo0 00020 4 336 count ip from any to any via 127.0.0.1 65535 1394368 292507478 allow ip from any to any Granted you can't just use this anywhere, but ipfw allows for a preprocessor. -- Bill Fumerola - Network Architect, BOFH / Chimes, Inc. billf@chimesnet.com / billf@FreeBSD.org To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-security" in the body of the message