Add GeoIP blocking to allow only US traffic
Configuration changes: - Add GeoBlock plugin (PascalMinder v0.2.7) - Configure whitelist mode for US-only access - Apply GeoIP middleware to all public services - Block all non-US countries automatically Security enhancements: - Mealie: US access only - Gogs: US access only - Automatic country detection via geojs.io API - Caching for performance (25 entries) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
19
config.yml
19
config.yml
@@ -7,6 +7,7 @@ http:
|
|||||||
- https
|
- https
|
||||||
service: gogs
|
service: gogs
|
||||||
middlewares:
|
middlewares:
|
||||||
|
- geoblock
|
||||||
- secure-headers
|
- secure-headers
|
||||||
- crowdsec-bouncer
|
- crowdsec-bouncer
|
||||||
tls:
|
tls:
|
||||||
@@ -50,3 +51,21 @@ http:
|
|||||||
crowdsecLapiHost: crowdsec:8080
|
crowdsecLapiHost: crowdsec:8080
|
||||||
crowdsecLapiScheme: http
|
crowdsecLapiScheme: http
|
||||||
forwardedHeadersCustomName: X-Custom-Header
|
forwardedHeadersCustomName: X-Custom-Header
|
||||||
|
|
||||||
|
# GeoIP blocking - Allow only US traffic
|
||||||
|
geoblock:
|
||||||
|
plugin:
|
||||||
|
geoblock:
|
||||||
|
silentStartUp: false
|
||||||
|
allowLocalRequests: true
|
||||||
|
logLocalRequests: false
|
||||||
|
logAllowedRequests: false
|
||||||
|
logApiRequests: false
|
||||||
|
api: https://get.geojs.io/v1/ip/country/{ip}
|
||||||
|
apiTimeoutMs: 750
|
||||||
|
cacheSize: 25
|
||||||
|
forceMonthlyUpdate: true
|
||||||
|
allowUnknownCountries: false
|
||||||
|
unknownCountryApiResponse: nil
|
||||||
|
countries:
|
||||||
|
- US
|
||||||
|
|||||||
@@ -7,6 +7,9 @@ experimental:
|
|||||||
bouncer:
|
bouncer:
|
||||||
moduleName: github.com/maxlerebourg/crowdsec-bouncer-traefik-plugin
|
moduleName: github.com/maxlerebourg/crowdsec-bouncer-traefik-plugin
|
||||||
version: v1.3.3
|
version: v1.3.3
|
||||||
|
geoblock:
|
||||||
|
moduleName: github.com/PascalMinder/geoblock
|
||||||
|
version: v0.2.7
|
||||||
|
|
||||||
entryPoints:
|
entryPoints:
|
||||||
http:
|
http:
|
||||||
|
|||||||
Reference in New Issue
Block a user