Re: max-src-conn-rate rule question

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: david l goodrich <dlg@...>
Cc: <misc@...>
Date: Tuesday, October 23, 2007 - 5:55 pm

On 10/23/07, david l goodrich wrote:

I'm not a pf newbie by any means, but I'm not really qualified to
answer questions about it either. That said, I don't usually use an
'=' sign in my pf rules, and the pf faq doesn't list that as one of
the accepted operators for the port range
(http://www.openbsd.org/faq/pf/filter.html). If the rule wasn't being
parsed correctly, it would cause the behavior you're seeing. Try,

block in log quick proto tcp port ssh keep state \
(source-track rule, max-src-conn-rate 3 / 30 overload
, src.track 30)

Note that I wouldn't use a flush global directive for a rule like
this, because it can lead to a neat DoS where somebody can spoof one
of your own IP addresses and shut down any ssh sessions you have
active.

Here's a working sample from my own currently active pf file:

pass in on $ext proto tcp to port smtp keep state \
(max-src-conn 15 max-src-conn-rate 10 / 45 overload ) \
queue 6smtp

(FYI, the smtp-overload table moves traffic to a queue that simply
throttles the connections a little.)

- R.

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
max-src-conn-rate rule question, david l goodrich, (Sun Oct 21, 3:22 pm)
Re: max-src-conn-rate rule question, david l goodrich, (Tue Oct 23, 4:58 pm)
Re: max-src-conn-rate rule question, Rob, (Tue Oct 23, 5:55 pm)
Re: max-src-conn-rate rule question, Henning Brauer, (Wed Oct 24, 4:12 am)
Re: max-src-conn-rate rule question, Rob, (Wed Oct 24, 8:26 am)
Re: max-src-conn-rate rule question, david l goodrich, (Tue Oct 23, 8:30 pm)
Re: max-src-conn-rate rule question, Vijay Sankar, (Tue Oct 23, 10:36 pm)
Re: max-src-conn-rate rule question, Rob, (Tue Oct 23, 8:59 pm)
Re: max-src-conn-rate rule question, david l goodrich, (Wed Oct 24, 12:02 am)
Re: max-src-conn-rate rule question, Calomel, (Tue Oct 23, 5:46 pm)
Re: max-src-conn-rate rule question, david l goodrich, (Wed Oct 24, 12:23 am)
Re: max-src-conn-rate rule question, Calomel, (Wed Oct 24, 11:40 am)