From nobody Mon Aug 2 08:38:06 2021 X-Original-To: freebsd-ipfw@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 9E5E212B98D3 for ; Mon, 2 Aug 2021 08:38:17 +0000 (UTC) (envelope-from alfadev@protonmail.com) Received: from mail-40137.protonmail.ch (mail-40137.protonmail.ch [185.70.40.137]) (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 "protonmail.com", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GdWc81DSWz3Jlw for ; Mon, 2 Aug 2021 08:38:16 +0000 (UTC) (envelope-from alfadev@protonmail.com) Date: Mon, 02 Aug 2021 08:38:06 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail; t=1627893487; bh=L5SleSfgyfmSt4sb9l2xxwLG+8/wwgISEHqHdtltQbw=; h=Date:To:From:Cc:Reply-To:Subject:In-Reply-To:References:From; b=d7cGl2MNOdhx24ZsV6tISiprQy3gi7UztIiSyylt7P1Ij2XUGJ9lrPcGusrtq91wy Wi/1HF2HxsLuqARaGytUyB71c3PyejRZXQ0JXn2AR4iaQdS2KRcYcn9mm3ZOp5cYIi lGpfV24+em3AB5vS7P9jOTyW4zfYVAXKm4ZLZBr0= To: Martin Beran Cc: "freebsd-ipfw@FreeBSD.org" , "freebsd-hackers@FreeBSD.org" Reply-To: alfadev Subject: Re: How to Force Packet Traversal Order (IPFW2 => PF) Message-ID: In-Reply-To: References: List-Id: IPFW Technical Discussions List-Archive: https://lists.freebsd.org/archives/freebsd-ipfw List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-ipfw@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-1.2 required=10.0 tests=ALL_TRUSTED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM shortcircuit=no autolearn=disabled version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on mailout.protonmail.ch X-Rspamd-Queue-Id: 4GdWc81DSWz3Jlw X-Spamd-Bar: --- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=protonmail.com header.s=protonmail header.b=d7cGl2MN; dmarc=pass (policy=quarantine) header.from=protonmail.com; spf=pass (mx1.freebsd.org: domain of alfadev@protonmail.com designates 185.70.40.137 as permitted sender) smtp.mailfrom=alfadev@protonmail.com X-Spamd-Result: default: False [-4.00 / 15.00]; HAS_REPLYTO(0.00)[alfadev@protonmail.com]; TO_DN_EQ_ADDR_SOME(0.00)[]; TO_DN_SOME(0.00)[]; FREEMAIL_FROM(0.00)[protonmail.com]; R_SPF_ALLOW(-0.20)[+ip4:185.70.40.0/24]; RWL_MAILSPIKE_GOOD(0.00)[185.70.40.137:from]; DKIM_TRACE(0.00)[protonmail.com:+]; DMARC_POLICY_ALLOW(-0.50)[protonmail.com,quarantine]; NEURAL_HAM_SHORT(-1.00)[-1.000]; RCVD_COUNT_ZERO(0.00)[0]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; FREEMAIL_ENVFROM(0.00)[protonmail.com]; ASN(0.00)[asn:62371, ipnet:185.70.40.0/24, country:CH]; MID_RHS_MATCH_FROM(0.00)[]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; R_DKIM_ALLOW(-0.20)[protonmail.com:s=protonmail]; REPLYTO_EQ_FROM(0.00)[]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; NEURAL_HAM_LONG(-1.00)[-1.000]; MIME_GOOD(-0.10)[text/plain]; FREEMAIL_REPLYTO(0.00)[protonmail.com]; TO_MATCH_ENVRCPT_SOME(0.00)[]; MAILMAN_DEST(0.00)[freebsd-ipfw] Reply-To: alfadev@protonmail.com From: alfadev via freebsd-ipfw X-Original-From: alfadev X-ThisMailContainsUnwantedMimeParts: N Thank you all , I made further research and found same issue (Multi WAN + Captive Portal no= t working when pf+ipfw enabled same time) on OPNSENSE first mention is here: https://github.com/opnsense/core/issues/1166 here is the OPNSENSE solution: https://git.furworks.de/opensourcemirror/opnsense-src/commit/83fd8a61b942d8= 4f553e53127c4be02b318f7cf4 https://reviews.freebsd.org/D8109 https://reviews.freebsd.org/D8109 i will try solutions above links and hope this helps me and others.. =E2=80=90=E2=80=90=E2=80=90=E2=80=90=E2=80=90=E2=80=90=E2=80=90 Original Me= ssage =E2=80=90=E2=80=90=E2=80=90=E2=80=90=E2=80=90=E2=80=90=E2=80=90 On Sunday, August 1st, 2021 at 1:19 AM, Martin Beran wrote= : > p=C3=A1 30. 7. 2021 v 13:41 odes=C3=ADlatel alfadev via freebsd-ipfw < > > freebsd-ipfw@freebsd.org> napsal: > > > Hi, > > > > I have to use both IPFW and PF sametime in my freebsd 12.2 gateway > > > > According to my observations firewalls are following this order all of = my > > > > scenarios PF =3D> IPFW2. I see this exactly When i use PF's route-to op= tion . > > > > When i create Load-Balancing rule using PF's route-to, packets not ente= ring > > > > into IPFW. So when i made PBR, IPFW rules like mac based piping, bandwi= dth, > > > > captive portal etc. does not works. > > > > So that > > > > i am trying to do this order: > > > > input =3D> ipfw =3D> pf > > > > but i think i cannot change this order without touching kernel level . > > > > when i made some research i found this > > > > https://www.opennet.ru/tips/info/1431.shtml > > I think that you do not need to touch kernel source, nor build a custom > > kernel. The order of calling packet filtering modules depends on the orde= r > > of registering the modules to packet processing hooks. Instead of loading > > the modules by their respective startup scripts, you can load them in the > > required order by including them in /etc/rc.conf in variable kld_list. I = do > > not remember if the order of calling is the same or the opposite of the > > order of module loading. > > Martin Beran From nobody Mon Aug 2 08:59:00 2021 X-Original-To: ipfw@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 B70F412BBA32 for ; Mon, 2 Aug 2021 08:59:00 +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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GdX444l3dz3Lps for ; Mon, 2 Aug 2021 08:59:00 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) 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 877AA1C8E6 for ; Mon, 2 Aug 2021 08:59:00 +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 1728x0we007664 for ; Mon, 2 Aug 2021 08:59:00 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 1728x0no007663 for ipfw@FreeBSD.org; Mon, 2 Aug 2021 08:59:00 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: ipfw@FreeBSD.org Subject: [Bug 257552] Feature Request: IPFW2 add DragonflyBSD's IPFW3 features Date: Mon, 02 Aug 2021 08:59:00 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: kern X-Bugzilla-Version: 12.2-STABLE X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Some People X-Bugzilla-Who: linimon@FreeBSD.org X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: ipfw@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: assigned_to Message-ID: In-Reply-To: References: 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: IPFW Technical Discussions List-Archive: https://lists.freebsd.org/archives/freebsd-ipfw List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-ipfw@freebsd.org MIME-Version: 1.0 X-ThisMailContainsUnwantedMimeParts: N https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D257552 Mark Linimon changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|bugs@FreeBSD.org |ipfw@FreeBSD.org --=20 You are receiving this mail because: You are the assignee for the bug.= From nobody Mon Aug 2 19:12:18 2021 X-Original-To: freebsd-ipfw@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 57DB812B6781 for ; Mon, 2 Aug 2021 19:12:20 +0000 (UTC) (envelope-from longwitz@incore.de) Received: from dss.incore.de (dss.incore.de [195.145.1.138]) (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 mx1.freebsd.org (Postfix) with ESMTPS id 4Gdngl567cz4sLG for ; Mon, 2 Aug 2021 19:12:19 +0000 (UTC) (envelope-from longwitz@incore.de) Received: from dssresv3.local.incore (fwintern.dmz [10.0.0.253]) by dss.incore.de (Postfix) with ESMTP id AB3E76BC477 for ; Mon, 2 Aug 2021 21:12:18 +0200 (CEST) Received: from [192.168.14.27] (unknown [192.168.99.6]) by dssresv3.local.incore (Postfix) with ESMTPS id 8DBE727363 for ; Mon, 2 Aug 2021 21:12:18 +0200 (CEST) To: freebsd-ipfw@freebsd.org X-FromHeader: Inserted by smtpd-cleanup: Andreas Longwitz From: Andreas Longwitz Subject: Re: How to Force Packet Traversal Order (IPFW2 => PF) Message-ID: <8c98b127-3241-4d3f-378b-10c03595ab8a@incore.de> Date: Mon, 2 Aug 2021 21:12:18 +0200 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 List-Id: IPFW Technical Discussions List-Archive: https://lists.freebsd.org/archives/freebsd-ipfw List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-ipfw@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US X-Rspamd-Queue-Id: 4Gdngl567cz4sLG X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of longwitz@incore.de designates 195.145.1.138 as permitted sender) smtp.mailfrom=longwitz@incore.de X-Spamd-Result: default: False [-1.97 / 15.00]; ARC_NA(0.00)[]; FAKE_REPLY(1.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; FROM_HAS_DN(0.00)[]; R_SPF_ALLOW(-0.20)[+ip4:195.145.1.138:c]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-ipfw@freebsd.org]; TO_DN_NONE(0.00)[]; RCPT_COUNT_ONE(0.00)[1]; NEURAL_HAM_LONG(-1.00)[-1.000]; RCVD_COUNT_THREE(0.00)[3]; DMARC_NA(0.00)[incore.de]; NEURAL_HAM_SHORT(-0.67)[-0.672]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:3320, ipnet:195.145.0.0/16, country:DE]; RCVD_TLS_LAST(0.00)[]; MID_RHS_MATCH_FROM(0.00)[] X-ThisMailContainsUnwantedMimeParts: N If both pf and ipfw2 are active firewalls then I change their sequence with pfctl -d; pfctl -e to set pf in the first place or with sysctl net.inet.ip.fw.enable=0; sysctl net.inet.ip.fw.enable=1 to set ipfw2 in the first place. To check for the actual sequence I use a hack with the help of the kernel debugger: echo -n "Sequence of firewall functions for incoming pakets: " cat > .gdbinit << EOF p *(*pfil_head_list->lh_first)->ph_in->tqh_first p *(*(*pfil_head_list->lh_first)->ph_in->tqh_first)->pfil_chain->tqe_next quit EOF kernel=$(sysctl -n kern.bootfile) test -f ${kernel} || kernel="/boot/kernel/kernel" { kgdb ${kernel} /dev/mem } 2>/dev/null | \ { grep pfil_func | sed -e 's/.*<\(.*\)>.*/ \1/' | xargs echo; } rm .gdbinit It would be fine to have a sysctl variable to get this indormation. Andreas From nobody Sun Aug 8 21:00:21 2021 X-Original-To: ipfw@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 2E789137D27E for ; Sun, 8 Aug 2021 21:00:22 +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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GjWnd6qPGz3lxM for ; Sun, 8 Aug 2021 21:00:21 +0000 (UTC) (envelope-from bugzilla-noreply@FreeBSD.org) 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 A34CA1B6B9 for ; Sun, 8 Aug 2021 21:00:21 +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 178L0Lfi046887 for ; Sun, 8 Aug 2021 21:00:21 GMT (envelope-from bugzilla-noreply@FreeBSD.org) Received: (from bugzilla@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 178L0LrJ046886 for ipfw@FreeBSD.org; Sun, 8 Aug 2021 21:00:21 GMT (envelope-from bugzilla-noreply@FreeBSD.org) Message-Id: <202108082100.178L0LrJ046886@kenobi.freebsd.org> X-Authentication-Warning: kenobi.freebsd.org: bugzilla set sender to bugzilla-noreply@FreeBSD.org using -f From: bugzilla-noreply@FreeBSD.org To: ipfw@FreeBSD.org Subject: Problem reports for ipfw@FreeBSD.org that need special attention Date: Sun, 8 Aug 2021 21:00:21 +0000 List-Id: IPFW Technical Discussions List-Archive: https://lists.freebsd.org/archives/freebsd-ipfw List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-ipfw@freebsd.org MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="16284564212.9e3FaA37.46296" Content-Transfer-Encoding: 7bit X-ThisMailContainsUnwantedMimeParts: Y --16284564212.9e3FaA37.46296 Date: Sun, 8 Aug 2021 21:00:21 +0000 MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" To view an individual PR, use: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=(Bug Id). The following is a listing of current problems submitted by FreeBSD users, which need special attention. These represent problem reports covering all versions including experimental development code and obsolete releases. Status | Bug Id | Description ------------+-----------+--------------------------------------------------- New | 215875 | [ipfw] ipfw lookup tables do not support mbuf_tag New | 232764 | [ipfw] share/examples/ipfw/change_rules.sh: Suppo 2 problems total for which you should take action. --16284564212.9e3FaA37.46296--