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) Commented Nov 1, 2019 at 14:22

0

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.