Trying to get a wifidog installation working. We had it up, but when rewriting bash history into an install script, we keep running into problems with iptables.

[root@wifidogdevel ~]# iptables -t mangle -D WiFiDog_eth1_Outgoing -s 192.168.1.254 -m mac --mac-source 00:24:E8:B6:18:A2 -j MARK --set-mark 2
iptables: No chain/target/match by that name

But:

iptables -L -t mangle
[...]
Chain WiFiDog_eth1_Outgoing (1 references)
target     prot opt source               destination         

iptables -L -t nat
[...]
Chain WiFiDog_eth1_Outgoing (1 references)
target     prot opt source               destination         
WiFiDog_eth1_WIFI2Router  all  --  anywhere             192.168.1.1         
WiFiDog_eth1_WIFI2Internet  all  --  anywhere             anywhere           

Which to me says there is indeed a chain and target by that name. So, what am I missing for the match?

link|improve this question
feedback

1 Answer

up vote 0 down vote accepted

You say that there is a chain and target by that name, but in the output above, there is not. Your command is an instruction to delete from the chain WiFiDog_eth1_Outgoing, in the mangle table, the rule

-s 192.168.1.254 -m mac --mac-source 00:24:E8:B6:18:A2 -j MARK --set-mark 2

but according to your iptables -L output, there are no rules in the chain WiFiDog_eth1_Outgoing, in the mangle table. iptables therefore quite rightly complains that it cannot delete the rule from that chain and table, because it doesn't exist.

You might want to consider not duplicating a chain name across multiple tables - it seems likely to lead to confusion!

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.