From owner-freebsd-net@freebsd.org Sun Apr 11 21:27:37 2021 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 5955F5DF120 for ; Sun, 11 Apr 2021 21:27:37 +0000 (UTC) (envelope-from kudzu@tenebras.com) Received: from mail-lj1-x230.google.com (mail-lj1-x230.google.com [IPv6:2a00:1450:4864:20::230]) (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 4FJQ1z67HGz4dd0 for ; Sun, 11 Apr 2021 21:27:35 +0000 (UTC) (envelope-from kudzu@tenebras.com) Received: by mail-lj1-x230.google.com with SMTP id l14so10026394ljb.1 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=Cbj28B7j5pIUshFWEH1w5x9DwqFTILw+MB7qpSfWiik6v3FLg7+dvQyjjqCOC0sq2f 8dqld7d9p6hD0SJ4MI4vCGmfbjlMRfJc6ARbRXQUxp7Fg2uaKuJs7bBNT2AGZ7vukxgC nCJfFI+8pEs+X9cpkV4OZn9UoNhgM3rQeByZU+iIsdW5rNY/vIYwI3mkVB3Qw/Tc1CpW wfkwPygf/PUIrkvVqQF6E5nZsNKLi86w3MgVxnfLchiv8wvl5APRo4TZyg1zdhKyqfeP hStgJMA4Xd2NjdtzP5h9ZbjS5LNRNPcyCTMlp78+mMT14ahoLAW2wqHTq5A07der6BG6 vzVg== X-Gm-Message-State: AOAM530pYi/ZSMHJCw5E0QqDjdeTqkOo4NwU0c4FvvW1VGlpVRyYBQI6 a/iwaLnmI+b6PA+V6ywShdPLaDuOt95b3Pk5sqICRPQJU7XRHw== 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: 4FJQ1z67HGz4dd0 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::230) 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-net@freebsd.org]; DMARC_NA(0.00)[tenebras.com]; SPAMHAUS_ZRD(0.00)[2a00:1450:4864:20::230: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::230: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::230:from]; ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US]; RCVD_COUNT_TWO(0.00)[2]; MAILMAN_DEST(0.00)[freebsd-net] Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.34 X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Networking and TCP/IP with FreeBSD 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