Tun0+ iptables rule

firewalliptables

I'm trying to figure out what that + sign means in a rule such as this:

-A FORWARD -i tun0+ -j ACCEPT

I'm pretty positive it relates to vpn. I noticed a /dev/net/tun interface and a tun0 in ifconfig, but for the sake of thoroughness, I want to know about that + sign. Anyone know anything?

Best Answer

From here: To match all interfaces of a type, use the plus sign such as eth+.

And yes, the "+" sign means here just as "*" in pattern matching or ".*" in regexps.

This rule is false, the + is unneeded, although it don't even harms (because a tunnel named tun01 or tun05 are very unlikely). The developer of this script wanted to write probably only tun+.

Related Question