From owner-freebsd-questions@FreeBSD.ORG Mon Aug 19 17:53:02 2013 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id AE27C1AB for ; Mon, 19 Aug 2013 17:53:02 +0000 (UTC) (envelope-from openslateproj@gmail.com) Received: from mail-ve0-x22e.google.com (mail-ve0-x22e.google.com [IPv6:2607:f8b0:400c:c01::22e]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 6ED142E52 for ; Mon, 19 Aug 2013 17:53:02 +0000 (UTC) Received: by mail-ve0-f174.google.com with SMTP id d10so3247101vea.33 for ; Mon, 19 Aug 2013 10:53:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=vXNWFYv995b9FBUFZt8qrOlEoLF25TPEexJkLsLPr0s=; b=By0KD1H3eru+6/93E3fAKneDqWjjnYnPFtIjbXEAogkfFIWlx6IQTbmoQM6MHmrdfY GtDVezNMI2Q9dvGhCzritURVIqyNlipBMfAlQ6bdo1OzZb7iTaObUMLXZYMYo8PfhiV2 MJfNuxpNgLLhGuKY65p7T7+/FK87eHFkuSYSTY+CY0wpU+8BFUyp5Ktmn3DVtcODOAFM UiSMiSxP5JIA4rAOnX9OkdAE1q0Qb43cprLnJQ4l8gwqe+nOFx4oHridcyF/U/7QsugA N2UJfRZehXyavKWjU2VS0+jTKBTSj8PR6xvosxvnrndFxmlpjLEdduROWYE4dG6u4yxT Hqmg== MIME-Version: 1.0 X-Received: by 10.220.199.5 with SMTP id eq5mr14515815vcb.16.1376934781542; Mon, 19 Aug 2013 10:53:01 -0700 (PDT) Received: by 10.220.139.142 with HTTP; Mon, 19 Aug 2013 10:53:01 -0700 (PDT) In-Reply-To: <5211B5E1.6040000@blackfoot.net> References: <5211B5E1.6040000@blackfoot.net> Date: Mon, 19 Aug 2013 07:53:01 -1000 Message-ID: Subject: Re: ipfw confusion From: OpenSlate ChalkDust To: Gary Aitken Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.14 Cc: FreeBSD Mailing List X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Aug 2013 17:53:02 -0000 On Sun, Aug 18, 2013 at 8:06 PM, Gary Aitken wrote: > I'm having some weird ipfw behavior, or it seems weird to me, and am > looking > for an explaination and then a way out. > > ipfw list > ... > 21109 allow tcp from any to 12.32.44.142 dst-port 53 in via tun0 setup > keep-state > 21129 allow tcp from any to 12.32.36.65 dst-port 53 in via tun0 setup > keep-state > ... > 65534 deny log logamount 5 ip from any to any > > tail -f messages > Aug 18 23:33:06 nightmare named[914]: client 188.231.152.46#63877: error > sending response: permission denied > > 12.32.36.65 is the addr of the internal interface (xl0) on the firewall > and is the public dns server. > 12.32.44.142 is the addr of the external interface (tun0) which is bridged > on a > dsl line. > > It appears that a dns request was allowed in, but the response was not > allowed > back out. It seems to me the above rules 21109 and 21129 should have > allowed > the request in and the response back out. > > It's possible a request could come in on 12.32.44.142, > which is why 21109 is present; > although I know I am getting failures to reply to refresh requests > from a secondary addressed to 12.32.36.65 > > What am I missing? > > I think you need explict rules like nnnnn allow tcp from 12.32.44.142 to any dst-port 53 out via tun0 setup keep-state careful I'm just winging the syntax, better check the docsa for sure. -- Gary Dunn Open Slate Project http://openslate.org/