Skip to contentSkip to conversation

iptables wildcard delete

DISCUSSION Jonathan Tripathy 2 participants 2 messages Jul 6, 2011

lore
Share & tools
lore
#0 lore raw

Hi Everyone,

Is there some method where I can delete specific rules based on only some known rule elements?

For example, let's say I wanted to delete all rules with a target of "myChain"

Thanks

#1 lore raw

iptables -S | \
sed '/-[jg] myChain'/ s/^-A/-D/;t;d' | \
xargs -L1 iptables

В Срд, 06/07/2011 в 16:46 +0100, Jonathan Tripathy пишет:

Quoted 13 lines

Hi Everyone,

Is there some method where I can delete specific rules based on only some known rule elements?

For example, let's say I wanted to delete all rules with a target of "myChain"

Thanks
--
To unsubscribe from this list: send the line "unsubscribe netfilter" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html