I can find a lot of examples on how to classify traffic for QoS using TOS and DCSP, but I can't seem to find examples which filter based on the QoS values set.
What I want to do is drop all traffic unless the DCSP flag is set to one.
I can find a lot of examples on how to classify traffic for QoS using TOS and DCSP, but I can't seem to find examples which filter based on the QoS values set.
What I want to do is drop all traffic unless the DCSP flag is set to one.
There is an iptables module dscp
that seems to do what you need. If you don't have any rules in current iptables setup, you can do something like:
iptables -A FORWARD -m dscp --dscp 1 -j ACCEPT
iptables -A FORWARD -j DROP
You may need to allow RELATED
, ESTABLISHED
traffic also. The above rules are applied to FORWARD
chain. You can do similarly for INPUT
or OUTPUT
chains if required.