From owner-freebsd-pf@freebsd.org Sat Nov 18 10:13:34 2017 Return-Path: Delivered-To: freebsd-pf@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 69C8FDF3E86 for ; Sat, 18 Nov 2017 10:13:34 +0000 (UTC) (envelope-from srs0=hv69=cq=sigsegv.be=kristof@codepro.be) Received: from venus.codepro.be (venus.codepro.be [IPv6:2a01:4f8:162:1127::2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "*.codepro.be", Issuer "Gandi Standard SSL CA 2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 326856ACDE for ; Sat, 18 Nov 2017 10:13:34 +0000 (UTC) (envelope-from srs0=hv69=cq=sigsegv.be=kristof@codepro.be) Received: from [172.20.10.2] (unknown [188.188.30.158]) (Authenticated sender: kp) by venus.codepro.be (Postfix) with ESMTPSA id B5DEE9E64; Sat, 18 Nov 2017 11:13:31 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sigsegv.be; s=mail; t=1511000012; bh=tqQd1xqsMQQc1P4tOi5VBzxm/wqB0mIfbHuGVpJvb10=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=GRG2Da2hwlG87/ceFosCLTbAuXpeWSs71Fxy9SCJTfHPFFprxJDoA0kmXrRJdbOzo SqcrYeTRjK/OVJUj/Sx810OV5EbBs1e4BaR5P6Sa573Y2a05PPFMRehGz0PNvWNKDS nAZHmX5eP+xShuE3F2LfVVI65/cwBmNSV3DMzoyU= From: "Kristof Provost" To: "Dave Horsfall" Cc: "FreeBSD PF List" Subject: Re: Why is PF rejecting these connections? Date: Sat, 18 Nov 2017 11:13:33 +0100 Message-ID: <80FABA34-F562-4158-B083-E1488345F249@sigsegv.be> In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit X-Mailer: MailMate (2.0BETAr6096) X-BeenThere: freebsd-pf@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list 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: Sat, 18 Nov 2017 10:13:34 -0000 On 18 Nov 2017, at 2:20, Dave Horsfall wrote: > I have PF (FreeBSD 10.4) configured to drop suspicious packets e.g. > those claiming to be ACKs for non-existent connections etc, but I'm > seeing some weirdness in the logs. Now, I sort of inherited the > configuration and don't fully understand each directive, but if it > works for someone I trust, well... > > Anyway, here are some sample log entries: > > 23:15:37.755870 IP host90-45-237-212.serverdedicati.aruba.it.34944 > > aneurin.kfu.smtp: Flags [S], seq 4161201091, win 14600, options [mss > 1460,sackOK,TS[|tcp]> > 23:15:40.755278 IP host90-45-237-212.serverdedicati.aruba.it.34944 > > aneurin.kfu.smtp: Flags [S], seq 4161201091, win 14600, options [mss > 1460,sackOK,TS[|tcp]> > [...] > 23:52:02.768939 IP rdns1.mailinfo.ga.43128 > aneurin.kfu.smtp: > Flags [S], seq 1022514539, win 14600, options [mss > 1460,sackOK,TS[|tcp]> > 23:52:18.768869 IP rdns1.mailinfo.ga.43128 > aneurin.kfu.smtp: > Flags [S], seq 1022514539, win 14600, options [mss > 1460,sackOK,TS[|tcp]> > Can you post a full pcap capture? It’s very hard to figure things out from a text summary of a packet. Where and how were these logged? How do you know they’re being dropped? > Etc; the common theme appears to be those options whose purpose I > don't quite grok, but are presumably legal in this context. > > The relevant lines from my pf.conf seem to be: > > set block-policy drop > set loginterface egress > #set ruleset-optimization basic > scrub in > block all > pass out quick all keep state > antispoof log quick for $ext_if inet > [ Sundry pass/block rules ] > Are these incoming or outgoing packets? I really can’t tell what’s going on from your report. Regards, Kristof