mirror of
https://github.com/fosrl/docs-v2.git
synced 2026-02-21 04:16:43 +00:00
Merge pull request #61 from LaurenceJJones/warn-remove-old-geoblock-plugin
enhance(geoblock): Warning for legacy method
This commit is contained in:
@@ -172,6 +172,7 @@
|
|||||||
"group": "Community Guides",
|
"group": "Community Guides",
|
||||||
"pages": [
|
"pages": [
|
||||||
"self-host/community-guides/overview",
|
"self-host/community-guides/overview",
|
||||||
|
"self-host/community-guides/remove-geoblock-plugin",
|
||||||
"self-host/community-guides/crowdsec",
|
"self-host/community-guides/crowdsec",
|
||||||
"self-host/community-guides/metrics",
|
"self-host/community-guides/metrics",
|
||||||
"self-host/community-guides/homeassistant",
|
"self-host/community-guides/homeassistant",
|
||||||
|
|||||||
@@ -88,4 +88,3 @@ Priority 4: Deny - Country: ALL
|
|||||||
```
|
```
|
||||||
|
|
||||||
This configuration allows access only from the US, Canada, and UK while blocking all other countries.
|
This configuration allows access only from the US, Canada, and UK while blocking all other countries.
|
||||||
|
|
||||||
|
|||||||
@@ -6,6 +6,10 @@ title: "GeoBlock"
|
|||||||
This is a community guide and is not officially supported. If you have any issues, please reach out to the [author](https://github.com/Lokowitz).
|
This is a community guide and is not officially supported. If you have any issues, please reach out to the [author](https://github.com/Lokowitz).
|
||||||
</Note>
|
</Note>
|
||||||
|
|
||||||
|
<Warning>
|
||||||
|
Legacy guide. Pangolin now supports native geoblocking. If you previously installed this plugin, follow [Remove GeoBlock Plugin](/self-host/community-guides/remove-geoblock-plugin) before enabling native geoblocking.
|
||||||
|
</Warning>
|
||||||
|
|
||||||
GeoBlock is a Traefik middleware that uses IP-based geolocation to allow or block traffic from specific countries. It helps enhance security and access control by restricting unwanted or potentially harmful connections based on geographic regions.
|
GeoBlock is a Traefik middleware that uses IP-based geolocation to allow or block traffic from specific countries. It helps enhance security and access control by restricting unwanted or potentially harmful connections based on geographic regions.
|
||||||
|
|
||||||
## Installation
|
## Installation
|
||||||
|
|||||||
@@ -28,6 +28,10 @@ For additional information, consult the following resources:
|
|||||||
|
|
||||||
The GeoBlock plugin for Traefik is a middleware that restricts access based on the client’s geographic location. It runs within a Traefik container and uses IP-based geolocation to allow or block traffic from specific countries. This is useful for security, compliance, or access control in Traefik-managed services.
|
The GeoBlock plugin for Traefik is a middleware that restricts access based on the client’s geographic location. It runs within a Traefik container and uses IP-based geolocation to allow or block traffic from specific countries. This is useful for security, compliance, or access control in Traefik-managed services.
|
||||||
|
|
||||||
|
<Note>
|
||||||
|
Pangolin now supports native geoblocking. The GeoBlock plugin is considered legacy in Pangolin setups. If you previously installed it, follow [Remove GeoBlock Plugin](/self-host/community-guides/remove-geoblock-plugin) before enabling native geoblocking.
|
||||||
|
</Note>
|
||||||
|
|
||||||
For more details, please refer to the following resources:
|
For more details, please refer to the following resources:
|
||||||
|
|
||||||
- [Github Repository](https://github.com/PascalMinder/geoblock)
|
- [Github Repository](https://github.com/PascalMinder/geoblock)
|
||||||
@@ -69,4 +73,3 @@ The Traefik Logs Dashboard is a real-time dashboard for analyzing Traefik logs w
|
|||||||
For more details, please refer to the following resources:
|
For more details, please refer to the following resources:
|
||||||
|
|
||||||
- [Github Repository](https://github.com/hhftechnology/traefik-log-dashboard)
|
- [Github Repository](https://github.com/hhftechnology/traefik-log-dashboard)
|
||||||
|
|
||||||
|
|||||||
66
self-host/community-guides/remove-geoblock-plugin.mdx
Normal file
66
self-host/community-guides/remove-geoblock-plugin.mdx
Normal file
@@ -0,0 +1,66 @@
|
|||||||
|
---
|
||||||
|
title: "Remove GeoBlock Plugin"
|
||||||
|
---
|
||||||
|
|
||||||
|
<Note>
|
||||||
|
This is a community guide and is not officially supported. If you have any issues, please reach out to the community on [Discord](https://pangolin.net/discord) or [Github discussions](https://github.com/orgs/fosrl/discussions).
|
||||||
|
</Note>
|
||||||
|
|
||||||
|
Pangolin now supports native geoblocking. If you previously installed the Traefik GeoBlock plugin, remove it before enabling native geoblocking to avoid duplicate blocking or startup errors.
|
||||||
|
|
||||||
|
<Note>
|
||||||
|
After cleanup, follow [Enable Geo-blocking](/self-host/advanced/enable-geoblocking) to configure native geoblocking in Pangolin.
|
||||||
|
</Note>
|
||||||
|
|
||||||
|
## Remove the GeoBlock plugin
|
||||||
|
|
||||||
|
<Steps>
|
||||||
|
<Step title="Remove GeoBlock middleware references">
|
||||||
|
Remove any references to `geoblock@file` from your Traefik entry points, routers, or labels.
|
||||||
|
|
||||||
|
Example removal in `/config/traefik/traefik_config.yml`:
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
entryPoints:
|
||||||
|
websecure:
|
||||||
|
http:
|
||||||
|
middlewares:
|
||||||
|
# Remove this line
|
||||||
|
- geoblock@file
|
||||||
|
```
|
||||||
|
</Step>
|
||||||
|
<Step title="Remove the plugin definition from Traefik static config">
|
||||||
|
Delete the GeoBlock plugin block from `/config/traefik/traefik_config.yml`:
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
experimental:
|
||||||
|
plugins:
|
||||||
|
geoblock:
|
||||||
|
moduleName: github.com/PascalMinder/geoblock
|
||||||
|
version: v0.3.2
|
||||||
|
```
|
||||||
|
</Step>
|
||||||
|
<Step title="Remove the middleware configuration from dynamic config">
|
||||||
|
Delete the GeoBlock middleware section from `/config/traefik/dynamic_config.yml`:
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
http:
|
||||||
|
middlewares:
|
||||||
|
geoblock:
|
||||||
|
plugin:
|
||||||
|
geoblock:
|
||||||
|
...
|
||||||
|
```
|
||||||
|
</Step>
|
||||||
|
<Step title="Restart Traefik">
|
||||||
|
Restart Traefik to apply the changes:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
docker restart traefik
|
||||||
|
```
|
||||||
|
</Step>
|
||||||
|
</Steps>
|
||||||
|
|
||||||
|
## Next steps
|
||||||
|
|
||||||
|
Follow [Enable Geo-blocking](/self-host/advanced/enable-geoblocking) to configure native geoblocking in Pangolin.
|
||||||
Reference in New Issue
Block a user