Re: How to delete the rules that have been added before

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



韩爱东 <yywfqq@xxxxxxxxxx> wrote:
> so , is there a method to resolved this problem? Is iptables has a rules mark function,that can delete all marked rules?
> thanks.

Yes, use ipset and add the ips to the ipset instead.
Then you never need to remove the rule:

-A INPUT -p tcp --dport 5943 -m ipset --match-set whitelist src -j ACCEPT

Just add timeout option:

ipset create whitelist hash:ip timeout 300
ipset add whitelist 10.1.1.1 timeout 3600

the entry will disappear automatically after one hour.

Or use nftables, it also supports sets with timeouts.
--
To unsubscribe from this list: send the line "unsubscribe netfilter" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Netfilter Development]     [Linux Kernel Networking Development]     [Netem]     [Berkeley Packet Filter]     [Linux Kernel Development]     [Advanced Routing & Traffice Control]     [Bugtraq]

  Powered by Linux