From owner-freebsd-net@freebsd.org Wed Mar 18 06:17:21 2020 Return-Path: Delivered-To: freebsd-net@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id E67C727DC18 for ; Wed, 18 Mar 2020 06:17:21 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48j0FF4mCrz4bdb; Wed, 18 Mar 2020 06:17:21 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from venus.codepro.be (venus.codepro.be [5.9.86.228]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mx1.codepro.be", Issuer "Let's Encrypt Authority X3" (verified OK)) (Authenticated sender: kp) by smtp.freebsd.org (Postfix) with ESMTPSA id 4B49E8185; Wed, 18 Mar 2020 06:17:21 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from [10.67.165.197] (unknown [5.35.166.165]) (Authenticated sender: kp) by venus.codepro.be (Postfix) with ESMTPSA id 1733344876; Wed, 18 Mar 2020 07:17:18 +0100 (CET) Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable From: Kristof Provost Mime-Version: 1.0 (1.0) Subject: Re: IPFW In-Kernel NAT vs PF NAT Performance Date: Wed, 18 Mar 2020 15:17:12 +0900 Message-Id: References: Cc: freebsd-net@freebsd.org In-Reply-To: To: Neel Chauhan X-Mailer: iPhone Mail (17D50) 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: Wed, 18 Mar 2020 06:17:22 -0000 > On 18 Mar 2020, at 13:31, Neel Chauhan wrote: >=20 > =EF=BB=BFHi freebsd-net@ mailing list, >=20 > Right now, my firewall is a HP T730 thin client (with a Dell Broadcom 5720= PCIe NIC) running FreeBSD 12.1 and IPFW's In-Kernel NAT. My ISP is "Wave G"= in the Seattle area, and I have the Gigabit plan. >=20 > Speedtests usually give me 700 Mbps down/900 Mbps up, and 250-400 Mbps dow= n/800 Mbps up during the Coronavirus crisis. However, I'm having problems wi= th an application (Tor relays) where I am not able to use a lot of bandwidth= for Tor, Coronavirus-related telecommuting or not. My Tor server is separat= e from my firewall. >=20 > Which firewall gives better performance, IPFW's In-Kernel NAT or PF NAT? I= am dealing with 1000s of concurrent connections but browsing-level-bandwidt= h at once with Tor. >=20 I=E2=80=99d expect both ipfw and pf to happily saturate gigabit links with N= AT, even on quite modest hardware. Are you sure the NAT code is the bottleneck? Regards, Kristof