Last active
September 24, 2024 14:45
-
-
Save m1/e5f1f190ba309b500f0a to your computer and use it in GitHub Desktop.
How to throttle the FCC to dial up modem speeds on your website using Apache.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# How to throttle the FCC to dial up modem speeds on your website using Apache. | |
# Ported from https://gist.github.com/kyledrake/e6046644115f185f7af0 | |
## The blog post that started it all: https://neocities.org/blog/the-fcc-is-now-rate-limited | |
## | |
## Current known FCC address ranges: | |
## https://news.ycombinator.com/item?id=7716915 | |
## | |
## Confirm/locate FCC IP ranges with this: http://whois.arin.net/rest/net/NET-165-135-0-0-1/pft | |
## For Apache 2.4.* and above | |
# | |
# 1) First, make sure you have Apache 2.4 or above. (In terminal: apache2 -v) | |
# | |
# 2) Enable the ratelimit module and reload apache2: sudo a2enmod ratelimit && sudo service apache2 reload | |
# | |
# 3) Copy and paste the text below into your site root .htaccess or your site .conf file: | |
<If "-R '192.133.125.0/24'"> | |
SetOutputFilter RATE_LIMIT | |
SetEnv rate-limit 28 | |
</If> | |
<ElseIf "-R '165.135.0.0/16'"> | |
SetOutputFilter RATE_LIMIT | |
SetEnv rate-limit 28 | |
</ElseIf> | |
<ElseIf "-R '192.104.54.0/24'"> | |
SetOutputFilter RATE_LIMIT | |
SetEnv rate-limit 28 | |
</ElseIf> | |
<ElseIf "-R '4.21.126.0/24'"> | |
SetOutputFilter RATE_LIMIT | |
SetEnv rate-limit 28 | |
</ElseIf> | |
<ElseIf "-R '65.125.25.64/26'"> | |
SetOutputFilter RATE_LIMIT | |
SetEnv rate-limit 28 | |
</ElseIf> | |
<ElseIf "-R '208.23.64.0/25'"> | |
SetOutputFilter RATE_LIMIT | |
SetEnv rate-limit 28 | |
</ElseIf> | |
<ElseIf "-R '2620:0:610::/48'"> | |
SetOutputFilter RATE_LIMIT | |
SetEnv rate-limit 56 | |
</ElseIf> | |
<ElseIf "-R '2600:803:230::/48'"> | |
SetOutputFilter RATE_LIMIT | |
SetEnv rate-limit 56 | |
</ElseIf> | |
## For Apache 2.2 | |
# | |
# 1) First, you need mod_bw (On Ubuntu: sudo apt-get install libapache2-mod-bw) | |
# | |
# 2) Enable mod_bw and reload apache2: sudo a2enmod bw && sudo service apache2 reload | |
# | |
# 3) Copy and paste the text below into your site .conf file in between the <VirtualHost> tags (You can't do this in .htaccess as it's unsupported by the module) | |
BandWidthModule On | |
ForceBandWidthModule On | |
BandWidth 192.133.125.0/24 28 | |
BandWidth 165.135.0.0/16 28 | |
BandWidth 192.104.54.0/24 28 | |
BandWidth 4.21.126.0/24 28 | |
BandWidth 65.125.25.64/26 28 | |
BandWidth 208.23.64.0/25 28 | |
BandWidth 2620:0:610::/48 28 | |
BandWidth 2600:803:230::/48 28 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I am, sadly, also a 2.2 user. Sooo close!