7

How Can I configure a "catch all" filter with tc filter?

I tested with the following code but it gave me the error: "Unknown filter "1:100", hence option "protocol" is unparsable":

tc filter add dev $IF_LAN parent 1:100 protocol ip prio 7 flowid 1:190

Thanks in advance.

Diosney
  • 305
  • 5
  • 12

2 Answers2

5

Give something like this a try for a catch-all

tc filter add dev $IF_LAN parent 1: protocol ip prio 7 u32 match ip dst 0.0.0.0/0 flowid 1:190
paulos
  • 1,694
  • 9
  • 12
4

The question is rather old, but just in case someone comes across a similar problem.

Parameter all can be used for protocol instead of ip to also filter for other traffic like arp.

tc filter add dev $IF_LAN parent 1: protocol all prio 7 u32 match u32 0 0 flowid 1:190

Also match u32 0 0 is a shorter expression to filter all traffic.

the
  • 141
  • 1