this post was submitted on 01 Sep 2025
11 points (100.0% liked)
Programming
14479 readers
1 users here now
All things programming and coding related. Subcommunity of Technology.
This community's icon was made by Aaron Schneider, under the CC-BY-NC-SA 4.0 license.
founded 2 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
Should be easier to block them by ASN instead of IP. That way you can control ipv6 connections too.
But if you don't do business with the UK, I wonder if you are allowed to ignore them?
So is it only me, or wouldn't it be possible to write a script that 1. gets the ASN list from some place like here https://bgpview.io/reports/countries/GB and then 2. queries the list of IP ranges from here https://www.enjen.net/asn-blocklist/index.php?asn=&type=iplist and 3. commits that to a repository on Github or such, and the script could be rerun every two weeks or so? It seems like there are no terms of use attached to any of these two services that forbid this, but does anybody know?
Theoretically, you could do it in real-time and cache it.
I think it would be important to check the API rules of w/e service you're using.
https://www.enjen.net/asn-blocklist/readme.php#api
Some CDNs I believe can already do it like cloudflare. But I havn't tested it myself, but I have seen ASN block pages through them in the past.
Real time is a privacy risk.
That was what I was wondering about above. For Bgpview I can't find much.