From nobody Sun Jul 13 20:53:25 2025 X-Original-To: freebsd-net@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 4bgHjW4H57z61T7x for ; Sun, 13 Jul 2025 20:53:35 +0000 (UTC) (envelope-from chris@cretaforce.gr) Received: from smtp1.cretaforce.gr (smtp1.cretaforce.gr [5.75.211.174]) (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 (2048 bits) client-digest SHA256) (Client CN "*.cretaforce.gr", Issuer "RapidSSL TLS RSA CA G1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4bgHjV3cVqz3xtc for ; Sun, 13 Jul 2025 20:53:34 +0000 (UTC) (envelope-from chris@cretaforce.gr) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=cretaforce.gr header.s=cretaforce header.b=ZjHjANpR; spf=pass (mx1.freebsd.org: domain of chris@cretaforce.gr designates 5.75.211.174 as permitted sender) smtp.mailfrom=chris@cretaforce.gr; dmarc=pass (policy=none) header.from=cretaforce.gr Received: from server1.cretaforce.gr (server1.cretaforce.gr [94.130.217.104]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) client-signature RSA-PSS (2048 bits)) (Client CN "*.cretaforce.gr", Issuer "RapidSSL TLS RSA CA G1" (verified OK)) by smtp.cretaforce.gr (Postfix) with ESMTPS id 2A62020992 for ; Sun, 13 Jul 2025 23:53:30 +0300 (EEST) Received: from smtpclient.apple (unknown [149.210.77.81]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) (Authenticated sender: chris@cretaforce.gr) by server1.cretaforce.gr (Postfix) with ESMTPSA id 8716210B91; Sun, 13 Jul 2025 23:53:26 +0300 (EEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cretaforce.gr; s=cretaforce; t=1752440003; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=l5bglunZkV8hNYVYlf5CtBS4yB44m0PgUjAA4OY0s0U=; b=ZjHjANpRdAP05k68Yb/WZljjwgzDa6BT0IUV0/UvRuZ/0nX8apsXMOfbxC2NVXzkqfdRig MpTSGQGYzkqO/Csaz83UJFmk2Iwc4FWQuxGxofPAnx7DGkWDI5tOIE4cHax11YA2ucwiOE EG0+UdurGll9bJ1LlMEQjwYB67guFD0= From: Christos Chatzaras Message-Id: Content-Type: multipart/alternative; boundary="Apple-Mail=_E1BA6BFD-395A-4B96-A10D-E47864322801" List-Id: Networking and TCP/IP with FreeBSD List-Archive: https://lists.freebsd.org/archives/freebsd-net List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-net@FreeBSD.org Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3826.600.51.1.1\)) Subject: Re: Issues with IPFW skipto Rule and Whitelisting Logic Date: Sun, 13 Jul 2025 23:53:25 +0300 In-Reply-To: <3A01EF48-EBE8-48C3-9C66-6A250A240341@cretaforce.gr> Cc: FreeBSD Questions Mailing List To: freebsd-net References: <3A01EF48-EBE8-48C3-9C66-6A250A240341@cretaforce.gr> X-Mailer: Apple Mail (2.3826.600.51.1.1) X-Spamd-Result: default: False [2.25 / 15.00]; NEURAL_SPAM_LONG(1.00)[1.000]; NEURAL_SPAM_MEDIUM(0.91)[0.913]; NEURAL_SPAM_SHORT(0.84)[0.837]; MV_CASE(0.50)[]; DMARC_POLICY_ALLOW(-0.50)[cretaforce.gr,none]; R_DKIM_ALLOW(-0.20)[cretaforce.gr:s=cretaforce]; R_SPF_ALLOW(-0.20)[+ip4:5.75.211.174:c]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; ARC_NA(0.00)[]; ASN(0.00)[asn:24940, ipnet:5.75.128.0/17, country:DE]; RCVD_VIA_SMTP_AUTH(0.00)[]; MIME_TRACE(0.00)[0:+,1:+,2:~]; FREEFALL_USER(0.00)[chris]; RCVD_TLS_ALL(0.00)[]; RCPT_COUNT_TWO(0.00)[2]; DWL_DNSWL_NONE(0.00)[cretaforce.gr:dkim]; RCVD_COUNT_TWO(0.00)[2]; FROM_EQ_ENVFROM(0.00)[]; FROM_HAS_DN(0.00)[]; MID_RHS_MATCH_FROM(0.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; TO_DN_ALL(0.00)[]; PREVIOUSLY_DELIVERED(0.00)[freebsd-net@freebsd.org]; MLMMJ_DEST(0.00)[freebsd-net@freebsd.org]; DKIM_TRACE(0.00)[cretaforce.gr:+] X-Rspamd-Queue-Id: 4bgHjV3cVqz3xtc X-Spamd-Bar: ++ --Apple-Mail=_E1BA6BFD-395A-4B96-A10D-E47864322801 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii > My intended logic is that any IP present in table(3) should always be = allowed, even if it or its subnet also appears in table(1). >=20 > For instance, 175.178.167.241 is in table(3), while 175.178.0.0/16 is = present in table(1). >=20 > After rebooting the server and populating the tables by running the = update script for the first time, access from 175.178.167.241 works = correctly. However, after subsequent runs of the update script - which = only updates unrelated entries and does not modify 175.178.167.241 or = 175.178.0.0/16 - access from 175.178.167.241 is no longer permitted. >=20 > Additionally, when this issue arises, adding 175.178.0.0/16 to = table(3) allows access again. Even after removing that entry, as long as = 175.178.167.241 remains in table(3) and I wait for any active sessions = to clear, access continues to work. To add more detail: When this issue occurs, I can resolve it by just removing = 175.178.167.241 from table(3) and then immediately re-adding it to = table(3). These commands restores access for the IP: ipfw table 3 delete 175.178.167.241 ipfw table 3 add 175.178.167.241= --Apple-Mail=_E1BA6BFD-395A-4B96-A10D-E47864322801 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=us-ascii

My = intended logic is that any IP present in table(3) should always be = allowed, even if it or its subnet also appears in table(1).

For = instance, 175.178.167.241 is in table(3), while 175.178.0.0/16 is = present in table(1).

After rebooting the server and populating = the tables by running the update script for the first time, access from = 175.178.167.241 works correctly. However, after subsequent runs of the = update script - which only updates unrelated entries and does not modify = 175.178.167.241 or 175.178.0.0/16 - access from 175.178.167.241 is no = longer permitted.

Additionally, when this issue arises, adding = 175.178.0.0/16 to table(3) allows access again. Even after removing that = entry, as long as 175.178.167.241 remains in table(3) and I wait for any = active sessions to clear, access continues to = work.

To add = more detail:

When this issue occurs, I can resolve it = by just removing 175.178.167.241 from table(3) and then immediately = re-adding it to table(3).

These commands restores = access for the IP:

ipfw table 3 delete = 175.178.167.241

ipfw table 3 add = 175.178.167.241

= --Apple-Mail=_E1BA6BFD-395A-4B96-A10D-E47864322801--