From owner-freebsd-questions Fri Feb 18 14: 7:50 2000 Delivered-To: freebsd-questions@freebsd.org Received: from mx2.x-treme.gr (mx2.x-treme.gr [212.120.192.15]) by hub.freebsd.org (Postfix) with ESMTP id B080537BA80 for ; Fri, 18 Feb 2000 14:07:42 -0800 (PST) (envelope-from keramida@diogenis.ceid.upatras.gr) Received: from hades.hell.gr (pat17.x-treme.gr [212.120.197.209]) by mx2.x-treme.gr (8.9.3/8.9.3/IPNG-ADV-ANTISPAM-0.1) with SMTP id AAA24499 for ; Sat, 19 Feb 2000 00:07:33 +0200 Received: (qmail 6587 invoked by uid 1001); 18 Feb 2000 13:00:00 -0000 Date: Fri, 18 Feb 2000 15:00:00 +0200 From: Giorgos Keramidas To: William Wong Cc: freebsd-questions@FreeBSD.ORG Subject: Re: ipfw and natd Message-ID: <20000218150000.D4423@hades.hell.gr> Reply-To: keramida@ceid.upatras.gr References: <006601bf7779$59342140$0300a8c0@anime.ca> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0i In-Reply-To: <006601bf7779$59342140$0300a8c0@anime.ca>; from willwong@anime.ca on Tue, Feb 15, 2000 at 12:56:05AM -0500 X-PGP-Fingerprint: 62 45 D1 C9 26 F9 95 06 D6 21 2A C8 8C 16 C0 8E X-Phone-Number: +30-94-6203692, +30-93-2886457 X-Address: Theodorou Kirinaiou 61, 26334 Patra, Greece Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Tue, Feb 15, 2000 at 12:56:05AM -0500, William Wong wrote: > > A curiosity question. > > Though I think it doesn't make much difference I think in the end... > > Should ipfw "deny/allow" rules be set before or after the "divert to > natd" rule? > > I've been using the latter and everything seems to work right. Ipfw will use the action of the *first* matching rule. A rule like: deny ip from any to any will match with any IP datagram. Having the rules: deny ip from any to any allow tcp from any to $myaddr 25 will make the second rule pretty much redundant, since ALL tcp packets will match witht he first rule too and be dropped. -- Giorgos Keramidas, < keramida @ ceid . upatras . gr > For my public PGP key: finger keramida@diogenis.ceid.upatras.gr PGP fingerprint, phone and address in the headers of this message. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message