<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Linux on Holmq.dk</title><link>https://e41943f8.hugo-holmq-dk.pages.dev/categories/linux/</link><description>Recent content in Linux on Holmq.dk</description><generator>Hugo</generator><language>en</language><lastBuildDate>Wed, 08 Apr 2026 13:59:59 +0200</lastBuildDate><atom:link href="https://e41943f8.hugo-holmq-dk.pages.dev/categories/linux/index.xml" rel="self" type="application/rss+xml"/><item><title>Caddy + GeoIP + Fail2Ban (Pushover) — Setup Notes</title><link>https://e41943f8.hugo-holmq-dk.pages.dev/post/2026-01-27-caddy-geoip-fail2ban/</link><pubDate>Tue, 27 Jan 2026 13:50:37 +0100</pubDate><guid>https://e41943f8.hugo-holmq-dk.pages.dev/post/2026-01-27-caddy-geoip-fail2ban/</guid><description>&lt;p>This document describes:&lt;/p>
&lt;ul>
&lt;li>Building a &lt;strong>custom Caddy container image&lt;/strong> with the &lt;strong>GeoIP plugin&lt;/strong> (so Caddy can enrich access logs with country code/name). - Configuring &lt;strong>Caddy JSON access logs&lt;/strong> to include GeoIP fields. - Setting up &lt;strong>Fail2Ban&lt;/strong> to parse Caddy logs and send &lt;strong>Pushover notifications&lt;/strong> with GeoIP info via &lt;code>mmdblookup&lt;/code>. - Optional “SOC dashboard” style fields (severity, jail type, ban time, until).&lt;/li>
&lt;/ul></description></item><item><title>Anycast DNS PfSense</title><link>https://e41943f8.hugo-holmq-dk.pages.dev/post/2024-04-15-anycast-dns-pfsense/</link><pubDate>Mon, 15 Apr 2024 11:33:04 +0200</pubDate><guid>https://e41943f8.hugo-holmq-dk.pages.dev/post/2024-04-15-anycast-dns-pfsense/</guid><description>Ubuntu Anycast DNS Server with BGP announcement to pfSense</description></item><item><title>Update Tailscale on GLiNet AXT-1800</title><link>https://e41943f8.hugo-holmq-dk.pages.dev/post/2024-03-10-tailscale-glinet-atx1800/</link><pubDate>Sun, 10 Mar 2024 11:35:45 +0100</pubDate><guid>https://e41943f8.hugo-holmq-dk.pages.dev/post/2024-03-10-tailscale-glinet-atx1800/</guid><description>How to upgrade tailscale on GL-iNet AXT-1800</description></item><item><title>IPtables</title><link>https://e41943f8.hugo-holmq-dk.pages.dev/post/2024-02-06-iptables/</link><pubDate>Tue, 06 Feb 2024 10:08:29 +0100</pubDate><guid>https://e41943f8.hugo-holmq-dk.pages.dev/post/2024-02-06-iptables/</guid><description>&lt;div class="highlight">&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-fallback" data-lang="fallback">&lt;span style="display:flex;">&lt;span>## Set default policies
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>iptables -P INPUT DROP
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>iptables -P FOWARD DROP
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>iptables -P OUTPUT DROP
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>## Allow traffic to and from the loopback interface
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>iptables -A INPUT -i lo -j ACCEPT
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>iptables -A OUTPUT -o lo -j ACCEPT
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>## Allow outbound connections
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>iptables -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>iptables -A OUTPUT -m state --state NEW,ESTABLISHED,RELATED -j ACCEPT
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>## Allow others to ping this machine
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>iptables -A INPUT -p icmp --icmp-type 8 -m state --state NEW,ESTABLISHED,RELATED -j ACCEPT
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>## Ratelimit incomming SSH connections
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>iptables -A INPUT -p tcp --dport ssh -m state --state NEW -m recent --update --seconds 60 --hitcount 4 -j DROP
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>iptabes -A INPUT -p tcp --dport ssh -m state --state NEW -m recent --set
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>iptables -A INPUT -p tcp --dport ssh -m state --state NEW -j ACCEPT
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>## Save rules on Debian/Ubuntu
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>apt install iptables-persistent
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>netfilter-persistent save
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>## Save rules on RHEL
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>chkconfig iptables on
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>service iptables save
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;br />
&lt;h4 id="general-network-settings">General network settings&lt;/h4>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-fallback" data-lang="fallback">&lt;span style="display:flex;">&lt;span>## Drop ICMP echo-request messages. Setting net.ipv4.icmp_echo_ignore_broadcasts to 1 will cause the system to ignore all ICMP echo and timestamp requests to broadcast and multicast addresses
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>sysctl -w net.ipv4.icmp_echo_ignore_broadcasts=1
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>## Drop source routed packets. Source routing allows a sender to partially or fully specify the route packets take through a network. In contrast, non-source routed packets travel a path determined by routers in the network.
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>sysctl -w net.ipv4.conf.all.accept_source_route=0
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>sysctl -w net.ipv6.conf.all.accept_source_route=0
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>## Enable TCP SYN cookie protection from SYN floods. Attackers use SYN flood attacks to perform a denial of service attacked on a system by sending many SYN packets without completing the three way handshake
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>sysctl -w net.ipv4.tcp_syncookie=1
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>## Don&amp;#39;t accept ICMP redirect messages. Attackers could use bogus ICMP redirect messages to maliciously alter the system routing tables and get them to send packets to incorrect networks and allow your system packets to be captured
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>sysctl -w net.ipv4.conf.all.accept_redirects=0
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>sysctl -w net.ipv6.conf.all.accept_redirects=0
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> 
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>## Don&amp;#39;t send ICMP redirect messages.
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>syctl -w net.ipv4.conf.all.send_redirects=0
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>## Enable Reverse Path Filtering. Essentially, with reverse path filtering, if the return packet does not go out the same interface that the corresponding source packet came from, the packet is dropped (and logged if log_martians is set)
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>sysctl -w net.ipv4.conf.all.rp_filter=1
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> 
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>## Log packets with wrong source addresses
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>sysctl -w net.ipv4.conf.interface.log_martians=1
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div></description></item><item><title>Minisign</title><link>https://e41943f8.hugo-holmq-dk.pages.dev/post/2023-10-18-minisign/</link><pubDate>Wed, 18 Oct 2023 11:59:29 +0200</pubDate><guid>https://e41943f8.hugo-holmq-dk.pages.dev/post/2023-10-18-minisign/</guid><description>Sign and verify signatues with minisign</description></item><item><title>Tips and trick using curl</title><link>https://e41943f8.hugo-holmq-dk.pages.dev/post/2023-08-18-curl-tricks/</link><pubDate>Fri, 18 Aug 2023 13:01:44 +0200</pubDate><guid>https://e41943f8.hugo-holmq-dk.pages.dev/post/2023-08-18-curl-tricks/</guid><description>&lt;h4 id="download-files">Download files&lt;/h4>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-sh" data-lang="sh">&lt;span style="display:flex;">&lt;span>curl -O https://test.example.com/madplan.json
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>curl -O -L http://test.example.com/madplan.json &lt;span style="color:#75715e"># Follows links. In this example the http request will be redirected to https&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>curl -o test.json https://test.example.com/test.json &lt;span style="color:#75715e"># Saves the file as test.json&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;h4 id="send-host-header">Send host header&lt;/h4>
&lt;p>Usefull when the server is hosting multiple domains&lt;/p></description></item><item><title>Speedtest using curl</title><link>https://e41943f8.hugo-holmq-dk.pages.dev/post/2023-07-14-speedtest-using-curl/</link><pubDate>Fri, 14 Jul 2023 11:48:28 +0200</pubDate><guid>https://e41943f8.hugo-holmq-dk.pages.dev/post/2023-07-14-speedtest-using-curl/</guid><description>Run a speedtest using CLI</description></item><item><title>SSH Tips and Tricks</title><link>https://e41943f8.hugo-holmq-dk.pages.dev/post/2022-06-03-ssh-tips-and-tricks/</link><pubDate>Fri, 03 Jun 2022 09:27:52 +0200</pubDate><guid>https://e41943f8.hugo-holmq-dk.pages.dev/post/2022-06-03-ssh-tips-and-tricks/</guid><description>&lt;p>This is just a brief overview of the options I&amp;rsquo;m using every now and then.&lt;/p></description></item><item><title>SSH Agent Forwarding</title><link>https://e41943f8.hugo-holmq-dk.pages.dev/post/2022-06-02-ssh-agent-forwarding/</link><pubDate>Thu, 02 Jun 2022 13:29:35 +0200</pubDate><guid>https://e41943f8.hugo-holmq-dk.pages.dev/post/2022-06-02-ssh-agent-forwarding/</guid><description>A simple way to connect to a server or pc without having the private key on the jump server</description></item><item><title>Linux VRRP</title><link>https://e41943f8.hugo-holmq-dk.pages.dev/post/2022-03-25-linux-vrrp/</link><pubDate>Fri, 25 Mar 2022 11:58:50 +0100</pubDate><guid>https://e41943f8.hugo-holmq-dk.pages.dev/post/2022-03-25-linux-vrrp/</guid><description>&lt;p>Here&amp;rsquo;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 
&lt;a href="https://nlnetlabs.nl/projects/unbound/about/" target="_blank" rel="noopener">
 Unbound
&lt;/a>. I used RHEL 8 as my distribution of choice, but I&amp;rsquo;m sure this can be used on any RHEL deviate or linux distribution&lt;/p></description></item><item><title>Downgrade Centos 8 Stream to Centos 8</title><link>https://e41943f8.hugo-holmq-dk.pages.dev/post/2021-12-13-downgrade-centos-8-stream-to-centos-8/</link><pubDate>Mon, 13 Dec 2021 10:17:58 +0100</pubDate><guid>https://e41943f8.hugo-holmq-dk.pages.dev/post/2021-12-13-downgrade-centos-8-stream-to-centos-8/</guid><description>&lt;p>I have a few CentOS machines that needs to be converted to RHEL and that can be done using the 
&lt;a href="https://access.redhat.com/articles/2360841" target="_blank" rel="noopener">
 convert2rhel
&lt;/a> script. However I&amp;rsquo;m running CentOS 8 Stream, which can&amp;rsquo;t be converted to RHEL 8, so I have to do a dowgrade to CentOS 8 first.&lt;/p></description></item></channel></rss>