Hi,
Is there a way so I can delete a rule in iptables without specifying the whole rule specification?
for example, I want to add the following rule:
Code:
iptables -A TEST-CHAIN -s 1.1.1.1 -j ACCEPT -m mac --mac-source 11:11:11:11:11:11 -m comment --comment "B0909"
And when I want to delete the rule I hoped I could do something like this, but clearly this doesn't work:
Code:
iptables -D TEST-CHAIN -s 1.1.1.1 -j ACCEPT -m mac --mac-source 11:11:11:11:11:11
I know I can use a script to retrieve the line number where there is a match on ip and mac and then delete it that way, but I really hoped that there was a more easy way to do this.