How to delete the rules that have been added before

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

 



hello guys,I have a question to ask you。
I used follow codes to set a ip whitelist. but, when the whitelist timeout, I need to delete the rules that have been added before. 
I can’t use iptables -F, because if someone use iptables insert a rule, it will delete all rules.
so , is there a method to resolved this problem? Is iptables has a rules mark function,that can delete all marked rules?
thanks.

    for ip in `cat $IP_FILE`
    do
    	echo "allow the backup ip [$ip] access."
    	iptables -A INPUT -p tcp -s $ip --dport 5943 -j ACCEPT
    done
    iptables -A INPUT -p tcp --dport 5943 -j REJECT


--
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