
Write A Caddy Plugin For ASN Based Whitelist
I'm looking for someone who can write a Caddy plugin that can implement blocking by ASN.
ASNs are Autonomous System Numbers and you can find out more info about them here: https://www.arin.net/resources/guide/asn/.
The general way that this system should function:
Upon startup of caddy(and on a refresh interval) all the IPs announced by a particular ASN should get refreshed. BGP.Tools has an api which can get this data, but being able to support multiple ways to get this data would be great.
curl https://bgp.tools/table.jsonl -A "Your Name <your@email.com> Thanks for BPG.Tools :)" -s | grep 400587
Here we are looking for ips originated by AS400587. The ASN should be configurable. If the incoming request comes from an IP that's not on the list, the request should be dropped.
Configuration via caddyfile is a must, and via the JSON API on caddy would be a nice to have.
For caddyfile we would like something like the following for allowing access:
allow_asn 400587 395887
With multiple ASNs allowed. Feel free to ask more in the comments.
This is a post created on the open genie platform you can view it best on this user interface: https://genie.peakd.com/@rishi556/write-a-caddy-plugin-for-asn-based-whitelist-1715725805525
Leave Write A Caddy Plugin For ASN Based Whitelist to:
Read more #programming posts
Best Posts From Live A Life You Will Remember
We have not curated any of rishi556's posts yet. But you can encourage our curation team to review posts by visiting them regularly and by referring other readers. Because we give priority to frequently read content.
More Posts From Live A Life You Will Remember
- Visiting The Not So Grand Canyon
- Slaying The Spire
- Steam Summer Sale Games
- Clicker Heros Achievement Progress Update - Where It Gets Hard
- Clicker Heros Achievement Progress Update - 2 Weeks In
- New Idler To Get All Achievements In - Clicker Heros
- Authentik Magic
- 100% Achievements On My First Steam Game
- Updates To YouAreTheHost.com
- Trilium Notes