Pfsense slowing down Connections

Posted on Tuesday, January 26, 2021


 


I have an issue…
I do not have unlimited bandwidth at home … yet.  And this month with all the teleconferencing at home work and all the videos my family has been watching we are about to go over our monthly allotment. 

Which is kinda freaky!  My current internet provider has a monthly limit of 1.2 TiB.  Who would have thought my family could use that much data in a month…

But we have, or very nearly have.


So I thought… Maybe I can find a simple way to fix this in pfsense…
to maybe limit the bandwidth somehow… maybe cut off my daughters access to hulu ?



At any rate for my first go I found this interesting article https://smarthomepursuits.com/how-to-limit-bandwidth-in-pfsense/ [1]

Where he uses Traffic Shapers and Firewall rules to limit the bandwidth.

 

I am going to try it out J

 

 


 

Let’s create some Traffic Shapers

 

OK log in to your PfSense and select Traffic Shaper from the Firewall Menu.

 


 

 



 

 

Click on Limiters then click on + New Limiter


I need to set up a limiter for upload and a limiter for download.  I happen to have two separate LAN set ups in PfSense one for my “Public” LAN and one for my Private so I need to set up 4 limiters (2 per LAN)

 



 

·         Checkbox the “Enable Limiter and its children”

·         Give it a name I set this one to “private_up_5_MiB”

·         Set the bandwidth in this case I set it to 5 Mbit/s

 



 

Scroll to the bottom and click Save

 

I repeated this process 3 more time and made the following Limiters.

 

  • private_up_5_MiB
  • private_down_10_MiB
  • public_up_1_MiB
  • public_down_5_MiB




 

Finally click on “Apply change”

 

Now onto firewall rules

 


 

Firewall rules

 

 


 

From the firewall menu select Rules.

 

Now stop!  Before you go any further let’s run a speed test and see how your network is doing.

Go to google.com and search for speed test or just open this link https://www.google.com/search?q=speed+test


 

 


Click on Run Speed Test.

 






 

You can see in my case I am getting 300 MiB/s.

Now let’s slow it down!


 


 

Select your LAN (I happen to have two) and click Add

 



 

Change Protocol to any.


 


 

Click on Display Advanced

 

 

Set the Up and down settings and click Save.


 

 


Apply the changes.

 

Note: It may take a few seconds for the changes to be applied.
IF you don’t see a change give it a minute.

 

 


Now test the speed again

https://www.google.com/search?q=speed+test

 

 


 


 

 

Wahoo it worked.

 


 

Understanding what is going on…

 

Basically I have said that anyone who connects to my private LAN can go no faster than 10/5.   But that is for each device.  So if I am pegging 10 on my box it does not affect my wife’s laptop who can also peg 10 at the same time.

 

 

Other thoughts reading https://pfsense-docs.readthedocs.io/en/latest/trafficshaper/limiters.html [2] you can see that you cannot apply this to the WAN… only to LANS.


So  you cannot use this method to easily limit the entire bandwidth.
Oh… well it does not work in pfsense 2.2 or 2.3 but does work in 2.4

 

If you have 2.4 or later and want to set up the WAN bandwidth limit go check out this video https://youtu.be/iXqExAALzR8 [3]

 


 

References

 

[1]        How to Limit Bandwitdh in PfSends (by Danny)

https://smarthomepursuits.com/how-to-limit-bandwidth-in-pfsense/
Accessed 01/2020

[2]        Using Limiters to Restrict Bandwidth Usage

https://pfsense-docs.readthedocs.io/en/latest/trafficshaper/limiters.html
Accessed 01/2020

[3]        How To Solve pfsense Bufferbloat With A CodelQ / FQ_Codel Limiter in 2.4.4

https://youtu.be/iXqExAALzR8
Accessed 01/2020

 

 

 

 

No comments:

Post a Comment