How to limit bandwidth for PS4?

Started by hushcoden, June 07, 2020, 08:21:51 PM

Previous topic - Next topic
June 07, 2020, 08:21:51 PM Last Edit: June 08, 2020, 11:20:41 PM by hushcoden
I'm trying to limit the Up/Down bandwidth for my kid's PS4 and this is what I did:

1) creating 2x pipes: up=5Mbs and down=10Mbs

2) creating rules: here I'm a bit confused when it comes to chose 'source' and 'destination', please see picture: is that right? 192.168.10.1 is the PS4 address

3) also, not sure if protocol should be ip or ipv4 ??

4) lastly, what about queues ? do I have to create those too ?

Can someone please advise if this is the right route or I should look elsewhere ?

Tia.

It seems not working, as in the status tab I can't see any activity.

Is anybody willing to help?

Tia.

yes, unplug the ps4, that should reduce the bandwidth it uses. ::)


sorry couldn't resist...
OPNsense 24.7 - Qotom Q355G4 - ISP - Squirrel 1Gbps.

Team Rebellion Member

Joking apart, I'd really appreciate some sort of help...

June 09, 2020, 12:16:44 PM #4 Last Edit: June 09, 2020, 12:18:29 PM by marjohn56
OK, never used traffic shaper before so it's a complete newbie for me.


First I followed the instructions here: https://docs.opnsense.org/manual/how-tos/shaper_limit_per_user.html


This is only going to work with IPv4. The problem I see with v6 is that by default v6 will change addresses every time your PS4 connects, so almost impossible to manage; however with V4 it works perfectly. I'll play with some IPv6 stuff, but cannot see how you can limit it without assigning static IPv6 addresses, and I don't know how a PS4 obtains it's v6 addresses, could be dhcpv6 or SLAAC. I should add that if V6 is enabled on my PC, it uses that and bypasses the limiter!


I created two pipes, limiting the bandwidth to 1Mbps, in one pipe I set the mask to destination, in pipe 2 I set the mask to source.


Now create the rules as it says in the doc. Two rules, one for in and one for out. First rule, Interface WAN, Source Any, Src-port Any, Destination - The IP address of the device to limit. Target is the first pipe.


Create a second rule, this is for outbound. Interface is LAN, proto I have set to ip,  Source is the IP address of the device to limit, Src-prt any, Destination any, Dst-prt any, Target is the second pipe.


That works and my speeds tests on my PC were limited to 1Mbps in either direction.
OPNsense 24.7 - Qotom Q355G4 - ISP - Squirrel 1Gbps.

Team Rebellion Member

Thanks and good to see that's how I did configure it (see my pictures on first post) and no need to configure queues.

If you say it worked, can you see the columns 'packets' and 'bytes' being populated as in my case I see 0 ? Or any other way to test it ?

Also, (as per my last picture) the column 'accessed' has a date of 01-01-1970 which I find a bit weird...

You mean this?


OPNsense 24.7 - Qotom Q355G4 - ISP - Squirrel 1Gbps.

Team Rebellion Member

Regarding IPv6, the only way I can see of it working easily is to create a separate VLAN for the PS4, with its own AP or wired connection. Perhaps someone else can come up with another way around the IPv6 problem as I see it.
OPNsense 24.7 - Qotom Q355G4 - ISP - Squirrel 1Gbps.

Team Rebellion Member

Thanks, so I can see from your screenshot that it works, but for me it doesn't...  >:(

IPv6 not an issue as I don't have it.

So, now I need to understand how to troubleshoot this, really tricky for me... My OPNsense box has three ports: WAN, LAN and LAN2 and the PS4 is the only device attached to LAN2, any further suggestions?

Well as my tag says, I am on 20.7b, but I'll load up 20.1 instance and see what happens.
OPNsense 24.7 - Qotom Q355G4 - ISP - Squirrel 1Gbps.

Team Rebellion Member

OK... I just created a new VM, setup was basic, just the defaults. V4 only on WAN and LAN. Checked that I had got Internet activity on it and did an update from the shell to the latest release.


Created the pipes and rules, hey presto worked immediately, date/time is all correct.
OPNsense 24.7 - Qotom Q355G4 - ISP - Squirrel 1Gbps.

Team Rebellion Member

Thanks man, much appreciated ! Start to think my little boy is actually hacking my OPNsense box somehow  ;D

Lastly, assuming it's working  8)  am I right to say that is a dynamic bandwidth limitation, i.e. when that host/IP is not online those pipes & rules are dormant ?

yup.. if the ip being limited is not there, then there should be no traffic on the pipes.
OPNsense 24.7 - Qotom Q355G4 - ISP - Squirrel 1Gbps.

Team Rebellion Member