How to support QUIC with ipfw

Michael Sierchio kudzu at tenebras.com
Sun Apr 11 20:25:29 UTC 2021


Hi, all.  I noticed my firewall was dropping what seemed to be unsolicited
UDP connections from Google and Facebook, but this turned out to be QUIC
traffic. The traffic can be initiated by the browser (or other supporting
software) or the server.  The problem is that dynamic rules generally don't
cut it – 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.

My kludgy solution at present is to troll the dynamic rules, locate the TCP
connections in them with 443 and 5228 as the target port, and add those
addresses to a table that permits UDP traffic from those ports.  I only see
QUIC on IPv6, by the way.  The cron job runs once per minute, adds the
addresses seen, and deletes those older than N seconds.  I use time_t
seconds since epoch as the table arg, so I know when it was added or
refreshed.

Any suggestions on a better solution?

Thanks.

– M

-- 

"Well," Brahmā said, "even after ten thousand explanations, a fool is no
wiser, but an intelligent person requires only two thousand five hundred."

- The Mahābhārata


More information about the freebsd-ipfw mailing list