iptables: a rule with expiration

If you need an automated way of deleting iptables rules after some time, use this:

iptables -A INPUT -s -j DROP && { echo "iptables -D INPUT -s -j DROP" | at now + 1 min; }

This rule will be deleted in a 1 minute.

0 Responses to “iptables: a rule with expiration”

Comments are currently closed.