Skip to contentSkip to conversation

Problem with extended-match deletion

DISCUSSION Massimiliano Cuzzoli 1 participant 1 message Aug 18, 2003 netfilter

lore
Share & tools
lore
#0 lore raw

Hi all,
I've wrote a new match for iptables 1.2.7a.
All features, that I've implemented in it, run very well but
there is a problem when I try to remove the rule with my match.
I execute iptables command with "-D" option and the same parameters of rule insertion.

EXAMPLE:

Insert:
$> iptables -I PREROUTING -t mangle -m my_match --my_option -j DROP

Delete:
$> iptables -D PREROUTING -t mangle -m my_match --my_option -j DROP

Then I've received the following message:

"iptables: Bad rule (does a matching rule exist in that chain?)"

There isn't any problem if I remove the rule with a FLUSH operation "-F".

Can Anybody help me???

Regards,

Mike-Ro-Chanel