From nobody Wed Nov 20 17:43:33 2024 X-Original-To: bugs@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Xtpcj321Wz5dXf0 for ; Wed, 20 Nov 2024 17:43:33 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Xtpcj0rYfz4V4f for ; Wed, 20 Nov 2024 17:43:33 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732124613; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jTngQrVUZvQauXWsVJeE9We1dJJpqnzA1CKg4mFKGy4=; b=l+qWK+NFGyTi7Zz1sLVgUvSwrh7lvcOmBqnCyzCf03adTQz3/q9JzXGdQ6wI+VE1GTGgy0 W8a+fEjLiKlR3cUWFDw4d13zfdOaSdbnbl72QE3+0+rVTU1abSiiAJsTAFgIkdH6n04uKv XFMPZXVFlIw+oaGXKHWHTW5Fuwz6v3al3dWLR//EkGi1Exsn8csc104pACs9s45az2DtZU wYUvaZogsYHtwKE/vbN8p5LYtRz2fR9B5TmknYWbSt65NfL6di3GZwJl13girDIZM8CdaZ DouCMZxWxdEDyExCw/LUsD2VkE8IrbtqEHv6hwWRA6m0p4Q4OdIU2/YOrrYYzA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732124613; a=rsa-sha256; cv=none; b=YfJvsTh/N1j/YLm1ou5GDPh+sbk7XekMge0vMNqmFBEVzaxYMveiYcmdS4TKSUHQ6JrPX6 VBvDvN9C6MkXDGP0EB6HRiA/T9EONPBS2d8n6/mz2xuHCKvgs6M4kQaeR9FZvOo17M5uP4 E2m1RwQYMeQjwEWcnIyZiYOzi9y5L6sXwbreiS7H/UJHIsU0cw9W3c8sb8Y/MOmIummVKc fGdXyOcDBxQPJPHmRfjUdcIhPmb0zr8dEGIP/kKa7aRMJ54mH0m9u4Xrn5iOGD2PMB8ASd rT+5XH5aS44nftfroVQ2tczGWSYXyXj0IgLX3qzrp1g8nvSFRgLAt/bBXGhXPg== Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Xtpcj0M2Rz14G1 for ; Wed, 20 Nov 2024 17:43:33 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.5]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id 4AKHhWG4018989 for ; Wed, 20 Nov 2024 17:43:32 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 4AKHhWoP018987 for bugs@FreeBSD.org; Wed, 20 Nov 2024 17:43:32 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: bugs@FreeBSD.org Subject: [Bug 282877] pfctl: [Feature request] Allow pfctl to reset statistics for an individual IP address Date: Wed, 20 Nov 2024 17:43:33 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: bin X-Bugzilla-Version: 14.1-RELEASE X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: freebsd@ohreally.nl X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: bugs@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status bug_severity priority component assigned_to reporter Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated List-Id: Bug reports List-Archive: https://lists.freebsd.org/archives/freebsd-bugs List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-bugs@FreeBSD.org MIME-Version: 1.0 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D282877 Bug ID: 282877 Summary: pfctl: [Feature request] Allow pfctl to reset statistics for an individual IP address Product: Base System Version: 14.1-RELEASE Hardware: Any OS: Any Status: New Severity: Affects Only Me Priority: --- Component: bin Assignee: bugs@FreeBSD.org Reporter: freebsd@ohreally.nl Hi, I'd like to request the implementation of a new feature in pfctl. This new feature, as stated in the subject, would allow resetting the statistics for a single IP address. The resetting of statistics for all IP addresses in a specified table is already implemented (`pfctl -t sometable -T zero'). However, resetting the statistics for a single IP address in a table would allow me to continuously block repeat offenders, while releasing one-time offenders. The scenario I'm thinking about is as follows: An offender is added to a certain table, let's call it , either by= PF using the 'overload' feature, an external tool like blacklistd or fail2ban,= or manually. A cronjob expires addresses in table after a time period X (`pfct= l -t blocked -T expire 1209600'). An external tool like blacklistd or fail2ban (or something home-brewn) trac= ks the PF log, and resets the statistics for offending hosts that are already = in table . This way, repeat offenders will remain in table indefinitely, whi= le hosts that attacked my server 'by accident' will get a retry. PF already supports the necessary ioctl command DIOCRCLRASTATS, which does exactly what I want. So only pfctl would need to be patched for this featur= e to be implemented. Actually, thinking FreeBSD pfctl was the same as OpenBSD pfctl, I requested this feature on the OpenBSD bugs mailing list yesterday. The request was accepted, and a patch was committed this afternoon. However, after all this, they told me that the 2 are not the same, and I sh= ould make a new feature request here. So, here it is. More info can be found on the OpenBSD bugs and tech mailing lists: https://marc.info/?l=3Dopenbsd-bugs&m=3D173206758904599&w=3D2 https://marc.info/?l=3Dopenbsd-tech&m=3D173210109222862&w=3D2 And the definitive OpenBSD patch is here: https://marc.info/?l=3Dopenbsd-tech&m=3D173210375324534&w=3D2 Thank you for considering this feature request. Sincerely, Rob LA LAU --=20 You are receiving this mail because: You are the assignee for the bug.=