Rate Limiting by IP?

Started by spetrillo, November 28, 2019, 12:23:13 AM

Previous topic - Next topic
Hello all,

Is there a way to rate limit IPs in OPNsense? I have three media streaming devices, each have a static IP set. I would like to limit their up/down to 100 meg. This gives my good QoS for all streaming functionality, while providing bandwidth for other tasks.

Thanks,
Steve

Ok I think I might have figured this out using the Shaper functionality. I setup a pipe for 100 meg, as shown in the first attachment. I then setup a rule for my IPs, that picks that pipe. The one question I have is that I set the interface in the rule to my WAN and set the destination to any, as shown in the second attachment. In my mind that tells OPNsense to shape the traffic coming from specific IPs, going in/out to the WAN, to 100 meg only.

Did I get this right??

November 28, 2019, 01:08:22 AM #2 Last Edit: November 28, 2019, 01:16:39 AM by mitchellp
Hey,

Typically people will setup two rules and two pipes, one for "in" direction and one for "out". There is an option for "both" directions that i assume most people don't use it because of asymmetric speeds. You need to click advanced on the rule to see the option for it.

With the pipe you have no mask set, which may or may not be what you are after. Without a mask the pipe will be shared by all who are using it. if you wanted to able to do 100 meg per device for a total of 300 meg, you could set a mask.

Other than that it looks good to me.

Also,

You will likely want to change the protocol on the rule from "tcp" to "ip", otherwise non tcp ip traffic will bypass the sharper, such as udp.

Thanks very much. I changed the items you pointed out. Now the question becomes one of how can I determine how my rules are working? Is the Status section on the Shaper the only tool?