From owner-freebsd-questions@FreeBSD.ORG Thu May 1 06:34:22 2003 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 672C537B401 for ; Thu, 1 May 2003 06:34:22 -0700 (PDT) Received: from thalia.otenet.gr (mailsrv.otenet.gr [195.170.0.5]) by mx1.FreeBSD.org (Postfix) with ESMTP id 41AE143F85 for ; Thu, 1 May 2003 06:34:21 -0700 (PDT) (envelope-from keramida@ceid.upatras.gr) Received: from gothmog.gr (patr530-a150.otenet.gr [212.205.215.150]) by thalia.otenet.gr (8.12.9/8.12.9) with ESMTP id h41DWGTR001001; Thu, 1 May 2003 16:32:18 +0300 (EEST) Received: from gothmog.gr (gothmog [127.0.0.1]) by gothmog.gr (8.12.9/8.12.9) with ESMTP id h41DWE3o084399; Thu, 1 May 2003 16:32:15 +0300 (EEST) (envelope-from keramida@ceid.upatras.gr) Received: (from giorgos@localhost) by gothmog.gr (8.12.9/8.12.9/Submit) id h41D5Wcx072007; Thu, 1 May 2003 16:05:32 +0300 (EEST) (envelope-from keramida@ceid.upatras.gr) Date: Thu, 1 May 2003 16:05:32 +0300 From: Giorgos Keramidas To: Joe Sotham Message-ID: <20030501130532.GB62775@gothmog.gr> References: <1868.192.168.0.1.1051459162.squirrel@sigfried> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1868.192.168.0.1.1051459162.squirrel@sigfried> cc: freebsd-questions@freebsd.org Subject: Re: modifying ipfw rules to accompany dnscache install X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 May 2003 13:34:22 -0000 On 2003-04-27 08:59, Joe Sotham wrote: > My firewall starts with the everything denied principle. I was using > the following rules to allow udp packets to/fro my private netwo: > dns1 and dns2 are my service provider's nameserver ip addresses. > > > ${fwcmd} add 400 pass udp from any to ${dns1} 53 > ${fwcmd} add 400 pass udp from any to ${dns2} 53 > ${fwcmd} add 400 pass udp from ${dns1} 53 to any > ${fwcmd} add 400 pass udp from ${dns2} 53 to any > > > After installing dnscache I have had to open the ruleset up a little. > I am wondering if the following rule can be tightened up a little. > > ${fwcmd} add 400 pass udp from any to any 53 keep-state It should work fine... My local ipfw ruleset here used to include: # Allow DNS and NTP through. add allow udp from any to any 53,123 keep-state out I'm using ipfilter now, so I haven't run any recent tests with this ruleset, but the rule shown above used to work great. - Giorgos