OPNsense Forum

English Forums => General Discussion => Topic started by: hushcoden on June 07, 2020, 08:21:51 PM

Title: How to limit bandwidth for PS4?
Post by: hushcoden on June 07, 2020, 08:21:51 PM
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.
Title: Re: How to limit bandwidth for PS4?
Post by: hushcoden on June 08, 2020, 09:05:16 PM
It seems not working, as in the status tab I can't see any activity.

Is anybody willing to help?

Tia.
Title: Re: How to limit bandwidth for PS4?
Post by: marjohn56 on June 08, 2020, 09:09:34 PM
yes, unplug the ps4, that should reduce the bandwidth it uses. ::)


sorry couldn't resist...
Title: Re: How to limit bandwidth for PS4?
Post by: hushcoden on June 09, 2020, 11:12:13 AM
Joking apart, I'd really appreciate some sort of help...
Title: Re: How to limit bandwidth for PS4?
Post by: marjohn56 on June 09, 2020, 12:16:44 PM
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 (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.
Title: Re: How to limit bandwidth for PS4?
Post by: hushcoden on June 09, 2020, 12:50:19 PM
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...
Title: Re: How to limit bandwidth for PS4?
Post by: marjohn56 on June 09, 2020, 02:56:44 PM
You mean this?


(https://i.ibb.co/8DSkB2Q/shaper.png) (https://ibb.co/RpV8SPJ)
Title: Re: How to limit bandwidth for PS4?
Post by: marjohn56 on June 09, 2020, 03:01:34 PM
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.
Title: Re: How to limit bandwidth for PS4?
Post by: hushcoden on June 09, 2020, 04:01:30 PM
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?
Title: Re: How to limit bandwidth for PS4?
Post by: marjohn56 on June 09, 2020, 05:11:13 PM
Well as my tag says, I am on 20.7b, but I'll load up 20.1 instance and see what happens.
Title: Re: How to limit bandwidth for PS4?
Post by: marjohn56 on June 09, 2020, 05:46:27 PM
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.
Title: Re: How to limit bandwidth for PS4?
Post by: hushcoden on June 09, 2020, 06:07:36 PM
Thanks man, much appreciated ! Start to think my little boy is actually hacking my OPNsense box somehow  ;D
Title: Re: How to limit bandwidth for PS4?
Post by: hushcoden on June 09, 2020, 06:33:07 PM
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 ?
Title: Re: How to limit bandwidth for PS4?
Post by: marjohn56 on June 09, 2020, 07:21:23 PM
yup.. if the ip being limited is not there, then there should be no traffic on the pipes.