From owner-freebsd-pf@FreeBSD.ORG Fri Jul 9 21:47:16 2010 Return-Path: Delivered-To: freebsd-pf@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4A938106564A for ; Fri, 9 Jul 2010 21:47:16 +0000 (UTC) (envelope-from ddesimone@verio.net) Received: from relay2-bcrtfl2.verio.net (relay2-bcrtfl2.verio.net [131.103.218.177]) by mx1.freebsd.org (Postfix) with ESMTP id F325F8FC14 for ; Fri, 9 Jul 2010 21:47:15 +0000 (UTC) Received: from iad-wprd-xchw02.corp.verio.net (iad-wprd-xchw02.corp.verio.net [198.87.7.165]) by relay2-bcrtfl2.verio.net (Postfix) with ESMTP id D93001FF01D0 for ; Fri, 9 Jul 2010 17:47:13 -0400 (EDT) Thread-Index: AcsfsEpfFlzPpxIvRbSZQtUvp+tzSg== Received: from dllstx1-8sst9f1.corp.verio.net ([10.144.2.52]) by iad-wprd-xchw02.corp.verio.net over TLS secured channel with Microsoft SMTPSVC(6.0.3790.4675); Fri, 9 Jul 2010 17:47:12 -0400 Received: by dllstx1-8sst9f1.corp.verio.net (sSMTP sendmail emulation); Fri, 09 Jul 2010 16:47:11 -0500 Date: Fri, 9 Jul 2010 16:47:11 -0500 Content-Transfer-Encoding: 7bit From: "David DeSimone" To: Content-class: urn:content-classes:message Importance: normal Priority: normal X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.4657 Message-ID: <20100709214710.GE5292@verio.net> Mail-Followup-To: freebsd-pf@freebsd.org References: <201007092336.AA320012590@mail.Go2France.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <201007092336.AA320012590@mail.Go2France.com> Precedence: bulk User-Agent: Mutt/1.5.20 (2009-06-14) X-OriginalArrivalTime: 09 Jul 2010 21:47:12.0158 (UTC) FILETIME=[49B64BE0:01CB1FB0] Subject: Re: Subject: pf: pass in quick to port 25 still getting blocks X-BeenThere: freebsd-pf@freebsd.org X-Mailman-Version: 2.1.5 List-Id: "Technical discussion and general questions about packet filter \(pf\)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Jul 2010 21:47:16 -0000 Len Conrad wrote: > > pass in quick on $ext_if inet proto tcp from any to $ext_if port smtp keep state Be aware that there is an implied "flags S/SA" added to your rule, so it only matched initial SYN packets. > and the last rule is: > > block in log on $ext_if from any to $ext_if, which logs as: > in spite of the pass in smtp, rule 33 is still blocking several 1000 SMTP accesses/day, eg: > > rule 33/0(match): block in on em0: 74.120.242.172.57093 > x.x.x.x.25: . ack 50 win 46 > > rule 33/0(match): block in on em0: 94.179.232.111.8364 > x.x.x.x.25: P 0:6(6) ack 1 win 65438 The packets shown here are not SYN packets, so they fail to match the early rule. They are supposed to be matched by the connection state which is built, but for some reason they are not matching. Are your state entries expiring early for some reason? You may want to add "log" to the early pass rule, and then you can compare the timestamp between when the initial SYN arrived for a connection, and the later block occurred for a packet in the middle of the connection. -- David DeSimone == Network Admin == fox@verio.net "I don't like spinach, and I'm glad I don't, because if I liked it I'd eat it, and I just hate it." -- Clarence Darrow This email message is intended for the use of the person to whom it has been sent, and may contain information that is confidential or legally protected. If you are not the intended recipient or have received this message in error, you are not authorized to copy, distribute, or otherwise use this message or its attachments. Please notify the sender immediately by return e-mail and permanently delete this message and any attachments. Verio, Inc. makes no warranty that this email is error or virus free. Thank you.