From owner-freebsd-ipfw@freebsd.org Sun Apr 11 21:27:36 2021 Return-Path: Delivered-To: freebsd-ipfw@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 C3DD35DEEF0 for ; Sun, 11 Apr 2021 21:27:36 +0000 (UTC) (envelope-from kudzu@tenebras.com) Received: from mail-lj1-x22b.google.com (mail-lj1-x22b.google.com [IPv6:2a00:1450:4864:20::22b]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4FJQ1z6CXlz4dPD for ; Sun, 11 Apr 2021 21:27:35 +0000 (UTC) (envelope-from kudzu@tenebras.com) Received: by mail-lj1-x22b.google.com with SMTP id l22so5560853ljc.9 for ; Sun, 11 Apr 2021 14:27:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tenebras-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=2drwzsqBszoCMSF/2JwLNWTsLul8HAsXVpuzm/Li4Ig=; b=FQGoH6h58PESK7EjqdqdfofYAAkPHnpck4Aef0YYccwea3nueyo2/ArZJVjOkdi/NC kk5xo9iHGvI42ap6LjJg7N4CT0WpplKnFSUChG+WRjvIvywqIOvCtCwn6lo7MRoVyKYW 8okg+BphWq5COzLUog7gZCq0Urlk0wJPEt16wIlc5ydQnjlK4HtnONtUXo8CToSHY8y7 vwTbvtlSc1WFwMhjgAL0dqqGokranxoJpKkucUYJWTpq5mzsJvHamPFLeF7kqF6WwlT8 B9OKW+QLgGh+dm2ak5QA/ijRbGL+OWr5h8fs4eU/+a49ScqiNBEgW/LMrQeZm8F6Hy9B j3OQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=2drwzsqBszoCMSF/2JwLNWTsLul8HAsXVpuzm/Li4Ig=; b=XpKUuyBFyhEIHEpfg8hd4ekNBcXTpg3H6jMHFlwGqeQttZicR4wS2AWL/UIYGF+L9t w0JQ8XIhE5+apl928d59YOIAcbaEd+4+XjQGNzoR8SMf5DBJUP5gTc8KDxM1M9zbXHWh xmdcB0VIcuxxfe8Rj54pqn9Dtsoz/23+AbqFcX/sM7eTkNqvNi3cfx5IvaSAnfpxtSNB 0Uj2a7/sI4Q+qKX6r1fiF4WgMjwSDTfC6dzJ3LO/p41tP/V0+hSb/Q7Vqi+C0lh+Tpqn LhkbYwT7ajaUJE0v0QVlCW4HNN/23ZEKZrzATLP2G1EH5yPj7VOBAQOe0dh2yruQQoma UkVQ== X-Gm-Message-State: AOAM530/q/29ULpsgvlZIzaiQOSY92ft1UTzS6ZV1vow12CTcRFxOKo7 mCD9MdgcTcMmFlyTUOoVPKAMFLEmWDrlRwx1McOsX8l/DxNwIQ== X-Google-Smtp-Source: ABdhPJxb3dzoCajYZo17B8GO/04UclQyNy2pRo98nFvExuaFcaiKEVlSht2MriCAWVBmEFXTxm+k4r8lRJg/WJfH/ow= X-Received: by 2002:a2e:9cb:: with SMTP id 194mr16022884ljj.438.1618176453102; Sun, 11 Apr 2021 14:27:33 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Michael Sierchio Date: Sun, 11 Apr 2021 14:26:57 -0700 Message-ID: Subject: Re: How to support QUIC with ipfw To: "freebsd-ipfw@freebsd.org" , FreeBSD Net X-Rspamd-Queue-Id: 4FJQ1z6CXlz4dPD X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org; dkim=pass header.d=tenebras-com.20150623.gappssmtp.com header.s=20150623 header.b=FQGoH6h5; dmarc=none; spf=none (mx1.freebsd.org: domain of kudzu@tenebras.com has no SPF policy when checking 2a00:1450:4864:20::22b) smtp.mailfrom=kudzu@tenebras.com X-Spamd-Result: default: False [0.70 / 15.00]; TO_DN_EQ_ADDR_SOME(0.00)[]; ARC_NA(0.00)[]; R_DKIM_ALLOW(-0.20)[tenebras-com.20150623.gappssmtp.com:s=20150623]; RCVD_TLS_ALL(0.00)[]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_SPAM_SHORT(1.00)[1.000]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-ipfw@freebsd.org]; DMARC_NA(0.00)[tenebras.com]; SPAMHAUS_ZRD(0.00)[2a00:1450:4864:20::22b:from:127.0.2.255]; TO_MATCH_ENVRCPT_SOME(0.00)[]; DKIM_TRACE(0.00)[tenebras-com.20150623.gappssmtp.com:+]; RCPT_COUNT_TWO(0.00)[2]; RCVD_IN_DNSWL_NONE(0.00)[2a00:1450:4864:20::22b:from]; NEURAL_SPAM_LONG(1.00)[1.000]; R_SPF_NA(0.00)[no SPF record]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+,1:+,2:~]; RBL_DBL_DONT_QUERY_IPS(0.00)[2a00:1450:4864:20::22b:from]; ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US]; RCVD_COUNT_TWO(0.00)[2]; MAILMAN_DEST(0.00)[freebsd-ipfw] Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.34 X-BeenThere: freebsd-ipfw@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: IPFW Technical Discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Apr 2021 21:27:37 -0000 On Sun, Apr 11, 2021 at 2:20 PM Matt Joras wrote: > Hi Michael, > > On Sun, Apr 11, 2021, 1:25 PM Michael Sierchio wrote= : > >> Hi, all. I noticed my firewall was dropping what seemed to be unsolicit= ed >> UDP connections from Google and Facebook, but this turned out to be QUIC >> traffic. The traffic can be initiated by the browser (or other supportin= g >> software) or the server. The problem is that dynamic rules generally >> don't >> cut it =E2=80=93 udp traffic here is predominantly NTP and DNS, and the = dynamic >> rule lifetime for UDP is very short (3-6 s). And of course they don't >> work >> at all for traffic initiated by the server side. >> > > QUIC connections aren't initiated by the server. The browser is initiatin= g > these connections. I'm not an ipfw user, the best generic firewall strate= gy > would be to have some sort of flow tracking for ~30s for UDP flows > associated with tuples originating on the client for remote port 443. 443 > will cover the vast majority of Internet cases, as QUIC is only being use= d > at scale for HTTP/3. > > Hej, Matt. Thanks. That's a solution that occurred to me, but it means a ton of dynamic rules will get instantiated for ephemeral DNS lookups =E2=80= =93 3 seconds is a very long time for a conversation with a DNS server, because it has probably recursed from the root zone all the way to the A record in a fraction of that time. 30 seconds is forever =E2=80=93 well, since UDP d= oesn't have an analogue to a FIN or RST, the rule doesn't go away when the conversation does. I'll get some metrics on it. Thanks again. --=20 "Well," Brahm=C4=81 said, "even after ten thousand explanations, a fool is = no wiser, but an intelligent person requires only two thousand five hundred." - The Mah=C4=81bh=C4=81rata