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 βUbuntu Anycast DNS Server with BGP announcement to pfSense
Read More βHow to upgrade tailscale on GL-iNet AXT-1800
Read More β## Set default policies
iptables -P INPUT DROP
iptables -P FOWARD DROP
iptables -P OUTPUT DROP
## Allow traffic to and from the loopback interface
iptables -A INPUT -i lo -j ACCEPT
iptables -A OUTPUT -o lo -j ACCEPT
## Allow outbound connections
iptables -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
iptables -A OUTPUT -m state --state NEW,ESTABLISHED,RELATED -j ACCEPT
## Allow others to ping this machine
iptables -A INPUT -p icmp --icmp-type 8 -m state --state NEW,ESTABLISHED,RELATED -j ACCEPT
## Ratelimit incomming SSH connections
iptables -A INPUT -p tcp --dport ssh -m state --state NEW -m recent --update --seconds 60 --hitcount 4 -j DROP
iptabes -A INPUT -p tcp --dport ssh -m state --state NEW -m recent --set
iptables -A INPUT -p tcp --dport ssh -m state --state NEW -j ACCEPT
## Save rules on Debian/Ubuntu
apt install iptables-persistent
netfilter-persistent save
## Save rules on RHEL
chkconfig iptables on
service iptables save
Read More βSign and verify signatues with minisign
Read More β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
Usefull when the server is hosting multiple domains
curl -H "host: test.example.com" http://172.16.0.150
Read More βRun a speedtest using CLI
Read More βThis is just a brief overview of the options I’m using every now and then.
Read More βA simple way to connect to a server or pc without having the private key on the jump server
Read More βHere’s some configuration examples from a VRRP(Virtual Router Redundancy Protocol) experiment i did. This is used to create a high available DNS resolver with
Unbound
. I used RHEL 8 as my distribution of choice, but I’m sure this can be used on any RHEL deviate or linux distribution
Read More β