Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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?

share|improve this question

1 Answer 1

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!

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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