Caddy + GeoIP + Fail2Ban (Pushover) β€” Setup Notes

Categories: webserver linux firewall

This document describes:

  • Building a custom Caddy container image with the GeoIP plugin (so Caddy can enrich access logs with country code/name). - Configuring Caddy JSON access logs to include GeoIP fields. - Setting up Fail2Ban to parse Caddy logs and send Pushover notifications with GeoIP info via mmdblookup. - Optional β€œSOC dashboard” style fields (severity, jail type, ban time, until).

Read More β†’

Tips and trick using curl

Categories: linux webserver

Download files

curl -O https://test.example.com/madplan.json
curl -O -L http://test.example.com/madplan.json # Follows links. In this example the http request will be redirected to https
curl -o test.json https://test.example.com/test.json # Saves the file as test.json
 

Send host header

Usefull when the server is hosting multiple domains

curl -H "host: test.example.com" http://172.16.0.150


Read More β†’