Hacker News new | ask | show | jobs
by zamadatix 32 days ago
I think they were saying if one uses such a rule in general (as is normal) but looking into it some more it seems it may actually be the default out of the box as well as long as you've enabled UFW:

> On installation, ufw is disabled with a default incoming policy of deny, a default forward policy of deny, and a default outgoing policy of allow, with stateful tracking for NEW connections for incoming and forwarded connections.

https://manpages.ubuntu.com/manpages/noble/man8/ufw.8.html

The more specific rule is probably more useful if you do intend to expose a TCP port though.

1 comments

Ah I misunderstood the question, yes if you are not having any TCP ports exposed it's ok of course.
Is that actually true? Something still handles those packets, are they dropped by the firewall before or after the vulnerable code?
It'll get dropped before the session creation as it's a prerouting rule.