Sample-iptables-multiport-tcp.conf
From Free Knowledge Base- The DUCK Project: information for everyone
[Definition] actionstart = /sbin/iptables -N fail2ban-<name> /bin/sleep 1 /sbin/iptables -A fail2ban-<name> -j RETURN /bin/sleep 1 /sbin/iptables -I INPUT -p tcp -m multiport --dports <port> -j fail2ban-<name> actionstop = /sbin/iptables -D INPUT -p tcp -m multiport --dports <port> -j fail2ban-<name> /bin/sleep 1 /sbin/iptables -F fail2ban-<name> /bin/sleep 1 /sbin/iptables -X fail2ban-<name> actionban = /sbin/iptables -I fail2ban-<name> 1 -s <ip> -j DROP actionunban = /sbin/iptables -D fail2ban-<name> -s <ip> -j DROP [Init] name = default port = ssh protocol = tcp