1

Traffic from eth0 arriving from gateway should be sent to ifb0 for ingress shaphing. Here some relevant outputs and commands

ip route
default via 192.168.0.1 dev eth0 metric 200 realm 1

What principally works (but also redirecting local traffic, which should not be shaped)

sudo tc filter add dev eth0 parent ffff: protocol ip u32 match u32 0 0 action mirred egress redirect dev ifb0

So basically setup is working.

Now I try with

sudo tc filter add dev eth0 parent ffff: protocol ip route from 1 action mirred egress redirect dev ifb0

But this isn't working. Traffic isn't routed to ifb0. Whats the correct syntax to route all traffic from gateway to ifb0. On creating this rule I was refering to https://www.tldp.org/HOWTO/Adv-Routing-HOWTO/lartc.adv-filter.route.html

Thanks for help.

1
  • I know this won't be generic like your intended method that is unexpectedly ignoring the route realm parameter (I can only witness the same), but you can still choose to not match the LAN by inserting an exclusion rule using the right pref/prio (or by using the not operator in the basic filter module instead of the u32 filter module) – A.B Nov 1 '19 at 14:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.