pf vs. RST attack question

Matthew Seaman m.seaman at
Mon Oct 6 07:19:36 UTC 2008

Jeremy Chadwick wrote:
> On Sun, Oct 05, 2008 at 12:53:03PM -0500, Scott Bennett wrote:
>>      I'm getting a lot of messages like this:
>> Oct  4 14:30:00 hellas kernel: Limiting closed port RST response from 250 to 200 packets/sec
>> Is there some rule I can insert into /etc/pf.conf to reject these apparently
>> invalid RST packets before they can bother TCP?  At the same time, I do not
>> want to reject legitimate RST packets.
> They're outbound RST packets coming from your box as a result of
> incoming packets someone is sending you (possibly an attack).
> Proper firewalling rules should help defeat this, but there is no "magic
> rule" you can place into pf.conf that will stop this.
> If you want a "magic solution", see blackhole(4).

block drop all

looks fairly magical to me.  Stick that at the top of your ruleset as
your default policy, add more specific rules beneath it to allow
the traffic you do want to pass, and Robert is your Mother's Brother.
No more floods of RST packets.

(Actually, I'd recommend always adding a 'log' clause to any rules that
drop packets like so: 'block log drop all'.  Makes running 'tcpdump -i pflog0'
an invaluable debugging aid.)



Dr Matthew J Seaman MA, D.Phil.                   7 Priory Courtyard
                                                  Flat 3
PGP:     Ramsgate
                                                  Kent, CT11 9PW

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 258 bytes
Desc: OpenPGP digital signature
Url :

More information about the freebsd-questions mailing list