Add ASN blocking documentation and configuration guides

- Add manage/asnblocking.mdx documentation page covering ASN-based access control
  - Explains benefits of blocking by Autonomous System Number
  - Documents common ASNs (cloud providers, ISPs, VPN services, CDNs)
  - Provides configuration patterns for VPN/proxy blocking, datacenter filtering
  - Includes manual ASN entry support and ASN lookup resources

- Add self-host/advanced/enable-asnblocking.mdx setup guide
  - Documents GeoLite2-ASN database installation steps
  - Includes config.yml parameter (maxmind_asn_db_path)
  - Mirrors enable-geoblocking.mdx structure for consistency

- Update docs.json navigation
  - Add asnblocking to Access Control group (after geoblocking)
  - Add enable-asnblocking to Advanced Configuration section

- Update self-host/community-guides/geolite2automation.mdx
  - Add GeoLite2-ASN to GEOIPUPDATE_EDITION_IDS
  - Add maxmind_asn_path configuration example
  - Update text to reference both geoblocking and ASN blocking features
This commit is contained in:
Thomas Wilde
2025-12-21 22:59:09 -07:00
committed by Owen Schwartz
parent 14255a6b74
commit 0ec73abcf3
5 changed files with 193 additions and 11 deletions

View File

@@ -0,0 +1,65 @@
---
title: "Enable ASN Blocking"
description: "Configuration requirements to enable ASN blocking in Pangolin"
---
To enable ASN blocking in Pangolin Community you must download and place the Maxmind ASN database into the `config/` directory and update the config file. This can be done for free.
<Tip>
Remember to keep the ASN database updated regularly, as ASN assignments and network mappings can change over time. You can just repeat the download and extraction steps periodically to ensure your database is current.
</Tip>
<Tip>
It is possible to automate this process with a Docker container from Maxmind themself.
Have a look at this [Community guide](/self-host/community-guides/geolite2automation) on how to implement this!
</Tip>
You can use the installer to download and place the database for you, just grab the latest installer:
```bash
curl -fsSL https://static.pangolin.net/get-installer.sh | bash
```
Then run the installer again:
```bash
./installer
```
### Manual Installation Steps
<Steps>
<Step title="Download and extract the ASN database">
Download and extract the GeoLite2 ASN database using the following commands:
```bash
# Download the GeoLite2 ASN database
curl -L -o GeoLite2-ASN.tar.gz https://github.com/GitSquared/node-geolite2-redist/raw/refs/heads/master/redist/GeoLite2-ASN.tar.gz
# Extract the database
tar -xzf GeoLite2-ASN.tar.gz
# Move the .mmdb file to the config directory
mv GeoLite2-ASN_*/GeoLite2-ASN.mmdb config/
# Clean up the downloaded files
rm -rf GeoLite2-ASN.tar.gz GeoLite2-ASN_*
```
</Step>
<Step title="Update the Pangolin config file">
Update your Pangolin configuration to point to the new ASN database file. Edit your `config/config.yml` file to include the following entry:
```yaml
server:
maxmind_asn_db_path: "./config/GeoLite2-ASN.mmdb"
```
</Step>
<Step title="Restart Pangolin">
Restart your Pangolin instance to apply the changes:
```bash
docker compose restart pangolin
```
</Step>
</Steps>
Alternativly you can create an account at [Maxmind](https://www.maxmind.com/en/geolite2/signup) to get a license key and download the database directly from them.

View File

@@ -1,13 +1,13 @@
---
title: "GeoLite2 Automation"
description: "A simple automation to download & update your GeoLite2 database with geoipupdate"
description: "A simple automation to download & update your GeoLite2 databases with geoipupdate"
---
<Note>
This is a community guide and is not officially supported. If you have any issues, please reach out to the [author](https://github.com/txwgnd).
</Note>
This automation lets your system automatically download & upgrade the `GeoLite2-Country` database from Maxmind to use for geoblocking on your Pangolin host. It's utilizing Maxmind's [geoipupdate](https://github.com/maxmind/geoipupdate/tree/main) Docker container to achieve this.
This automation lets your system automatically download & upgrade the `GeoLite2-Country` and `GeoLite2-ASN` databases from Maxmind to use for geoblocking and ASN blocking on your Pangolin host. It's utilizing Maxmind's [geoipupdate](https://github.com/maxmind/geoipupdate/tree/main) Docker container to achieve this.
Maxmind's service is free of charge for development, personal or community use. [Quote](https://support.maxmind.com/knowledge-base/articles/create-a-maxmind-account#h_01G4G4NG5C63BQ6HRG6MSS50T3)
@@ -23,7 +23,7 @@ Maxmind's service is free of charge for development, personal or community use.
* Pangolin version 1.11.0 or higher
## 2. Maxmind Account
To be able to use Maxmind's service you need to request access to the GeoLite2 database and create an account on their [website](https://www.maxmind.com/en/geolite2/signup?utm_source=kb&utm_medium=kb-link&utm_campaign=kb-create-account).
To be able to use Maxmind's service you need to request access to the GeoLite2 databases and create an account on their [website](https://www.maxmind.com/en/geolite2/signup?utm_source=kb&utm_medium=kb-link&utm_campaign=kb-create-account).
After you successfully created an account visit the mainpage again and login to your new account.
@@ -72,10 +72,10 @@ services:
image: ghcr.io/maxmind/geoipupdate
restart: unless-stopped
environment:
- 'GEOIPUPDATE_ACCOUNT_ID=' # Account ID
- 'GEOIPUPDATE_LICENSE_KEY=' # API key
- 'GEOIPUPDATE_EDITION_IDS=GeoLite2-Country' # Which db should be downloaded
- 'GEOIPUPDATE_FREQUENCY=72' # Update intervall in hours
- 'GEOIPUPDATE_ACCOUNT_ID=' # Account ID
- 'GEOIPUPDATE_LICENSE_KEY=' # API key
- 'GEOIPUPDATE_EDITION_IDS=GeoLite2-Country GeoLite2-ASN' # Which dbs should be downloaded
- 'GEOIPUPDATE_FREQUENCY=72' # Update intervall in hours
volumes:
- './config/GeoLite2:/usr/share/GeoIP'
```
@@ -91,13 +91,14 @@ Navigate to `/config` within the same folder and open it with a text editor.
cd config
```
Add this line to the `server` object
Add these lines to the `server` object
```yaml
server:
maxmind_db_path: "./config/GeoLite2/GeoLite2-Country.mmdb"
maxmind_asn_path: "./config/GeoLite2/GeoLite2-ASN.mmdb"
```
This entry tells the Pangolin application where to find the database.
These entries tell the Pangolin application where to find the databases.
Save and close the file then navigate to the `pangolin` folder one level higher.
@@ -106,6 +107,6 @@ Restart your Pangolin stack with:
docker compose up -d
```
Et voilà, you are now able to define country rules for your ressources! 🏁
Et voilà, you are now able to define country rules and ASN rules for your ressources! 🏁
btw: you can use this exact database for your Traefik dashboard too -> [Community Guide](/self-host/community-guides/traefiklogsdashboard)
btw: you can use these exact databases for your Traefik dashboard too -> [Community Guide](/self-host/community-guides/traefiklogsdashboard)