I'm trying to figure out how to use overload to put certain abusive users in a table that I can use to make them less abusive. When NAT isn't involved, I think I have a handle on what to do since the IP address isn't changed. With NAT, all traffic on the internal network maps to the one external address before any of the pass/match rules are executed. Does this result in one user causing all traffic ending up in the table? If so, is there a way around it? Going to INET6 right now isn't an option, I need to use NAT.
Here is an example of the rules:
Thanks.
Here is an example of the rules:
Code:
ext_if = em1
int_if = em0
TcpState = "flags S/SA modulate state"
WWWSTO = "(max 500, source-track rule, max-src-states 50, max-src-nodes 75, max-src-conn-rate 1/300, overload <PITA> flush global)"
table <PITA> counters
nat on $ext_if inet from $int_if:network to any -> $ext_if
pass out log on $ext_if inet proto tcp from $ext_if to any port www \
$TcpState $WWWSTO queue (q_hig, q_max)
#
# slow down the PITA users
#
pass out log on $ext_if inet proto probability 20% tcp from <PITA> to ($ext_if) \
port www $TcpState $WWWSTO queue (q_low, q_def)
#
Thanks.