Nethsecurity Limit Specific Host Bandwidth

Hi everyone

I have the necessity to limit the upload bandwidth for specific host in the LAN. To avoid saturating the upload bandwidth, is there a way to accomplish that?
Thanks.

It’s possibile on old NethSecurity 7, it’s not possibile fon NethSecurity 8 because it should not be needed.
The QoS gives higher priority to the most important traffic/host without really limiting the bandwidth: if no one is using the bandwidth, just give it the low priority host, if someone else need it, the low priority host just wait.

But you could eventually give less priority to an host by setting a custom DSCP.
NethSecurity uses qosify which woks well but it’s very very poorly documented.
I’m not an expert of qosify, but I spent some time to make it working.

  1. Add the host rule:

    echo -e '192.168.1.11\tbulk' > /etc/qosify/custom.conf
    

    This creates a small rule file that gives 192.168.1.11 the “bulk” priority.
    (if you add the + sign like +bulk, means “only set this if the packet has no DSCP already”.)

  2. Make sure QoS is enabled on LAN interface: you can do it from the UI.

  3. Load the new rule and reload qosify:

    /etc/init.d/qosify restart
    
  1. Quick checks

    Confirm the rule is loaded:

    ubus call qosify dump | grep 192.168.1.11
    

    Do some traffic from the host and see classification stats:

    ubus call qosify get_stats
    

    or

    qosify-status
    

Important: to match traffic “leaving from” a LAN host QoSify needs the LAN interface enabled (ingress), because ingress rules match the source IP. If you want to match a destination DNS or IP on the WAN, configuring the QoS in the WAN is enough

Hope this helps

3 Likes

Hi in the documentation seems this function QoS on nethsecurity 8 dinamically set this priority based on which host need bandwidth so as you said is for avoid to configure a bandwidht limite, i setup by put 10% lower for both Down and Up, let see if it works.
Thanks