5
3
Is there a program on Debian to block an IP address temporarily just by launching a command (specifying the IP and the duration)?
With iptables/ip6tables alone I can create a rule, but I would then have to delete manually. I also use fail2ban, but I don't think I can block an arbitrary IP address that did not satisfy any of the fail2ban rules.
1For example create the rule and schedule with
at
the rule deletion command, something likeecho "iptables -d rest_of_rule" | at now+30m
– Dan – 2015-06-26T17:23:26.817@Dan This sound like a good solution. Actually, if you write an answer in the form of a little bash script that can take the IP and the duration as input parameters, I would accept it! – JoeWhite – 2015-06-27T07:35:25.893