Skip to contentSkip to conversation

Adding a rule with invalid interface name

DISCUSSION Swapnil Nagle 2 participants 2 messages Sep 16, 2004 netfilter

lore
Share & tools
lore
#0 lore raw

iptables lets me add a rule with invalid interface name :

# iptables -A FORWARD -i abc -o xyz -j ACCEPT

This is the actual command. "abc" & "xyz" are not the obfuscated versions of some real interface names.

# iptables -L

Chain INPUT (policy ACCEPT)
target prot opt source destination

Chain FORWARD (policy ACCEPT)

target     prot opt source               destination
ACCEPT     all  --  anywhere             anywhere

Chain OUTPUT (policy ACCEPT)
target prot opt source destination

iptables version is 1.2.7a running on a stock RedHat 9 kernel (2.4.20-6)

Regards,
Swapnil.

#1 lore raw
Quoted 4 lines · Swapnil Nagle

iptables lets me add a rule with invalid interface name :

# iptables -A FORWARD -i abc -o xyz -j ACCEPT

How is iptables supposed to know that you won't at some point down the line bring up an interface called 'abc' or 'xyz'?

Nothing invalid about iptables allowing you to add this rule...

Phil