Use RIPEstat for ASN announced prefixes
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
# netflix-asn
|
||||
|
||||
A small **Python utility** that fetches IPv4/IPv6 prefixes announced by one or more ASNs (via the [BGPView API](https://bgpview.io/api)) and ensures those prefixes are present in a MikroTik **IP firewall address-list**.
|
||||
A small **Python utility** that fetches IPv4/IPv6 prefixes announced by one or more ASNs (via the [RIPEstat API](https://stat.ripe.net/)) and ensures those prefixes are present in a MikroTik **IP firewall address-list**.
|
||||
|
||||
It’s designed to run inside **Docker** — using a `Dockerfile` and `docker-compose.yml`.
|
||||
|
||||
@@ -68,9 +68,11 @@ ADDRESS_LIST_NAME=Netflix
|
||||
|
||||
1. The script loads configuration from environment variables.
|
||||
2. For each ASN, it queries:
|
||||
|
||||
```text
|
||||
https://stat.ripe.net//data/announced-prefixes/data.json?resource=<ASN>"
|
||||
```
|
||||
https://api.bgpview.io/asn/<ASN>/prefixes
|
||||
```
|
||||
|
||||
3. It collects all IPv4/IPv6 prefixes and removes duplicates.
|
||||
4. Connects to the MikroTik API using [`librouteros`](https://pypi.org/project/librouteros/).
|
||||
5. For each prefix:
|
||||
|
||||
Reference in New Issue
Block a user