/etc/fail2ban/action.d
NameSizeModeActions
abuseipdb.conf37480644editdlrm
apf.conf5870644editdlrm
badips.conf6290644editdlrm
badips.py115360644editdlrm
blocklist_de.conf27150644editdlrm
bsd-ipfw.conf32260644editdlrm
cloudflare.conf29700644editdlrm
complain.conf47570644editdlrm
dshield.conf76680644editdlrm
dummy.conf17170644editdlrm
firewallcmd-allports.conf15010644editdlrm
firewallcmd-common.conf26490644editdlrm
firewallcmd-ipset.conf27190644editdlrm
firewallcmd-multiport.conf13220644editdlrm
firewallcmd-new.conf19500644editdlrm
firewallcmd-rich-logging.conf10210644editdlrm
firewallcmd-rich-rules.conf18010644editdlrm
helpers-common.conf5920644editdlrm
hostsdeny.conf16570644editdlrm
ipfilter.conf15730644editdlrm
ipfw.conf15050644editdlrm
iptables-allports.conf15140644editdlrm
iptables-common.conf27380644editdlrm
iptables-ipset-proto4.conf20880644editdlrm
iptables-ipset-proto6-allports.conf27420644editdlrm
iptables-ipset-proto6.conf27850644editdlrm
iptables-multiport-log.conf21700644editdlrm
iptables-multiport.conf15080644editdlrm
iptables-new.conf15850644editdlrm
iptables-xt_recent-echo.conf26720644editdlrm
iptables.conf14270644editdlrm
mail-buffered.conf24310644editdlrm
mail-whois-common.conf10510644editdlrm
mail-whois-lines.conf24430644editdlrm
mail-whois.conf18420644editdlrm
mail.conf17090644editdlrm
mynetwatchman.conf53210644editdlrm
netscaler.conf14930644editdlrm
nftables-allports.conf3830644editdlrm
nftables-multiport.conf3840644editdlrm
nftables.conf63180644editdlrm
nginx-block-map.conf37460644editdlrm
npf.conf15240644editdlrm
nsupdate.conf32340644editdlrm
osx-afctl.conf4970644editdlrm
osx-ipfw.conf23020644editdlrm
pf.conf37500644editdlrm
route.conf10230644editdlrm
sendmail-buffered.conf28060644editdlrm
sendmail-common.conf19380644editdlrm
sendmail-geoip-lines.conf17610644editdlrm
sendmail-whois-ipjailmatches.conf10550644editdlrm
sendmail-whois-ipmatches.conf10360644editdlrm
sendmail-whois-lines.conf12990644editdlrm
sendmail-whois-matches.conf10000644editdlrm
sendmail-whois.conf9500644editdlrm
sendmail.conf8290644editdlrm
shorewall-ipset-proto6.conf35210644editdlrm
shorewall.conf21560644editdlrm
smtp.py62770644editdlrm
symbiosis-blacklist-allports.conf14180644editdlrm
ufw.conf10450644editdlrm
xarf-login-attack.conf64430644editdlrm
Edit: /etc/fail2ban/action.d/bsd-ipfw.conf (3226B)
# Fail2Ban configuration file # # Author: Nick Munger # Modified by: Ken Menzel # Daniel Black (start/stop) # Fabian Wenk (many ideas as per fail2ban users list) # # Ensure firewall_enable="YES" in the top of /etc/rc.conf # [Definition] # Option: actionstart # Notes.: command executed on demand at the first ban (or at the start of Fail2Ban if actionstart_on_demand is set to false). # Values: CMD # actionstart = ipfw show | fgrep -c -m 1 -s 'table()' > /dev/null 2>&1 || ( num=$(ipfw show | awk 'BEGIN { b = } { if ($1 == b) { b = $1 + 1 } } END { print b }'); ipfw -q add "$num" from table\(
\) to me ; echo "$num" > "" ) # Option: actionstop # Notes.: command executed at the stop of jail (or at the end of Fail2Ban) # Values: CMD # actionstop = [ ! -f ] || ( read num < ""
ipfw -q delete $num
rm "" ) # Option: actioncheck # Notes.: command executed once before each actionban command # Values: CMD # actioncheck = # Option: actionban # Notes.: command executed when banning an IP. Take care that the # command is executed with Fail2Ban user rights. # Tags: See jail.conf(5) man page # Values: CMD # # requires an ipfw rule like "deny ip from table(1) to me" actionban = e=`ipfw table
add 2>&1`; x=$?; [ $x -eq 0 -o "$e" = 'ipfw: setsockopt(IP_FW_TABLE_XADD): File exists' ] || echo "$e" | grep -q "record already exists" || { echo "$e" 1>&2; exit $x; } # Option: actionunban # Notes.: command executed when unbanning an IP. Take care that the # command is executed with Fail2Ban user rights. # Tags: See jail.conf(5) man page # Values: CMD # actionunban = e=`ipfw table
delete 2>&1`; x=$?; [ $x -eq 0 -o "$e" = 'ipfw: setsockopt(IP_FW_TABLE_XDEL): No such process' ] || echo "$e" | grep -q "record not found" || { echo "$e" 1>&2; exit $x; } [Init] # Option: table # Notes: The ipfw table to use. If a ipfw rule using this table already exists, # this action will not create a ipfw rule to block it and the following # options will have no effect. # Values: NUM table = 1 # Option: port # Notes.: Specifies port to monitor. Blank indicate block all ports. # Values: [ NUM | STRING ] # port = # Option: startstatefile # Notes: A file to indicate that the table rule that was added. Ensure it is unique per table. # Values: STRING startstatefile = /var/run/fail2ban/ipfw-started-table_
# Option: block # Notes: This is how much to block. # Can be "ip", "tcp", "udp" or various other options. # Values: STRING block = ip # Option: blocktype # Notes.: How to block the traffic. Use a action from man 5 ipfw # Common values: deny, unreach port, reset # ACTION defination at the top of man ipfw for allowed values. # Values: STRING # blocktype = unreach port # Option: lowest_rule_num # Notes: When fail2ban starts with action and there is no rule for the given table yet # then fail2ban will start looking for an empty slot starting with this rule number. # Values: NUM lowest_rule_num = 111