|
|
|
@ -10,9 +10,9 @@ before = iptables-common.conf
|
|
|
|
|
|
|
|
|
|
actionstart = firewall-cmd --direct --add-chain ipv4 filter f2b-<name>
|
|
|
|
|
firewall-cmd --direct --add-rule ipv4 filter f2b-<name> 1000 -j RETURN
|
|
|
|
|
firewall-cmd --direct --add-rule ipv4 filter <chain> 0 -m state --state NEW -p <protocol> --dport <port> -j f2b-<name>
|
|
|
|
|
firewall-cmd --direct --add-rule ipv4 filter <chain> 0 -m state --state NEW -p <protocol> -m multiport --dports <port> -j f2b-<name>
|
|
|
|
|
|
|
|
|
|
actionstop = firewall-cmd --direct --remove-rule ipv4 filter <chain> 0 -m state --state NEW -p <protocol> --dport <port> -j f2b-<name>
|
|
|
|
|
actionstop = firewall-cmd --direct --remove-rule ipv4 filter <chain> 0 -m state --state NEW -p <protocol> -m multiport --dports <port> -j f2b-<name>
|
|
|
|
|
firewall-cmd --direct --remove-rules ipv4 filter f2b-<name>
|
|
|
|
|
firewall-cmd --direct --remove-chain ipv4 filter f2b-<name>
|
|
|
|
|
|
|
|
|
@ -43,7 +43,7 @@ chain = INPUT_direct
|
|
|
|
|
# success
|
|
|
|
|
# $ firewall-cmd --direct --add-rule ipv4 filter fail2ban-name 1000 -j RETURN
|
|
|
|
|
# success
|
|
|
|
|
# $ sudo firewall-cmd --direct --add-rule ipv4 filter INPUT_direct 0 -m state --state NEW -p tcp --dport 22 -j fail2ban-name
|
|
|
|
|
# $ sudo firewall-cmd --direct --add-rule ipv4 filter INPUT_direct 0 -m state --state NEW -p tcp -m multiport --dports 22 -j fail2ban-name
|
|
|
|
|
# success
|
|
|
|
|
# $ firewall-cmd --direct --get-chains ipv4 filter
|
|
|
|
|
# fail2ban-name
|
|
|
|
|