Document and test the accept rate limiting of the rich rule. Signed-off-by: Arnaud Patard <apatard@hupstream.com>tags/v1.2.0
name: fail2ban-ssh | name: fail2ban-ssh | ||||
reject: | reject: | ||||
type: icmp-port-unreachable | type: icmp-port-unreachable | ||||
- accept: | |||||
limit: "3/m" | |||||
log: | |||||
level: warning | |||||
limit: "3/m" | |||||
prefix: "http fw limit 3/m" | |||||
service: http | |||||
ports: | ports: | ||||
# {%- if grains['id'] == 'salt.example.com' %} | # {%- if grains['id'] == 'salt.example.com' %} | ||||
- comment: salt-master | - comment: salt-master |
<source ipset="fail2ban-ssh" /> | <source ipset="fail2ban-ssh" /> | ||||
<reject type="icmp-port-unreachable" /> | <reject type="icmp-port-unreachable" /> | ||||
</rule> | </rule> | ||||
<rule> | |||||
<service name="http" /> | |||||
<log prefix="http fw limit 3/m" level="warning"> | |||||
<limit value="3/m"/> | |||||
</log> | |||||
<accept> <limit value="3/m"/></accept> | |||||
</rule> | |||||
</zone> | </zone> | ||||
ZONE_XML | ZONE_XML | ||||
end | end |
name: fail2ban-ssh | name: fail2ban-ssh | ||||
reject: | reject: | ||||
type: icmp-port-unreachable | type: icmp-port-unreachable | ||||
- accept: | |||||
limit: "3/m" | |||||
log: | |||||
level: warning | |||||
limit: "3/m" | |||||
prefix: "http fw limit 3/m" | |||||
service: http | |||||
services: | services: | ||||
- http | - http | ||||
- https | - https |
name: fail2ban-ssh | name: fail2ban-ssh | ||||
reject: | reject: | ||||
type: icmp-port-unreachable | type: icmp-port-unreachable | ||||
- accept: | |||||
limit: "3/m" | |||||
log: | |||||
level: warning | |||||
limit: "3/m" | |||||
prefix: "http fw limit 3/m" | |||||
service: http | |||||
services: | services: | ||||
- http | - http | ||||
- https | - https |
name: fail2ban-ssh | name: fail2ban-ssh | ||||
reject: | reject: | ||||
type: icmp-port-unreachable | type: icmp-port-unreachable | ||||
- accept: | |||||
limit: "3/m" | |||||
log: | |||||
level: warning | |||||
limit: "3/m" | |||||
prefix: "http fw limit 3/m" | |||||
service: http | |||||
services: | services: | ||||
- http | - http | ||||
- https | - https |
name: fail2ban-ssh | name: fail2ban-ssh | ||||
reject: | reject: | ||||
type: icmp-port-unreachable | type: icmp-port-unreachable | ||||
- accept: | |||||
limit: "3/m" | |||||
log: | |||||
level: warning | |||||
limit: "3/m" | |||||
prefix: "http fw limit 3/m" | |||||
service: http | |||||
services: | services: | ||||
- http | - http | ||||
- https | - https |
name: fail2ban-ssh | name: fail2ban-ssh | ||||
reject: | reject: | ||||
type: icmp-port-unreachable | type: icmp-port-unreachable | ||||
- accept: | |||||
limit: "3/m" | |||||
log: | |||||
level: warning | |||||
limit: "3/m" | |||||
prefix: "http fw limit 3/m" | |||||
service: http | |||||
services: | services: | ||||
- http | - http | ||||
- https | - https |
name: fail2ban-ssh | name: fail2ban-ssh | ||||
reject: | reject: | ||||
type: icmp-port-unreachable | type: icmp-port-unreachable | ||||
- accept: | |||||
limit: "3/m" | |||||
log: | |||||
level: warning | |||||
limit: "3/m" | |||||
prefix: "http fw limit 3/m" | |||||
service: http | |||||
services: | services: | ||||
- http | - http | ||||
- https | - https |
name: fail2ban-ssh | name: fail2ban-ssh | ||||
reject: | reject: | ||||
type: icmp-port-unreachable | type: icmp-port-unreachable | ||||
- accept: | |||||
limit: "3/m" | |||||
log: | |||||
level: warning | |||||
limit: "3/m" | |||||
prefix: "http fw limit 3/m" | |||||
service: http | |||||
services: | services: | ||||
- http | - http | ||||
- https | - https |
name: fail2ban-ssh | name: fail2ban-ssh | ||||
reject: | reject: | ||||
type: icmp-port-unreachable | type: icmp-port-unreachable | ||||
- accept: | |||||
limit: "3/m" | |||||
log: | |||||
level: warning | |||||
limit: "3/m" | |||||
prefix: "http fw limit 3/m" | |||||
service: http | |||||
services: | services: | ||||
- http | - http | ||||
- https | - https |
name: fail2ban-ssh | name: fail2ban-ssh | ||||
reject: | reject: | ||||
type: icmp-port-unreachable | type: icmp-port-unreachable | ||||
- accept: | |||||
limit: "3/m" | |||||
log: | |||||
level: warning | |||||
limit: "3/m" | |||||
prefix: "http fw limit 3/m" | |||||
service: http | |||||
services: | services: | ||||
- http | - http | ||||
- https | - https |
name: fail2ban-ssh | name: fail2ban-ssh | ||||
reject: | reject: | ||||
type: icmp-port-unreachable | type: icmp-port-unreachable | ||||
- accept: | |||||
limit: "3/m" | |||||
log: | |||||
level: warning | |||||
limit: "3/m" | |||||
prefix: "http fw limit 3/m" | |||||
service: http | |||||
services: | services: | ||||
- http | - http | ||||
- https | - https |
name: fail2ban-ssh | name: fail2ban-ssh | ||||
reject: | reject: | ||||
type: icmp-port-unreachable | type: icmp-port-unreachable | ||||
- accept: | |||||
limit: "3/m" | |||||
log: | |||||
level: warning | |||||
limit: "3/m" | |||||
prefix: "http fw limit 3/m" | |||||
service: http | |||||
services: | services: | ||||
- http | - http | ||||
- https | - https |
name: fail2ban-ssh | name: fail2ban-ssh | ||||
reject: | reject: | ||||
type: icmp-port-unreachable | type: icmp-port-unreachable | ||||
- accept: | |||||
limit: "3/m" | |||||
log: | |||||
level: warning | |||||
limit: "3/m" | |||||
prefix: "http fw limit 3/m" | |||||
service: http | |||||
services: | services: | ||||
- http | - http | ||||
- https | - https |