mirror of
https://github.com/fosrl/docs-v2.git
synced 2026-10-21 03:59:16 +02:00
enhance(geo): reduce confusion between setup and usage
This commit is contained in:
@@ -0,0 +1,77 @@
|
||||
---
|
||||
title: "Enable ASN Lookup"
|
||||
description: "Configuration requirements to enable ASN lookup features in Pangolin"
|
||||
---
|
||||
|
||||
import PangolinCloudTocCta from "/snippets/pangolin-cloud-toc-cta.mdx";
|
||||
|
||||
<PangolinCloudTocCta />
|
||||
|
||||
Pangolin uses an ASN database to map request IP addresses to autonomous systems, such as cloud providers, residential ISPs, VPN providers, and corporate networks. That ASN data powers ASN access rules and ASN blocking patterns.
|
||||
|
||||
To enable ASN lookup features in Pangolin self-hosted, download the MaxMind ASN database, place it in the `config/` directory, and point Pangolin at the database 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>
|
||||
You can automate this process with a MaxMind Docker container. See the [GeoLite2 Automation community guide](/self-host/community-guides/geolite2automation) for an example.
|
||||
</Tip>
|
||||
|
||||
## Install with the Installer
|
||||
|
||||
You can use the installer to download and place the database for you. Download the latest installer:
|
||||
|
||||
```bash
|
||||
curl -fsSL https://static.pangolin.net/get-installer.sh | bash
|
||||
```
|
||||
|
||||
Then run the installer again:
|
||||
|
||||
```bash
|
||||
./installer
|
||||
```
|
||||
|
||||
## Manual Installation
|
||||
|
||||
<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 `config/config.yml` to include the following entry:
|
||||
|
||||
```yaml
|
||||
server:
|
||||
maxmind_asn_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>
|
||||
|
||||
Alternatively, 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.
|
||||
|
||||
<Note>
|
||||
After the ASN lookup database is enabled, use [access control rules](/manage/access-control/rules) or the [ASN Blocking](/manage/asnblocking) guide to create blocking or allow rules.
|
||||
</Note>
|
||||
@@ -1,71 +0,0 @@
|
||||
---
|
||||
title: "Enable ASN Blocking"
|
||||
description: "Configuration requirements to enable ASN blocking in Pangolin"
|
||||
---
|
||||
|
||||
import PangolinCloudTocCta from "/snippets/pangolin-cloud-toc-cta.mdx";
|
||||
|
||||
<PangolinCloudTocCta />
|
||||
|
||||
|
||||
|
||||
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_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>
|
||||
|
||||
Alternatively 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.
|
||||
+21
-15
@@ -7,31 +7,33 @@ import PangolinCloudTocCta from "/snippets/pangolin-cloud-toc-cta.mdx";
|
||||
|
||||
<PangolinCloudTocCta />
|
||||
|
||||
Pangolin uses a GeoIP database to map request IP addresses to approximate locations. That location data powers multiple features, including country and region access rules, geo-blocking patterns, and analytics.
|
||||
|
||||
|
||||
Pangolin uses a geolocation database for several geolocation features like geoblocking and analytics. To enable geolocation features in Pangolin self-hosted, you must download and place the Maxmind geoip database into the `config/` directory and update the config file. This can be done for free.
|
||||
To enable geo-location features in Pangolin self-hosted, download a MaxMind GeoIP database, place it in the `config/` directory, and point Pangolin at the database file. This can be done for free.
|
||||
|
||||
<Tip>
|
||||
Remember to keep the GeoIP database updated regularly, as IP-to-country 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!
|
||||
You can automate this process with a MaxMind Docker container. See the [GeoLite2 Automation community guide](/self-host/community-guides/geolite2automation) for an example.
|
||||
</Tip>
|
||||
|
||||
You can use the installer to download and place the database for you, just grab the latest installer:
|
||||
## Install with the Installer
|
||||
|
||||
You can use the installer to download and place the database for you. Download the latest installer:
|
||||
|
||||
```bash
|
||||
curl -fsSL https://static.pangolin.net/get-installer.sh | bash
|
||||
```
|
||||
|
||||
```bash
|
||||
curl -fsSL https://static.pangolin.net/get-installer.sh | bash
|
||||
```
|
||||
Then run the installer again:
|
||||
|
||||
```bash
|
||||
./installer
|
||||
```
|
||||
```bash
|
||||
./installer
|
||||
```
|
||||
|
||||
### Manual Installation Steps
|
||||
## Manual Installation
|
||||
|
||||
<Steps>
|
||||
<Step title="Download and extract the GeoIP database">
|
||||
@@ -52,7 +54,7 @@ Then run the installer again:
|
||||
```
|
||||
</Step>
|
||||
<Step title="Update the Pangolin config file">
|
||||
Update your Pangolin configuration to point to the new GeoIP database file. Edit your `config/config.yml` file to include the following entry:
|
||||
Update your Pangolin configuration to point to the new GeoIP database file. Edit `config/config.yml` to include the following entry:
|
||||
|
||||
```yaml
|
||||
server:
|
||||
@@ -63,9 +65,13 @@ Then run the installer again:
|
||||
Restart your Pangolin instance to apply the changes:
|
||||
|
||||
```bash
|
||||
docker compose restart pangolin
|
||||
docker compose restart pangolin
|
||||
```
|
||||
</Step>
|
||||
</Steps>
|
||||
|
||||
Alternatively, 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.
|
||||
Alternatively, 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.
|
||||
|
||||
<Note>
|
||||
After the geo-location database is enabled, use [access control rules](/manage/access-control/rules) or the [Geo-blocking](/manage/geoblocking) guide to create blocking or allow rules.
|
||||
</Note>
|
||||
Reference in New Issue
Block a user