From owner-freebsd-net@freebsd.org Thu Apr 4 07:52:20 2019 Return-Path: Delivered-To: freebsd-net@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2919D1567680 for ; Thu, 4 Apr 2019 07:52:20 +0000 (UTC) (envelope-from vas@mpeks.tomsk.su) Received: from admin.sibptus.ru (admin.sibptus.ru [IPv6:2001:19f0:5001:21dc::10]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4B8C38AE2B for ; Thu, 4 Apr 2019 07:52:19 +0000 (UTC) (envelope-from vas@mpeks.tomsk.su) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sibptus.ru; s=20181118; h=In-Reply-To:Message-ID:Subject:To:From:Date; bh=KgAu3WMByQxFdA5TGdKVNvnXiE8tCPTXPLfAEBj53Bo=; b=ZNyEFC+0d4AXExY17Rzd0qsFyU xnNKPPZoWr3X85PWJlvPlDTX8XogZUBIdD2fdu8AMTyCVoUc8XOspi7xRRT4tAqhWaekOaKL0VO1v TpakwGS+p+ocF99xSMzPBRV0bg6fJksU4h/1m3XLmm/PmAt5p7CxP/uNh1TnM5elR3Z8=; Received: from vas by admin.sibptus.ru with local (Exim 4.92 (FreeBSD)) (envelope-from ) id 1hBxAX-00051Y-Uz for freebsd-net@freebsd.org; Thu, 04 Apr 2019 14:52:17 +0700 Date: Thu, 4 Apr 2019 14:52:17 +0700 From: Victor Sudakov To: freebsd-net@freebsd.org Subject: Re: need help with ipfw nat to pf nat migration Message-ID: <20190404075217.GB18774@admin.sibptus.ru> References: <20190401033424.GA95019@admin.sibptus.ru> <75502aa3-0e10-fbba-d56b-5716e91e7b27@akhmatov.ru> <20190402070346.GA15400@admin.sibptus.ru> <391e8839-00ce-0d2d-36e7-616c7d86cc30@viklenko.net> <20190404043004.GA10861@admin.sibptus.ru> <4587c1d4-0fa6-40db-c394-5b3a2ee81646@viklenko.net> <27907a35-8cae-06d0-a0e6-b7deb64ecbfd@viklenko.net> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="IS0zKkzwUGydFO0o" Content-Disposition: inline In-Reply-To: <27907a35-8cae-06d0-a0e6-b7deb64ecbfd@viklenko.net> X-PGP-Key: http://www.dreamwidth.org/pubkey?user=victor_sudakov X-PGP-Fingerprint: 10E3 1171 1273 E007 C2E9 3532 0DA4 F259 9B5E C634 User-Agent: Mutt/1.11.4 (2019-03-13) Sender: Victor Sudakov X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Apr 2019 07:52:20 -0000 --IS0zKkzwUGydFO0o Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Artem Viklenko via freebsd-net wrote: > >> > >>> pass in quick on $int_if inet proto tcp from $server to any flags S/S= A keep=20 > >>> state allow-opts tag SERVER > >> > >> 2. > >> > >>> block return-rst out log quick on $mob_if inet proto tcp to any port = 25=20 > >>> tagged SERVER > >> > >> You have already passed the packet with "quick" in the first rule, it > >> probably will never hit the second "block" rule? > >> > >=20 > > No, each rule bound to different interface - i.e. different conditions. >=20 > Actually, you should check state-policy in your configuration. > In my firewalls there is already present >=20 > set state-policy if-bound >=20 > as routing typically static. I had the impression that a packet matching a "quick" rule leaves pf processing for good and is not evaluated by subsequent rules. --=20 Victor Sudakov, VAS4-RIPE, VAS47-RIPN 2:5005/49@fidonet http://vas.tomsk.ru/ --IS0zKkzwUGydFO0o Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEcBAEBAgAGBQJcpbexAAoJEA2k8lmbXsY0ajAH/RPaQy9KjTawXdNW2ZS0j9+Y 3P0gfrd3qKsm51AmAUioQwle50bbDzGHHEPwXyx+90fMOHXRW+vfsQDK7dIwVqlo wu02NI4v0NNCrTN0KeY3g391HmcenOL/H/dOUNyRvBkkTdCkTG2FlBxDqSSdRHsy IkHRVj0EpJXZp7cxiLRX3WguvkWheMP4UlXGdjYhEscSMzrjTkcTGHyZ5esNkn9h A+f57bys46y0kJ6OBz7hjIczs6hXWjXkh+ETLoerUweV2CyuNcAef+BkGcP7qiet PrwmPhi1T4L/XjRIBEqBVeM3w2129LzSgWu7iWKu8FsY7UO9ca9OLvyFeYdMSmU= =zF63 -----END PGP SIGNATURE----- --IS0zKkzwUGydFO0o--