<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Tomer Klein on Medium]]></title>
        <description><![CDATA[Stories by Tomer Klein on Medium]]></description>
        <link>https://medium.com/@tomer.klein?source=rss-7d5bb883dd6------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*RvAQD0lPeW3sP2lihfCQwA.jpeg</url>
            <title>Stories by Tomer Klein on Medium</title>
            <link>https://medium.com/@tomer.klein?source=rss-7d5bb883dd6------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Wed, 18 Nov 2026 23:11:03 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@tomer.klein/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Someone Can Issue a Certificate for Your Domain Right Now. Would You Know?]]></title>
            <link>https://medium.com/@tomer.klein/someone-can-issue-a-certificate-for-your-domain-right-now-would-you-know-c5525ca5c8a2?source=rss-7d5bb883dd6------2</link>
            <guid isPermaLink="false">https://medium.com/p/c5525ca5c8a2</guid>
            <category><![CDATA[ssl-certificate]]></category>
            <category><![CDATA[ssl]]></category>
            <category><![CDATA[bots]]></category>
            <category><![CDATA[ca]]></category>
            <category><![CDATA[transperancy-log]]></category>
            <dc:creator><![CDATA[Tomer Klein]]></dc:creator>
            <pubDate>Wed, 12 Aug 2026 07:01:03 GMT</pubDate>
            <atom:updated>2026-08-12T07:01:03.105Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*_-2NaKoWJwlwtT17.png" /></figure><p>Here’s an uncomfortable thing about the way TLS works: nothing technically stops a Certificate Authority from issuing a certificate for a domain you own without ever telling you.</p><p>It’s not supposed to happen. There are validation steps, there are CAA records, there are audits. But it does happen. Sometimes it’s malicious — a DNS hijack, a compromised registrar account, an attacker who got just enough control of a hostname to pass an ACME challenge. Sometimes it’s much more boring, which in my experience is the more common case: a developer on another team spins up a service on api-staging.yourcompany.com, points Let&#39;s Encrypt at it, and now there&#39;s a certificate out there for your domain that nobody in ops has ever seen.</p><p>Either way, the fix starts with the same thing. You need to know.</p><p>The good news is that this information is already public. Every certificate issued by a publicly trusted CA gets logged. The bad news is that nobody is going to hand it to you — you have to go looking. And “go looking” is exactly the kind of task that works great for two weeks and then quietly stops happening.</p><p>So I wrote something to do it for me.</p><h3>A short detour: what Certificate Transparency actually is</h3><p>If you already know this part, skip ahead. But it’s worth thirty seconds because the whole tool rests on it.</p><p><a href="https://certificate.transparency.dev/">Certificate Transparency</a> is a system of public, append-only logs. When a CA issues a certificate, it submits it to several of these logs and gets back a signed receipt. Chrome and Safari won’t trust a certificate that doesn’t come with those receipts, which means in practice that every certificate for every public domain ends up in a log that anyone can read.</p><p>That’s a remarkable property. It means you can audit certificate issuance for your own domains without any special access, without talking to a CA, and without owning any part of the infrastructure. You just read the logs.</p><p>The catch is volume. These logs get billions of entries. You need something that queries them on your behalf, remembers what it already saw, and only bothers you about the delta.</p><h3>go-certi</h3><p><a href="https://github.com/t0mer/go-certi">go-certi</a> is that something. It’s a single binary that watches CT logs for a list of domains you give it, stores what it finds in a local SQLite database, and notifies you when a certificate shows up that it hasn’t seen before.</p><p>It’s a Go rewrite of an older Python project of mine called <a href="https://github.com/t0mer/certi">certi</a>, with quite a bit added along the way — a web UI, multiple notification channels, per-domain scheduling, a REST API, and optional auth. The rewrite wasn’t about Go being faster. It was about deployment. The Python version needed a runtime, dependencies, and a virtualenv that would eventually break. This one is a statically linked binary with the frontend and the database engine compiled in. You copy it to a box and run it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*myNU6go8dRbOqnc7.png" /></figure><p>Data comes from <a href="https://sslmate.com/ct_search_api/">sslmate’s Cert Spotter API</a> as the primary source, with <a href="https://crt.sh/">crt.sh</a> as a fallback. Both work anonymously. If you have an sslmate API key you can plug it in for higher rate limits, but you don’t need one to get started, and for a handful of domains scanned every few hours you probably never will.</p><h3>What it watches for</h3><p>New certificates are the obvious event, but they’re not the only thing worth an alert. go-certi tracks five, and you pick which ones matter on a per-domain basis:</p><p>EventFires whennew_certA certificate you haven&#39;t seen before appears in the logsexpiring_soonA certificate is within N days of expiry (default 10)expiredA certificate has passed its expiry daterevokedA certificate is marked revoked in the logca_changedA new certificate comes from a different CA than the previous one</p><p>That last one is the sleeper. If your domain has been renewing through Let’s Encrypt for two years and a certificate suddenly appears from a CA you’ve never used, that’s either a change nobody told you about or something you want to look at immediately. Both are worth an alert.</p><p>expiring_soon is the one that saves you on a Tuesday afternoon. Yes, ACME renewals are automated. Yes, they still fail — a firewall rule changes, a DNS provider rotates a token, a container doesn&#39;t get restarted. Watching expiry from the outside, through the public logs, catches the failure that your renewal cron job doesn&#39;t know it had.</p><p>Each event has a dedup window so you don’t get the same expiry warning every scan. new_cert fires once per certificate, ever. The rest are capped at once per 24 hours per certificate.</p><h3>Getting it running</h3><p>Docker is the shortest path:</p><pre>docker run -d \<br>  --name go-certi \<br>  -p 8111:8111 \<br>  -v go-certi-data:/data \<br>  techblog/go-certi:latest</pre><p>Or with Compose, which is what I actually use:</p><pre>services:<br>  go-certi:<br>    image: techblog/go-certi:latest<br>    ports:<br>      - &quot;8111:8111&quot;<br>    volumes:<br>      - go-certi-data:/data<br>    environment:<br>      GO_CERTI_CONF: /data<br>      # GO_CERTI_SSLMATE_API_KEY: &quot;your-key-here&quot;   # optional<br>    restart: unless-stopped</pre><pre>volumes:<br>  go-certi-data:</pre><p>The image is multi-stage distroless and builds for linux/amd64, linux/arm64, and linux/arm/v7, so a Raspberry Pi is a perfectly reasonable home for this.</p><p>If you’d rather not run a container, grab a binary from the <a href="https://github.com/t0mer/go-certi/releases">releases page</a>:</p><pre>curl -L https://github.com/t0mer/go-certi/releases/latest/download/go-certi_linux_amd64 -o go-certi<br>chmod +x go-certi<br>./go-certi</pre><p>Either way, open <a href="http://localhost:8111/"><strong>http://localhost:8111</strong></a>. There’s no setup wizard and no account to create. Authentication is off by default, on the assumption that most people running this are putting it on a home network or behind a reverse proxy that already handles access. You can turn it on in Settings, and I’d suggest you do if the thing is reachable from anywhere but your LAN.</p><h3>Adding your first domain</h3><p>Go to the FQDNs page and add a domain. There’s a checkbox for include_subdomains, which is the one you want on if you care about shadow IT — that&#39;s the setting that surfaces the dev., staging., and internal-tools. hostnames somebody stood up without asking.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*0bpSngiOMCfnABmv.png" /></figure><p>The gear button on each row opens the per-domain configuration: which notification channels to use, which of the five events to fire on, and the expiry threshold in days. This is per domain on purpose. My production domains alert on everything through WhatsApp. A domain I’m parking gets new_cert only, to a Telegram channel I check when I feel like it.</p><p>There’s also a scan button if you don’t want to wait for the schedule. The first scan on a busy domain can pull back a lot of history — that’s normal, and everything found on the first pass is recorded as already-seen so you don’t get a hundred notifications for certificates that have existed for years.</p><p>Discovered certificates land on the Certificates page, with the subject CN, the issuer (both a friendly name and the full DN), issue and expiry dates with a relative countdown, the SAN list, and which CT source it came from. You can filter by domain or search across CN, SAN, and CA.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*C-1X24zWKarcZke-.png" /></figure><h3>Notifications</h3><p>Channels are defined once and shared across domains, which beats configuring the same Telegram bot token six times.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*y0gVk3fo1Z9xCwoY.png" /></figure><p>Three channel types are supported. The first is <a href="https://containrrr.dev/shoutrrr/services/">Shoutrrr</a>, which covers Telegram, Slack, Discord, email, Pushover, Gotify, ntfy, and about thirty other services behind a single URL format:</p><pre>{ &quot;url&quot;: &quot;telegram://token@telegram?chats=123456789&quot; }</pre><p>Then GreenAPI, for WhatsApp:</p><pre>{<br>  &quot;instance_id&quot;: &quot;your-instance-id&quot;,<br>  &quot;api_token_instance&quot;: &quot;your-api-token&quot;,<br>  &quot;chat_id&quot;: &quot;972501234567@c.us&quot;,<br>  &quot;api_url&quot;: &quot;https://api.green-api.com&quot;<br>}</pre><p>And WaWeb, if you’re running <a href="https://github.com/aldinokemal/go-whatsapp-web-multidevice">go-whatsapp-web-multidevice</a> yourself:</p><pre><br>  &quot;base_url&quot;: &quot;http://your-waweb-host:3000&quot;,<br>  &quot;phone&quot;: &quot;+972501234567&quot;,<br>  &quot;auth&quot;: &quot;basic dXNlcjpwYXNz&quot;<br>}</pre><p>Every channel has a Test button. Use it. Half the time a notification setup fails it’s a wrong chat ID, and finding that out during a real alert is not the moment you want.</p><p>One design decision worth mentioning: notification delivery is best-effort. If a channel is down or misconfigured, the failure gets logged and the scan carries on. A broken Slack webhook should never be the reason your certificate monitoring stopped running.</p><h3>Scheduling</h3><p>Scans run on cron schedules using <a href="https://github.com/robfig/cron">robfig/cron</a> syntax, so @every 4h, @daily, and 0 */6 * * * all work.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*AdoiqO1ebXcfgXKy.png" /></figure><p>You mark one schedule as the default and every domain inherits it unless you override it. In practice I run everything at @every 6h and leave a couple of high-value domains on @every 1h. CT logs aren&#39;t instant anyway — there&#39;s a gap between issuance and the certificate showing up in a searchable index — so hammering the API every five minutes buys you very little.</p><h3>The API</h3><p>Everything the UI does is available over REST at /api/v1, with interactive Swagger docs at /swagger/index.html.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*hIc5u7WBgJEfmBXr.png" /></figure><p>The endpoints you’ll actually reach for:</p><p>MethodEndpointWhat it doesGET / POST/fqdnsList or add domainsPOST/fqdns/:id/scanTrigger a scan right nowGET/certificatesList certificates (?fqdn=, ?page=, ?page_size=)GET/certificates/casDistinct CAs seenGET / POST/channelsManage notification channelsPOST/channels/:id/testSend a test notificationGET / PUT/settingsRead or update settingsGET/healthzLiveness probeGET/readyzReadiness probe with a DB ping</p><p>This is how you wire it into something bigger — bulk-loading domains from your DNS zone, pushing certificate data into a dashboard, or triggering a scan from CI after a deploy. If you enable API token protection in Settings, pass the token as Authorization: Bearer &lt;token&gt; and rotate it whenever you like.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*Lnobu3kUCTuwJyLN.png" /></figure><h3>Running it as a service</h3><p>If you’re going the binary route rather than Docker, go-certi can register itself with the OS. systemd on Linux, launchd on macOS, the Service Control Manager on Windows:</p><pre>sudo ./go-certi --service install --conf /var/lib/go-certi --port 8111<br>sudo systemctl enable go-certi<br>sudo journalctl -u go-certi -f</pre><p>install, uninstall, start, stop, restart, and status are all supported. Two gotchas: the absolute path of the binary gets baked into the service definition at install time, so move the binary and you&#39;ll need to uninstall and reinstall. And the --conf directory has to be absolute and writable by the service user, which defaults to root on Linux.</p><p>Configuration comes from CLI flags or environment variables, and env vars take priority — deliberately, so a container can override whatever’s in the image:</p><p>FlagEnv varDefault--portGO_CERTI_PORT8111--confGO_CERTI_CONF$XDG_CONFIG_HOME/go-certi--sslmate-api-keyGO_CERTI_SSLMATE_API_KEYnone--reset-passwordGO_CERTI_RESET_PASSWORD—--reset-api-tokenGO_CERTI_RESET_API_TOKEN—</p><p>Those last two are the offline escape hatch for when you’ve locked yourself out. They print a fresh credential to stdout and exit:</p><pre>./go-certi --conf /data --reset-password</pre><h3>What’s inside</h3><p>For the curious: Go 1.25 with <a href="https://github.com/gin-gonic/gin">Gin</a> for HTTP, SQLite through <a href="https://pkg.go.dev/modernc.org/sqlite">modernc.org/sqlite</a> so there’s no CGO anywhere in the build, <a href="https://github.com/sqlc-dev/sqlc">sqlc</a> generating type-safe query code, robfig/cron for scheduling, <a href="https://github.com/containrrr/shoutrrr">shoutrrr</a> for most of the notification surface, JWT and bcrypt for auth, and log/slog for structured logging.</p><p>The frontend is React 18 with Vite, TypeScript, Tailwind, and shadcn/ui, embedded into the binary with go:embed. Mobile-first, with light, dark, and system themes.</p><p>The no-CGO decision is the one that made everything else easy. It’s why cross-compiling to seven platforms is a single shell script, why the Docker image can be distroless, and why the binary has no runtime dependencies at all.</p><h3>Wrapping up</h3><p>Certificate Transparency is one of the few security mechanisms that gives defenders more information than attackers, for free, with no integration work. The logs are public. The data is there. Almost nobody looks at it, because looking at it manually is tedious and remembering to look at it is worse.</p><p>go-certi is a small thing that closes that gap. Run it once, add your domains, point it at a Telegram bot, and you’ve got a standing answer to the question at the top of this post. Somebody issues a certificate for your domain, you find out within a few hours, and you get to decide whether that was supposed to happen.</p><p>The project is on GitHub at <a href="https://github.com/t0mer/go-certi">github.com/t0mer/go-certi</a> under Apache 2.0. Images are on Docker Hub as techblog/go-certi. Issues and pull requests are welcome, and if you&#39;re monitoring domains in a way I didn&#39;t anticipate, I&#39;d like to hear about it.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c5525ca5c8a2" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[From A+ to F: Track Every Change in Your SSL/TLS Posture]]></title>
            <link>https://medium.com/@tomer.klein/from-a-to-f-track-every-change-in-your-ssl-tls-posture-27e0e6a5118f?source=rss-7d5bb883dd6------2</link>
            <guid isPermaLink="false">https://medium.com/p/27e0e6a5118f</guid>
            <category><![CDATA[ssllabs]]></category>
            <category><![CDATA[ssl-certificate]]></category>
            <category><![CDATA[ssl]]></category>
            <dc:creator><![CDATA[Tomer Klein]]></dc:creator>
            <pubDate>Wed, 12 Aug 2026 07:01:01 GMT</pubDate>
            <atom:updated>2026-08-12T07:01:01.991Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*Y-ujb8Y4vonJRUQE.png" /></figure><p>I have a bad habit. Every few months I remember that SSL Labs exists, paste a domain into the form, wait ninety seconds for the scan to crawl through every endpoint, look at the grade, nod, and close the tab. Then I forget about it until something reminds me — usually a browser warning, or a colleague asking why the API client on an old Android device suddenly can’t connect.</p><p>The problem isn’t that SSL Labs is bad. It’s excellent. The problem is that it’s a snapshot, and certificate posture is a moving target. A cert renews and the new chain is missing an intermediate. A load balancer gets replaced and quietly brings back TLS 1.0. A CDN config changes and one of your four endpoints starts serving a different certificate than the other three. Someone publishes a new attack and your once-perfect cipher suite is now a red box on the report.</p><p>None of that announces itself. You find out when a user does.</p><p>What I wanted was simple: run the same scans I was running manually, on a schedule, across all my domains, keep the results so I can compare them over time, and get a message when a grade drops or a certificate is about to expire. Not a dashboard I have to remember to open — a thing that talks to me.</p><p>That’s Bothan.</p><blockquote><em>A self-hosted service that continuously monitors the SSL/TLS posture of your domains using the Qualys SSL Labs API, tracks grade history, compares scans over time, and alerts you through multiple notification channels when something changes.</em></blockquote><p>The name is a joke I’m not going to apologize for. Many Bothans died to bring you this certificate grade.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*0RGxA03dEggHPXqq.png" /></figure><h3>What it actually does</h3><p>The loop is boring in a good way. You add hosts. You attach a schedule. Bothan queues scans against the SSL Labs API, respects their rate limits, stores every result in a local SQLite database, and evaluates a set of rules you define against each finished scan. If a rule matches, it fires a notification.</p><p>Because every scan is kept, you get things a manual check can never give you:</p><ul><li><strong>Grade history per host and per endpoint.</strong> Not “we’re an A” but “we were an A on March 2nd, we’ve been a B since the 14th, and here’s the scan that changed.”</li><li><strong>A real diff between any two scans.</strong> Protocol support, cipher suites, chain issues, certificate details — laid out side by side.</li><li><strong>Expiry tracking</strong> that doesn’t depend on anyone remembering a renewal date.</li><li><strong>Prometheus metrics</strong>, so all of this can live next to the rest of your monitoring instead of in its own island.</li></ul><p>It’s a single Go binary with an embedded React UI. No external database, no Redis, no message queue. The Docker image is about 17MB and there are builds for amd64, arm64 and arm/v7, which means a Raspberry Pi is a perfectly reasonable place to run it.</p><h3>Installing it</h3><p>The whole thing is one container and one volume.</p><pre>services:<br>  bothan:<br>    image: techblog/bothan:latest<br>    ports:<br>      - &quot;8080:8080&quot;<br>    volumes:<br>      # Named volume: inherits the image&#39;s /data ownership and holds the SQLite<br>      # database. Persist it across upgrades.<br>      - bothan-data:/data<br>    environment:<br>      # REQUIRED once you add notification channels. Keep it stable and backed<br>      # up — it makes encrypted exports/backups portable. Generate a 32-byte key,<br>      # e.g.: openssl rand -base64 32<br>      BOTHAN_CRYPTO_ENCRYPTION_KEY: &quot;${BOTHAN_CRYPTO_ENCRYPTION_KEY:-}&quot;<br>      # Optional: seed the first admin user before enabling auth in Settings.<br>      # BOTHAN_AUTH_INITIAL_ADMIN_USER: admin<br>      # BOTHAN_AUTH_INITIAL_ADMIN_PASSWORD: change-me<br>    restart: unless-stopped</pre><pre>volumes:<br>  bothan-data:</pre><p>Generate the key and bring it up:</p><pre>BOTHAN_CRYPTO_ENCRYPTION_KEY=&quot;$(openssl rand -base64 32)&quot; docker compose up -d</pre><p>Or, if you prefer a one-liner without a compose file:</p><pre>docker run -d --name bothan -p 8080:8080 \<br>  -v bothan-data:/data \<br>  -e BOTHAN_CRYPTO_ENCRYPTION_KEY=&quot;$(openssl rand -base64 32)&quot; \<br>  techblog/bothan:latest</pre><p>A word about that key, because it’s the one thing worth getting right on day one. It’s an AES-256 key used to encrypt your notification credentials at rest — Telegram tokens, WhatsApp API keys, SMTP passwords. If you lose it, those credentials become unreadable and you’ll be re-entering them. Put it in your password manager next to everything else you’d hate to regenerate.</p><p>Everything else is optional. There are a handful of bootstrap environment variables (BOTHAN_DATABASE_PATH, BOTHAN_SERVER_HOST, BOTHAN_SERVER_PORT, BOTHAN_SSLLABS_BASE_URL), but the rest of the configuration lives in the database and is edited from the UI. I made that choice deliberately: nobody enjoys restarting a container to change a log level.</p><p>If you’d rather run it without Docker, grab a release binary or build from source:</p><pre>cd web &amp;&amp; npm ci &amp;&amp; npm run build &amp;&amp; cd ..<br>go build -o bothan ./cmd/bothan<br>./bothan --db-path ./bothan.db</pre><p>Open http://&lt;host&gt;:8080 and you&#39;re in.</p><h3>First stop: Settings</h3><p>Before adding hosts, go to Settings and fill in the SSL Labs section. The API version and a registration email live here — SSL Labs asks for an email so they can reach you about API changes and rate limits, and the newer API version expects it. This is also where you set polling intervals, worker concurrency, log level and format, and whether metrics are exposed.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*EIMwALL7X_1voFW8.png" /></figure><p>Most changes take effect immediately. The exceptions are the server bind address, the log format, and toggling metrics on or off — those need a restart, and the UI tells you so.</p><h3>Adding hosts</h3><p>A host is a domain you care about. When you add one you can tell Bothan whether it’s public or private, and whether to accept a cached SSL Labs result or force a fresh assessment.</p><p>That cache setting matters more than it looks. SSL Labs caches results, and if you’re scanning the same domain often you’ll otherwise get the same numbers back with a new timestamp on them. For daily or weekly schedules, cached results are fine and polite. When you’ve just changed something and want to know if it worked, force a fresh scan.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*WJJDWtEPWWmor8H2.png" /></figure><p>Every host also gets a manual scan button, which is what I use when I’m mid-change and impatient.</p><h3>Schedules</h3><p>Schedules are cron-based, and you can write them three ways: a standard five-field expression, a descriptor like @daily, or plain text like &quot;every monday at 3am&quot; if you don&#39;t feel like counting asterisks.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*jtrIv0Jph_Jm8bgV.png" /></figure><p>My setup is unexciting and has never let me down: production domains daily at 3am, everything else weekly. SSL Labs assessments are slow — a full scan of a multi-endpoint host can take a couple of minutes — so scanning more often than daily is mostly a way to burn through your API capacity for no new information. Certificates don’t change on a five-minute cadence.</p><h3>Notification channels</h3><p>This is the part that turns a dashboard into a monitoring system.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*KDEfRpVWQckqXlA0.png" /></figure><p>Three kinds of channel are supported:</p><p><strong>Shoutrrr</strong> is the general-purpose option. It takes a single URL and speaks Telegram, Slack, Discord, SMTP, Gotify, Pushover, Matrix and a long list of others. If your target has a Shoutrrr URL format, it works here.</p><p><strong>GreenAPI</strong> is a hosted WhatsApp gateway. You supply an instance ID and a token and you get WhatsApp messages without running anything yourself.</p><p><strong>WhatsApp Multidevice</strong> talks to a self-hosted go-whatsapp-web-multidevice instance, for people who&#39;d rather not route their alerts through someone else&#39;s cloud.</p><p>Whatever you enter is encrypted with AES-256-GCM using that key from earlier before it touches the database. Every channel has a test button — use it, and confirm the message actually lands on your phone before you trust it with a 3am alert.</p><h3>Rules: deciding what’s worth waking up for</h3><p>A channel without rules is just a phone number. Rules are where you say what actually matters.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*FQcL5JYy0G2tmhUJ.png" /></figure><p>Conditions available:</p><ul><li>Grade below a threshold you set</li><li>Grade changed — any change, or only downgrades, or only improvements</li><li>Certificate expiring within N days</li><li>Scan failed</li><li>Vulnerability detected</li><li>Scan completed</li></ul><p>Each rule points at one or more channels, so you can route by severity. Mine looks roughly like this:</p><ul><li><em>Grade dropped below A</em> → WhatsApp. I want to know now.</li><li><em>Certificate expires within 21 days</em> → WhatsApp, and again at 7 days.</li><li><em>Vulnerability detected</em> → WhatsApp.</li><li><em>Scan completed</em> → a quiet Telegram channel I read when I feel like it.</li></ul><p>There’s one behaviour worth calling out because it’s the difference between a tool you keep and a tool you mute: if a host is failing and stays at the same failing grade, Bothan doesn’t re-notify you every single scan. You get told when the state changes, not every morning at 3:05 forever. Alert fatigue kills monitoring faster than no monitoring at all.</p><h3>Reading the results</h3><p>The scan report is what you’d expect from an SSL Labs frontend — grades per endpoint, certificate details, protocol and cipher support, chain issues, known vulnerabilities.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*VcyuqFZSsN8OiBbZ.png" /></figure><p>The compare view is the one I actually reach for. Pick two scans of the same host and Bothan produces a structured diff: what changed, what didn’t, in which direction.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*kvIAD0y_KxD_hRq3.png" /></figure><p>The first time this earned its keep, I got a downgrade alert on a domain I hadn’t touched in weeks. Compared the two scans, and the diff pointed straight at a missing intermediate certificate — the renewal had gone through but the chain hadn’t been assembled properly. Desktop browsers didn’t care because they cached the intermediate. Some mobile clients did. Without the previous scan sitting right next to the new one, that’s an afternoon of guessing.</p><h3>Metrics and Grafana</h3><p>If you already run Prometheus, /metrics gives you a bothan_ namespace:</p><pre>bothan_hosts_total<br>bothan_hosts_by_grade<br>bothan_host_grade<br>bothan_cert_expiry_days<br>bothan_scans_total<br>bothan_scan_duration_seconds<br>bothan_scan_queue_depth<br>bothan_ssllabs_requests_total<br>bothan_ssllabs_capacity<br>bothan_notifications_total</pre><p>bothan_cert_expiry_days is the one to build an alert on if you&#39;d rather Alertmanager handled paging. bothan_ssllabs_capacity tells you how much room you have left with the API, which is useful when you&#39;re deciding whether that hourly schedule is really a good idea. There&#39;s an example Grafana dashboard in the repo to get you started.</p><h3>Locking it down</h3><p>Authentication is off by default, which is the right default for something you spin up on a home network to try. Turn it on before you expose it to anything wider.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*qJjP7or49wxjk-VD.png" /></figure><p>When enabled you get UI login with argon2id password hashing and HTTP-only session cookies, plus scoped API tokens for automation — read, write, or admin. /healthz and /readyz stay open so your orchestrator can keep probing, and /metrics can be protected or left open depending on how your Prometheus is set up.</p><p>Seed the first admin through environment variables on first boot:</p><pre>BOTHAN_AUTH_INITIAL_ADMIN_USER: admin<br>BOTHAN_AUTH_INITIAL_ADMIN_PASSWORD: change-me-immediately</pre><h3>Backups and moving between machines</h3><p>Config export produces a bundle with your hosts, schedules, channels, rules and the relationships between them, referenced by natural key rather than database ID, so importing into a fresh instance doesn’t collapse into a pile of broken foreign keys.</p><p>Secrets get three modes: leave them out entirely and re-enter credentials on the other side, carry the encrypted blobs and use the same instance key, or re-encrypt everything under a passphrase for moving between instances. Scan history, encryption keys, session secrets, users and API tokens are never exported. Imports run in a transaction — all of it lands or none of it does.</p><p>For an actual backup, the SQLite file in the /data volume is the whole thing. Copy it somewhere safe along with your encryption key and you can rebuild from nothing.</p><h3>Wrapping up</h3><p>Certificate monitoring is one of those tasks that everyone agrees is important and almost nobody does consistently, because doing it by hand is tedious and doing it in your head doesn’t work. Every serious outage I’ve seen from expired or misconfigured TLS was preventable by someone looking at the right page on the right day. The fix isn’t discipline. It’s not having to remember.</p><p>Bothan is small enough to run on a Pi, keeps its state in one SQLite file, needs one environment variable to be useful, and will send a WhatsApp message when your grade slips or your certificate is running out. Set it up once, add your domains, write three or four rules, and then forget about it , which is the entire point.</p><p>The code is on GitHub under Apache-2.0: <a href="https://github.com/t0mer/bothan">github.com/t0mer/bothan</a>. Issues and pull requests welcome. If you run it and something’s awkward, tell me , that’s usually how the next version gets written.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=27e0e6a5118f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Rechroma: Bringing Old Photos Back to Life with Self-Hosted AI]]></title>
            <link>https://medium.com/@tomer.klein/rechroma-bringing-old-photos-back-to-life-with-self-hosted-ai-0715f24b5e80?source=rss-7d5bb883dd6------2</link>
            <guid isPermaLink="false">https://medium.com/p/0715f24b5e80</guid>
            <category><![CDATA[rechroming]]></category>
            <category><![CDATA[self-hosted]]></category>
            <category><![CDATA[rechroma]]></category>
            <category><![CDATA[deolfidy]]></category>
            <category><![CDATA[nvidia]]></category>
            <dc:creator><![CDATA[Tomer Klein]]></dc:creator>
            <pubDate>Tue, 11 Aug 2026 15:38:12 GMT</pubDate>
            <atom:updated>2026-08-11T15:38:12.524Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*JxKXoeO_k7hwEMay.png" /></figure><p>Old photographs preserve moments that may exist nowhere else, but time is rarely kind to them.</p><p>Many family photos are black and white, faded, blurry, damaged, or available only as low-resolution scans. Even photographs that were scanned years ago may look poor on today’s high-resolution displays.</p><p>Modern AI models can help restore some of that lost quality. They can add color to black-and-white images, improve faces, increase resolution, and even create short animations from still portraits.</p><p>To bring these capabilities together in one place, I created <strong>Rechroma</strong>: an open-source, self-hosted application for colorizing, restoring, upscaling, and processing old photographs.</p><p>The project combines several AI models behind a simple web interface, REST API, Telegram bot, and command-line interface. It can run locally on CPU or use an NVIDIA GPU when more processing power is available.</p><p>The project is available as an open-source application on GitHub:</p><p>github.com/t0mer/Rechroma</p><h3>What Is Rechroma?</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*EysOERJ1YR0eaCwK.png" /></figure><p>Rechroma is a self-hosted AI photo restoration platform designed to process old or degraded photographs.</p><p>Instead of installing and operating several AI projects independently, Rechroma provides a single processing pipeline around them.</p><p>The main models used by the project include:</p><ul><li><strong>DeOldify</strong> for black-and-white image colorization</li><li><strong>GFPGAN</strong> for face restoration</li><li><strong>Real-ESRGAN</strong> for AI-based image upscaling</li></ul><p>Rechroma also supports video colorization and optional portrait animation.</p><p>The basic workflow is simple:</p><p>Upload → Process → Compare → Download</p><p>You upload an image, select the type of processing you want, and Rechroma creates a job and processes the image using the selected AI models.</p><h3>Why Build Another Photo Restoration Tool?</h3><p>There are already several online services capable of colorizing and restoring old photographs.</p><p>They work well, but using them normally requires uploading your photos to an external service.</p><p>For ordinary images this may not be a problem, but family photographs are often different. They may contain relatives, children, homes, documents, or moments that were never intended to leave the family archive.</p><p>I wanted the same type of restoration capabilities while keeping control over where the images are processed.</p><p>That was the main reason behind Rechroma.</p><p>The application can run entirely on your own infrastructure, allowing you to control:</p><ul><li>Where photographs are stored</li><li>Who can access the application</li><li>How long uploaded files are retained</li><li>Which AI models are used</li><li>Whether the server can access the internet</li><li>Whether processing happens on CPU or GPU</li></ul><p>Rechroma is not intended to become another photo-storage platform. Uploaded and generated files are processing data and can automatically expire according to the configured retention policy.</p><h3>Colorizing Black-and-White Photos</h3><p>One of the main Rechroma capabilities is automatic photo colorization.</p><p>For this, Rechroma uses <strong>DeOldify</strong>.</p><p>The application supports different colorization models, allowing users to select the style that works best for a particular photograph.</p><p>Colorization works particularly well with subjects such as:</p><ul><li>Portraits</li><li>Family photographs</li><li>Landscapes</li><li>Buildings</li><li>Street photography</li><li>Historical photographs</li></ul><p>It is important to remember that AI colorization does not recover the original colors from a photograph.</p><p>If a shirt was blue in 1955, there is no hidden information inside a black-and-white photograph telling the AI that it was blue.</p><p>The model predicts colors based on what it learned during training.</p><p>The result should therefore be considered an interpretation of the original photograph rather than a historically exact reconstruction.</p><h3>Restoring Faces with GFPGAN</h3><p>Old photographs frequently lose detail around faces.</p><p>This may be caused by the original camera, aging of the photograph, scanning quality, compression, or simply the low resolution of the source image.</p><p>Rechroma integrates <strong>GFPGAN</strong> for face restoration.</p><p>GFPGAN identifies faces in an image and attempts to reconstruct missing facial details before blending the restored face back into the photograph.</p><p>This can make a significant difference in old family photographs where the general image remains usable but faces have become blurred.</p><p>As with colorization, restoration should not be confused with recovering information that still exists somewhere inside the image.</p><p>When detail is missing, the AI model reconstructs what it considers a plausible result.</p><p>The restored image can therefore look much clearer while still containing details that were generated by the model.</p><h3>Upscaling Images with Real-ESRGAN</h3><p>Resolution is another common problem with old digital scans.</p><p>Many family photographs were scanned when a resolution of 640×480 or 800×600 was perfectly acceptable.</p><p>On today’s displays, those same images can look extremely small.</p><p>Rechroma integrates <strong>Real-ESRGAN</strong> for AI-based upscaling.</p><p>Rather than simply enlarging the pixels, Real-ESRGAN attempts to reconstruct additional image detail while increasing the resolution.</p><p>This makes it useful for preparing old scans for:</p><ul><li>Modern displays</li><li>Digital photo frames</li><li>Larger image collections</li><li>Printing</li><li>Further restoration</li></ul><p>Upscaling can also be combined with the other processing stages.</p><h3>Processing Presets</h3><p>Users don’t necessarily need to understand which AI model should run first.</p><p>Rechroma therefore provides several simple processing presets.</p><h3>Colorize</h3><p>Runs the colorization pipeline on a black-and-white or sepia photograph.</p><h3>Restore</h3><p>Focuses on improving image and facial quality without automatically changing the original colors.</p><h3>Full</h3><p>Runs multiple processing stages as a single pipeline:</p><p>Restore → Colorize → Upscale</p><p>The presets keep the normal workflow simple while more detailed configuration remains available when needed.</p><h3>The Web Interface</h3><p>The main way to interact with Rechroma is through its web interface.</p><p>Users can upload a photograph, configure the processing options, and submit a restoration job.</p><p>Because AI processing may take some time, particularly on CPU, the operation runs as a job instead of keeping the browser request open until everything is finished.</p><p>Once the job completes, the processed image is displayed alongside the original.</p><p>One useful feature is the before-and-after comparison slider.</p><p>Instead of opening two images and switching between them, the divider can be dragged across the photograph to compare the original and processed versions directly.</p><p>This makes changes in faces, colors, sharpness, and background detail much easier to see.</p><h3>Telegram Bot</h3><p>Rechroma can also be used through Telegram.</p><p>The workflow is intentionally simple:</p><ol><li>Send a photograph to the bot</li><li>Select the processing operation</li><li>Wait for the job to complete</li><li>Receive the processed photograph</li></ol><p>The Telegram bot uses the same backend processing engine as the web interface.</p><p>It is intended primarily as a private interface rather than a public image-processing bot, and access can be restricted through an allowlist.</p><p>This makes it convenient to provide access to family members without requiring everyone to use the web interface.</p><h3>REST API</h3><p>The processing engine is also available through a REST API.</p><p>Applications and automation tools can use the API to submit images, check processing status, and retrieve completed results.</p><p>This makes Rechroma useful beyond its own user interface.</p><p>For example, the API could be integrated into:</p><ul><li>Photo-management applications</li><li>Automation workflows</li><li>Home-lab services</li><li>Batch-processing scripts</li><li>Mobile applications</li><li>Messaging bots</li></ul><p>Interactive API documentation is included as well, making it possible to explore and test the endpoints directly from a browser.</p><h3>Asynchronous Job Processing</h3><p>AI workloads behave differently from normal web requests.</p><p>A typical API request may finish in milliseconds, while image restoration may require seconds or minutes depending on the image size, selected models, and available hardware.</p><p>Video processing can take considerably longer.</p><p>Rechroma therefore uses an asynchronous job model.</p><p>When an image is submitted, the application creates a processing job. A worker executes the selected pipeline while the client monitors its status.</p><p>The basic process looks like this:</p><p>Upload → Job Created → Processing → Completed → Result</p><p>I wanted to keep this architecture relatively lightweight.</p><p>Instead of requiring Redis, RabbitMQ, Celery, and a separate database server, the job system uses SQLite.</p><p>For a self-hosted application, this significantly reduces the number of components that need to be installed, configured, monitored, and backed up.</p><h3>CPU and GPU Processing</h3><p>Not every home lab has an NVIDIA GPU.</p><p>For that reason, Rechroma supports CPU processing as well.</p><p>CPU mode is slower but makes it possible to run the application on ordinary servers and virtual machines.</p><p>For occasional image restoration, this may be completely sufficient.</p><p>If a compatible NVIDIA GPU is available, Rechroma can use CUDA to accelerate processing.</p><p>GPU acceleration becomes particularly useful when working with:</p><ul><li>Large photographs</li><li>4x upscaling</li><li>Multiple images</li><li>Video colorization</li><li>Portrait animation</li></ul><p>The application architecture remains largely the same regardless of the processing device.</p><h3>Video Colorization</h3><p>Photographs were the original focus of Rechroma, but the same colorization technology can also be applied to video.</p><p>The general process is:</p><p>Video → Frames → Colorization → Smoothing → Video</p><p>The application extracts the individual video frames, processes them through the colorization engine, and then rebuilds the video.</p><p>The original audio can then be added back to the processed video.</p><p>One challenge with this approach is consistency.</p><p>If every frame is colorized independently, the model may choose slightly different colors from one frame to another.</p><p>A blue object in one frame may become slightly green in the next.</p><p>When those frames are played quickly, the result appears as color flickering.</p><p>Rechroma applies temporal chroma smoothing to help reduce this effect.</p><p>Because hundreds or thousands of individual images may need to be processed, video colorization is much more computationally intensive than processing a single photograph.</p><p>For this feature, GPU acceleration is strongly recommended.</p><h3>Portrait Animation</h3><p>Rechroma also includes experimental portrait-animation capabilities.</p><p>Instead of only modifying the appearance of a still photograph, animation creates a short video from it.</p><p>Different animation engines can be used depending on the available hardware and configuration.</p><p>Local processing keeps the image on the Rechroma server, while optional cloud-based animation can provide access to models that would otherwise require much more local GPU power.</p><p>The distinction is important.</p><p>Using a cloud animation provider means the photograph leaves the local Rechroma environment.</p><p>For that reason, cloud processing is optional rather than part of the default restoration pipeline.</p><h3>Privacy and Security</h3><p>Self-hosting provides control over the infrastructure, but the application still needs to handle uploaded files carefully.</p><p>Rechroma includes several protections around image processing and file handling.</p><p>These include:</p><ul><li>Configurable file retention</li><li>Automatic cleanup of completed jobs</li><li>Removal of GPS information from image metadata</li><li>File-content validation</li><li>Protection against oversized images</li><li>API authentication support</li><li>Telegram user allowlisting</li><li>No application telemetry</li></ul><p>For an installation exposed to the internet, Rechroma should still be placed behind an appropriate reverse proxy and authentication layer.</p><p>Self-hosting does not automatically make an application secure, but it does provide control over where the data is stored and where processing occurs.</p><h3>Model Management</h3><p>AI applications have another deployment challenge: model files can be large.</p><p>Including every model directly inside a Docker image would make the image unnecessarily large and make updates more difficult.</p><p>Rechroma instead stores model files separately.</p><p>Models can be downloaded when required and cached in persistent storage so that they remain available when the container is recreated.</p><p>Model files are also verified using expected checksums before they are used.</p><p>For isolated environments, models can be downloaded in advance and placed on the server manually.</p><p>This means Rechroma can also operate in environments where the application itself does not have direct internet access.</p><h3>Deploying Rechroma with Docker</h3><p>Docker is the recommended way to deploy Rechroma.</p><p>Clone the repository:</p><pre>git clone https://github.com/t0mer/Rechroma.git<br>cd Rechroma</pre><p>Start the application:</p><pre>docker compose up -d</pre><p>The web interface is then available on port 8000.</p><p>For example:</p><pre>http://localhost:8000</pre><p>When running Rechroma on another server, replace localhost with the hostname or IP address of that machine.</p><p>Persistent Docker volumes are used for application data and downloaded model files, allowing the container itself to be recreated without downloading everything again.</p><h3>GPU Deployment</h3><p>Systems equipped with an NVIDIA GPU can use the CUDA deployment configuration.</p><p>This requires the NVIDIA drivers and NVIDIA Container Toolkit to be installed on the Docker host.</p><p>GPU acceleration does not change how users interact with Rechroma.</p><p>The web interface, API, Telegram bot, and processing jobs remain the same.</p><p>The difference is simply where the AI inference happens.</p><p>For normal photo processing, CPU mode may be sufficient. For video and heavier restoration workloads, GPU acceleration can make the application significantly more practical.</p><h3>Monitoring Rechroma</h3><p>I tend to monitor services running in my home lab, even when they are relatively small.</p><p>Rechroma therefore exposes health information and Prometheus-compatible metrics.</p><p>Monitoring can provide visibility into information such as application health, processing state, and queue activity.</p><p>This means Rechroma can be integrated into an existing Prometheus and Grafana environment rather than operating as another black box on the network.</p><h3>Why Keep the Architecture Simple?</h3><p>Rechroma uses quite a few technologies and AI models, but I deliberately tried to avoid turning that into infrastructure complexity.</p><p>The web interface, Telegram bot, REST API, and command-line tools all use the same underlying processing logic.</p><p>The job queue does not require an external message broker.</p><p>CPU and GPU deployments use the same basic application architecture.</p><p>Model management is centralized instead of being implemented separately for each feature.</p><p>This is also important because AI models are changing quickly.</p><p>DeOldify, GFPGAN, and Real-ESRGAN are useful today, but better models will continue to appear.</p><p>Keeping the interfaces separate from the actual AI engines makes it easier to add or replace models later without rebuilding the entire application around them.</p><h3>Practical Use Cases</h3><p>Rechroma can be useful anywhere old photographs need to be processed without relying entirely on external cloud services.</p><h3>Family Photo Archives</h3><p>Old family photographs can be scanned and restored while remaining on private infrastructure.</p><h3>Historical Collections</h3><p>Black-and-white photographs can be colorized and upscaled to make historical collections easier to explore on modern displays.</p><h3>Home Labs</h3><p>Rechroma provides an interesting AI workload for a home server or GPU-equipped lab and can integrate with existing Docker and monitoring environments.</p><h3>Photo Digitization Projects</h3><p>Collections of older scans can be restored and enlarged before being organized into a modern digital archive.</p><h3>Automation</h3><p>The REST API allows Rechroma to become part of larger image-processing or document-management workflows.</p><h3>What I Learned Building Rechroma</h3><p>Getting an AI model to process an image turned out to be only one part of building the application.</p><p>A usable service also needs to deal with file uploads, validation, job queues, progress reporting, failures, model downloads, storage, cleanup, authentication, GPU detection, APIs, monitoring, and deployment.</p><p>The AI model produces the visible result.</p><p>The engineering around it is what turns that model into something people can actually use.</p><p>That became one of the more interesting parts of building Rechroma.</p><h3>Conclusion</h3><p>Old photographs contain information that cannot always be recovered once it has been lost, and AI restoration cannot magically recreate history.</p><p>What it can do is provide a new way to experience those photographs.</p><p>Rechroma brings colorization, face restoration, AI upscaling, video processing, and portrait animation together in one self-hosted application.</p><p>At the same time, it remains relatively simple to deploy with Docker and can run on either CPU or NVIDIA GPU.</p><p>Most importantly, the normal restoration workflow can stay on infrastructure you control.</p><p>The project is open source and available on GitHub:</p><p><a href="https://github.com/t0mer/Rechroma">https://github.com/t0mer/Rechroma</a></p><p>If you have a collection of old family photographs sitting on a hard drive somewhere, Rechroma gives you an interesting way to see what modern AI can do with them.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=0715f24b5e80" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[DNSMon: Check, Track, and Monitor DNS Propagation Worldwide]]></title>
            <link>https://medium.com/@tomer.klein/dnsmon-check-track-and-monitor-dns-propagation-worldwide-678ee8deaf58?source=rss-7d5bb883dd6------2</link>
            <guid isPermaLink="false">https://medium.com/p/678ee8deaf58</guid>
            <category><![CDATA[docker]]></category>
            <category><![CDATA[dns]]></category>
            <category><![CDATA[dns-records]]></category>
            <category><![CDATA[self-hosted]]></category>
            <category><![CDATA[dns-monitoring]]></category>
            <dc:creator><![CDATA[Tomer Klein]]></dc:creator>
            <pubDate>Wed, 05 Aug 2026 15:10:17 GMT</pubDate>
            <atom:updated>2026-08-05T15:10:17.862Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*u23YB2N8rusjtZvA.png" /></figure><p>Updating a DNS record usually takes only a few seconds.</p><p>Waiting for that update to appear everywhere can take much longer.</p><p>After changing an A record, mail server, nameserver, CNAME, or TXT record, administrators often open a public DNS propagation website and repeatedly check whether the new value has reached resolvers around the world.</p><p>This process works, but it has several limitations.</p><p>Public DNS-checking services are outside your infrastructure, offer limited customization, and are usually designed for one-time checks rather than ongoing monitoring. They may show that some resolvers still return an old value, but they rarely estimate when propagation will complete, preserve a useful baseline, or alert you when an unexpected record change occurs.</p><p>To address these limitations, I created <strong>DNSMon</strong>: an open-source, self-hosted DNS propagation checker and monitoring platform.</p><p>DNSMon can query a domain against more than 120 public DNS resolvers, display the results on an interactive world map, estimate propagation time, compare results with a previous snapshot, trace DNS delegation, perform detailed DNS lookups, monitor records continuously, and send alerts through multiple notification services.</p><p>It is essentially a private, extensible alternative to public DNS propagation-checking websites — running entirely inside your own infrastructure.</p><p>The project is available on GitHub:</p><pre>https://github.com/t0mer/dnsmon</pre><h3>What Is DNSMon?</h3><p>DNSMon is a self-hosted web application for checking and monitoring DNS records.</p><p>It queries a configurable collection of 124 public resolvers distributed across different geographic locations and presents the results through a modern browser-based interface.</p><p>Instead of showing only whether a record resolves, DNSMon provides additional context, including:</p><ul><li>Resolver location</li><li>Country</li><li>Returned DNS value</li><li>Query status</li><li>Response time</li><li>Record TTL</li><li>Agreement between resolvers</li><li>Propagation progress</li><li>Estimated time until convergence</li></ul><p>DNSMon is distributed as a single Go binary with an embedded web interface. It can also be deployed as a Docker container, which makes it suitable for home labs, development environments, infrastructure teams, managed-service providers, and enterprise networks.</p><h3>Why Build a Self-Hosted DNS Propagation Checker?</h3><p>Public DNS propagation tools are convenient, but they are usually built around a simple workflow:</p><ol><li>Enter a domain.</li><li>Select a record type.</li><li>View the results.</li><li>Refresh the page later.</li></ol><p>That is useful for a quick check, but DNS operations often require more than a temporary result.</p><p>Administrators may need to answer questions such as:</p><ul><li>Which resolvers still return the old address?</li><li>How many resolvers have received the new record?</li><li>When is propagation likely to finish?</li><li>Did a specific resolver change since the previous check?</li><li>Is the problem caused by propagation or incorrect delegation?</li><li>Has an important DNS record changed unexpectedly?</li><li>Can the result be exported and shared?</li><li>Can an automated system trigger the same check through an API?</li><li>Can alerts be sent when propagation fails?</li></ul><p>DNSMon combines these capabilities into one self-hosted application.</p><p>Rather than treating DNS propagation as a one-time diagnostic activity, it turns DNS checking into an observable and automatable process.</p><h3>Checking DNS Propagation Worldwide</h3><p>The main DNSMon screen performs DNS queries against 124 curated public resolvers.</p><p>Each resolver represents a different DNS provider or geographic location. Results are displayed both visually and in a detailed table.</p><p>The propagation view includes:</p><ul><li>An interactive world map</li><li>Country flags</li><li>A consensus summary</li><li>Resolver-level query results</li><li>Response values</li><li>TTL information</li><li>Query duration</li><li>Sortable columns</li><li>Pagination</li><li>Filtering options</li></ul><p>This makes it easy to identify geographic or provider-specific differences.</p><p>For example, after changing an A record, most resolvers may immediately return the new IP address while several others continue serving the old value. DNSMon clearly shows which resolvers have updated and which are still waiting for the cached record to expire.</p><h3>Understanding DNS Propagation</h3><p>DNS propagation is often described as though a new record must be copied from one central server to every DNS server on the internet.</p><p>That is not exactly what happens.</p><p>When a recursive resolver receives a DNS answer, it may cache that answer for the duration defined by the record’s Time to Live, or TTL. If the authoritative DNS record changes while the previous answer remains cached, the resolver may continue returning the old value until the cached entry expires.</p><p>As a result, different resolvers can return different answers during a DNS change.</p><p>A resolver that did not recently query the domain may retrieve the new value immediately. Another resolver may continue returning the old value until its cache expires.</p><p>This is why DNS propagation is rarely uniform across all locations.</p><p>DNSMon helps visualize this process by comparing the answers returned by many independent resolvers.</p><h3>Propagation ETA</h3><p>One of DNSMon’s most useful features is its propagation-time estimate.</p><p>When some resolvers still return an older value, DNSMon examines the maximum TTL observed among those resolvers and estimates how long it may take before the remaining cached entries expire.</p><p>The interface presents:</p><ul><li>The percentage of resolvers that have converged</li><li>The number of resolvers returning the expected result</li><li>The number still returning a different value</li><li>A human-readable countdown</li></ul><p>An estimate might appear as:</p><pre>Approximately 2 minutes and 30 seconds remaining</pre><p>This does not guarantee that every resolver will update at that exact moment, but it provides a practical indication of how long the current propagation window may last.</p><p>Instead of repeatedly refreshing a page without context, administrators receive a measurable view of the expected convergence period.</p><h3>DNS Consensus</h3><p>When checking many resolvers, it is important to understand not only individual results but also the overall agreement between them.</p><p>DNSMon summarizes which answer is returned most frequently and how many resolvers agree with it.</p><p>For example, a check may show:</p><pre>Expected value: 203.0.113.20<br>Converged resolvers: 113 of 124<br>Convergence: 91.1%</pre><p>This provides a clearer operational picture than a simple green or red status.</p><p>A domain does not necessarily need every public resolver to return the new answer before it can be considered usable. However, the consensus summary helps determine whether propagation is mostly complete or still at an early stage.</p><h3>Snapshot Comparison</h3><p>Watching DNS propagation often involves running the same query several times.</p><p>Without a comparison mechanism, it can be difficult to remember which resolvers changed between checks.</p><p>DNSMon allows a propagation result to be saved as a snapshot or baseline. When the check is performed again, the application compares the new answer from every resolver with its previous answer.</p><p>A delta column identifies whether each resolver:</p><ul><li>Changed</li><li>Remained unchanged</li><li>Started responding</li><li>Stopped responding</li></ul><p>A <strong>Changed only</strong> filter can then hide all unchanged resolvers.</p><p>This is particularly useful during active propagation. Instead of reviewing more than 100 rows after every test, administrators can focus only on the resolvers that changed since the previous check.</p><h3>Live DNS Checking</h3><p>Traditional propagation checkers usually wait until every resolver finishes before displaying the final result.</p><p>DNSMon includes a live mode that streams resolver responses to the browser as they arrive.</p><p>The application uses a WebSocket connection to deliver each result immediately.</p><p>This creates a more responsive experience:</p><ol><li>The check begins.</li><li>Fast resolvers appear almost immediately.</li><li>The map and result table update continuously.</li><li>Slower or unreachable resolvers appear as the check progresses.</li><li>The consensus summary is recalculated in real time.</li></ol><p>Live mode is especially valuable when checking a large resolver list because users do not need to wait for the slowest request before seeing useful information.</p><h3>Supported DNS Record Types</h3><p>DNSMon supports 16 common and advanced DNS record types:</p><pre>A<br>AAAA<br>CNAME<br>MX<br>NS<br>PTR<br>SOA<br>TXT<br>CAA<br>SRV<br>DS<br>DNSKEY<br>NAPTR<br>TLSA<br>SVCB<br>HTTPS</pre><p>This makes the platform useful for much more than checking website addresses.</p><h3>A and AAAA Records</h3><p>A records map names to IPv4 addresses, while AAAA records map names to IPv6 addresses.</p><p>These are commonly checked after:</p><ul><li>Moving a website</li><li>Changing hosting providers</li><li>Updating a load balancer</li><li>Migrating an API endpoint</li><li>Activating a disaster-recovery environment</li></ul><h3>CNAME Records</h3><p>CNAME records create aliases between hostnames.</p><p>They are frequently used for:</p><ul><li>Content-delivery networks</li><li>SaaS validation</li><li>Cloud-hosted applications</li><li>Reverse proxies</li><li>Static websites</li><li>Domain ownership verification</li></ul><h3>MX Records</h3><p>MX records define the mail servers responsible for receiving email for a domain.</p><p>Checking MX propagation is important during:</p><ul><li>Email-provider migrations</li><li>Mail gateway changes</li><li>Backup mail-server configuration</li><li>Domain onboarding</li></ul><h3>TXT Records</h3><p>TXT records are widely used for:</p><ul><li>SPF</li><li>DKIM</li><li>DMARC</li><li>Domain verification</li><li>Certificate validation</li><li>SaaS integrations</li><li>Security policies</li></ul><h3>NS and SOA Records</h3><p>NS records define authoritative nameservers, while the SOA record provides important zone metadata.</p><p>These records are useful when troubleshooting DNS delegation or moving a zone between DNS providers.</p><h3>CAA Records</h3><p>CAA records specify which certificate authorities are permitted to issue TLS certificates for a domain.</p><p>Monitoring these records can help detect an accidental or unauthorized certificate-policy change.</p><h3>DNSSEC Records</h3><p>DS and DNSKEY records are essential components of DNSSEC.</p><p>DNSMon can help verify that DNSSEC-related information is visible across public resolvers after signing a zone or updating a DNSSEC configuration.</p><h3>Modern Service Records</h3><p>DNSMon also supports TLSA, SVCB, and HTTPS records, allowing it to work with modern service discovery, encrypted transport, and application-routing configurations.</p><h3>Detailed DNS Lookup</h3><p>Propagation checking answers an important question:</p><blockquote><em>What does this record look like from many resolvers?</em></blockquote><p>Sometimes a different question must be answered:</p><blockquote><em>What exactly did one DNS server return?</em></blockquote><p>DNSMon includes a detailed DNS Lookup tool for inspecting the complete response from a selected resolver or custom DNS server.</p><p>The result includes the traditional DNS message sections:</p><ul><li>Answer</li><li>Authority</li><li>Additional</li></ul><p>It also exposes details such as:</p><ul><li>Record TTLs</li><li>Response flags</li><li>Nameserver information</li><li>Additional addresses</li><li>Query status</li><li>Round-trip time</li></ul><p>This is useful when a resolver returns an unexpected answer and more context is needed than the propagation table provides.</p><h3>Propagation Monitoring</h3><p>Propagation monitoring verifies that an expected DNS value has reached every enabled resolver.</p><p>A monitor can define:</p><ul><li>Domain name</li><li>Record type</li><li>Expected value</li><li>Schedule</li><li>Notification channel</li></ul><p>DNSMon runs the check according to the selected schedule and evaluates the result.</p><p>An alert can be sent when one or more resolvers do not return the expected value.</p><p>This is helpful after planned changes such as:</p><ul><li>Website migrations</li><li>Mail-server changes</li><li>Nameserver migrations</li><li>CDN onboarding</li><li>Certificate-validation changes</li><li>Disaster-recovery activation</li><li>Public API endpoint updates</li></ul><p>Instead of manually checking the record throughout the day, DNSMon can perform the verification automatically.</p><h3>DNS Change Detection</h3><p>Some records should not change without authorization.</p><p>Examples include:</p><ul><li>Nameserver records</li><li>Mail exchanger records</li><li>SPF policies</li><li>DMARC policies</li><li>CAA records</li><li>Public application addresses</li><li>Verification records</li><li>DNSSEC records</li></ul><p>DNSMon can save the current record value as a baseline and periodically compare future results with it.</p><p>When a change is detected, the application:</p><ol><li>Records the change.</li><li>Sends an alert through the selected notification channel.</li><li>Adds the event to the monitor changelog.</li><li>Updates the baseline after the detected change.</li></ol><p>This allows the monitor to continue detecting future changes without repeatedly alerting on the same value.</p><p>Change detection can identify both expected and unexpected DNS drift.</p><p>Expected changes can be used as deployment confirmation, while unexpected changes may indicate a configuration mistake, unauthorized update, provider issue, or incomplete automation process.</p><h3>Reusable Schedulers</h3><p>Instead of defining a separate timing rule for every monitor, DNSMon provides reusable scheduler objects.</p><p>Built-in scheduling options include:</p><pre>@hourly<br>@daily<br>@weekly<br>@monthly</pre><p>Custom cron expressions are also supported.</p><p>A single schedule can be assigned to multiple monitors.</p><p>For example:</p><ul><li>Critical production records can be checked hourly.</li><li>Mail-security records can be checked daily.</li><li>Nameserver delegations can be checked weekly.</li><li>Less important records can be checked monthly.</li></ul><p>Reusable schedules simplify administration and make it easier to change the monitoring frequency for several records at once.</p><h3>Notification Channels</h3><p>A monitoring system is useful only when it can notify someone about a problem.</p><p>DNSMon supports multiple notification methods through the Shoutrrr notification library.</p><p>Depending on the configured service, alerts can be delivered through platforms such as:</p><ul><li>Slack</li><li>Telegram</li><li>Discord</li><li>Email</li><li>Microsoft Teams</li><li>Gotify</li><li>Matrix</li><li>Mattermost</li><li>Pushover</li><li>Generic webhooks</li></ul><p>DNSMon also includes WhatsApp notification support through:</p><ul><li>GreenAPI</li><li>go-whatsapp-web-multidevice</li></ul><p>Each notification channel includes a Test button so administrators can verify the configuration before assigning it to production monitors.</p><p>Using a unified notification layer means different monitors can send alerts to different destinations.</p><p>For example:</p><ul><li>Infrastructure alerts can go to Slack.</li><li>Critical DNS changes can generate email.</li><li>Home-lab alerts can be sent to Telegram.</li><li>Operational notifications can be delivered through WhatsApp.</li></ul><h3>Deploying with Docker</h3><p>DNSMon can also be started directly with Docker:</p><pre>docker run -d \<br>  --name dnsmon \<br>  -p 8080:8080 \<br>  -v dnsmon:/data \<br>  -e DNSMON_STORAGE_DSN=&quot;file:/data/dnsmon.db?cache=shared&amp;_fk=1&quot; \<br>  --restart unless-stopped \<br>  techblog/dnsmon:latest</pre><p>The command:</p><ul><li>Publishes the application on port 8080</li><li>Creates a persistent volume</li><li>Stores the SQLite database under /data</li><li>Automatically restarts the container</li></ul><p>Multi-architecture images are available for:</p><pre>linux/amd64<br>linux/arm64<br>linux/arm/v7</pre><p>This allows DNSMon to run on standard servers, virtual machines, NAS systems, ARM hosts, and many Raspberry Pi models.</p><h3>Why Self-Hosting Matters</h3><p>A self-hosted DNS platform provides several benefits.</p><h3>Privacy</h3><p>DNS checks and monitored domains remain within your operational environment rather than being entered into an external service’s user interface.</p><h3>Control</h3><p>You decide:</p><ul><li>Where the service runs</li><li>Which resolvers are enabled</li><li>How long results are retained</li><li>Who can access it</li><li>Which notification platforms are used</li><li>Which records are monitored</li></ul><h3>Automation</h3><p>The REST API, schedulers, monitors, and Prometheus endpoint make DNSMon suitable for automated infrastructure workflows.</p><h3>Extensibility</h3><p>Because the project is open source, new resolver lists, notification channels, record types, storage backends, and monitoring features can be added.</p><h3>Availability</h3><p>A private DNS-checking service remains available according to your own infrastructure and access policies, without depending on the interface or limitations of a public website.</p><h3>Open Source</h3><p>DNSMon is an open-source project available on GitHub.</p><p>The repository includes:</p><ul><li>Application source code</li><li>Docker configuration</li><li>Docker Compose deployment</li><li>Build scripts</li><li>Architecture documentation</li><li>Configuration examples</li><li>Release automation</li><li>Development tools</li></ul><p>The project welcomes contributions such as:</p><ul><li>Bug reports</li><li>Feature suggestions</li><li>Resolver updates</li><li>Documentation improvements</li><li>New export formats</li><li>Additional notification integrations</li><li>User-interface enhancements</li><li>Monitoring improvements</li><li>Code contributions</li></ul><p>The repository currently identifies the project under an open-source license; consult the repository’s license file for the exact applicable terms.</p><h3>Conclusion</h3><p>DNS changes are easy to make, but their effects are not always easy to observe.</p><p>A DNS provider may confirm that a record was updated while recursive resolvers around the world continue returning older cached values. An incorrect delegation, unreachable nameserver, outdated TTL, or unexpected record change can make troubleshooting even more difficult.</p><p>DNSMon provides one platform for the complete DNS-verification workflow.</p><p>It can:</p><ul><li>Check DNS propagation across 124 public resolvers</li><li>Display results on an interactive world map</li><li>Calculate resolver consensus</li><li>Estimate propagation completion time</li><li>Compare checks with saved snapshots</li><li>Stream results in real time</li><li>Perform detailed DNS lookups</li><li>Run reverse DNS queries</li><li>Trace authoritative delegation</li><li>Monitor expected values</li><li>Detect unexpected DNS changes</li><li>Send alerts through multiple platforms</li><li>Export results in several formats</li><li>Expose a REST API</li><li>Publish Prometheus metrics</li><li>Run as a container, native binary, or operating-system service</li></ul><p>Most importantly, it does all of this inside infrastructure you control.</p><p>Whether you manage a home lab, operate production services, migrate email platforms, maintain IoT environments, automate DNS through CI/CD, or support customer domains, DNSMon provides the visibility needed to understand what DNS resolvers are actually returning.</p><p>Instead of guessing whether a change has propagated, you can measure it.</p><p>Instead of manually checking critical records, you can monitor them.</p><p>Instead of relying entirely on a public DNS website, you can run your own.</p><p>The project is available on GitHub:</p><pre>https://github.com/t0mer/dnsmon</pre><p>Deploy DNSMon, run your first propagation check, and gain a clearer view of DNS behavior from resolvers around the world.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=678ee8deaf58" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Stop Guessing Which DNS Server Is Fastest - Measure It]]></title>
            <link>https://medium.com/@tomer.klein/stop-guessing-which-dns-server-is-fastest-measure-it-e814cf9479fb?source=rss-7d5bb883dd6------2</link>
            <guid isPermaLink="false">https://medium.com/p/e814cf9479fb</guid>
            <category><![CDATA[homelab]]></category>
            <category><![CDATA[dns-tester]]></category>
            <category><![CDATA[dns]]></category>
            <category><![CDATA[docker]]></category>
            <dc:creator><![CDATA[Tomer Klein]]></dc:creator>
            <pubDate>Wed, 05 Aug 2026 15:10:00 GMT</pubDate>
            <atom:updated>2026-08-05T15:10:00.171Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*6joWkvyB8_6MEg5q.png" /></figure><p>DNS is one of the most important components of any network, but it is often treated as an invisible background service.</p><p>Every time we open a website, connect to an API, access a cloud service, or communicate with an IoT device, DNS is responsible for translating a hostname into an IP address. Even small delays in DNS resolution can affect how responsive applications and websites feel.</p><p>Most people select a DNS provider based on reputation, recommendations, or a quick one-time benchmark. However, DNS performance depends on several factors, including geographic location, network routing, the selected protocol, the requested domain, caching, and the current condition of the provider’s infrastructure.</p><p>To make this easier to measure, I created <strong>Go DNSTester</strong>: a lightweight, self-hosted application that benchmarks DNS servers, records their response times, monitors their performance over time, and presents the results through a modern web interface.</p><p>The project is available as an open-source application on GitHub:</p><p><strong>GitHub repository:</strong> t0mer/go-dnstester</p><h3>What Is Go DNSTester?</h3><p>Go DNSTester is a single Go application designed to benchmark multiple DNS resolvers against a configurable list of fully qualified domain names.</p><p>Instead of testing only one query or reporting a single latency value, the application performs real DNS lookups against several domains and records the result of every request.</p><p>It supports three major DNS protocols:</p><ul><li>Traditional DNS over UDP on port 53</li><li>DNS over TLS, commonly known as DoT</li><li>DNS over HTTPS, commonly known as DoH</li></ul><p>The application records DNS response times, resolved answers, query status, and network latency to each configured server. The results are stored locally and displayed through a responsive web interface.</p><p>This makes Go DNSTester useful as both a one-time benchmarking utility and a long-term DNS monitoring platform.</p><h3>Why Build Another DNS Benchmarking Tool?</h3><p>There are already command-line tools that can query DNS servers, including dig, nslookup, and several dedicated benchmarking utilities.</p><p>These tools are excellent for troubleshooting, but I wanted something that could answer broader questions:</p><ul><li>Which DNS resolver performs best from my network?</li><li>Is the fastest UDP resolver also the fastest when using DoT or DoH?</li><li>Does a provider perform consistently across different domains?</li><li>Has DNS performance changed during the past week or month?</li><li>Did a network or configuration change improve DNS resolution?</li><li>Is a slow result caused by DNS processing or general network latency?</li><li>Can I schedule tests and compare the results later?</li></ul><p>Answering these questions manually requires scripts, scheduled jobs, databases, and dashboards.</p><p>Go DNSTester combines those capabilities into a single application that can be deployed as one binary or one Docker container.</p><h3>More Than a Simple Speed Test</h3><p>DNS performance cannot always be represented by one number.</p><p>A server may respond quickly when resolving one popular domain but perform differently for another. It may also have low network latency while producing slower DNS responses because of resolver processing, caching, upstream communication, or protocol overhead.</p><p>Go DNSTester therefore performs queries against a list of configurable FQDNs.</p><p>The default list includes:</p><pre>google.com<br>cloudflare.com<br>github.com<br>microsoft.com<br>apple.com</pre><p>Both the DNS server list and the tested domains can be modified from the application settings or through its REST API.</p><p>Testing several domains provides a more representative view of normal DNS activity than repeatedly querying only one hostname.</p><h3>Supported DNS Protocols</h3><p>One of the main capabilities of Go DNSTester is the ability to compare different DNS protocols from the same interface.</p><h3>Traditional DNS over UDP</h3><p>Standard DNS normally sends queries over UDP port 53.</p><p>It is widely supported and usually introduces minimal protocol overhead. However, traditional DNS queries are generally not encrypted between the client and resolver.</p><p>Go DNSTester includes several public UDP resolvers in its default configuration, including:</p><pre>Cloudflare       1.1.1.1<br>Cloudflare Alt   1.0.0.1<br>Google           8.8.8.8<br>Google Alt       8.8.4.4<br>Quad9            9.9.9.9<br>OpenDNS          208.67.222.222<br>OpenDNS Alt      208.67.220.220<br>AdGuard          94.140.14.14</pre><p>These entries can be enabled, disabled, removed, or replaced with private and internal resolvers.</p><h3>DNS over TLS</h3><p>DNS over TLS encrypts DNS communication through a TLS connection, typically using TCP port 853.</p><p>Go DNSTester includes optional DoT examples for Cloudflare, Google, and Quad9. They are available in the default configuration but disabled until the user chooses to enable them.</p><h3>DNS over HTTPS</h3><p>DNS over HTTPS sends DNS queries over HTTPS, normally through port 443.</p><p>The project implements DoH using the standard DNS wire format defined by RFC 8484. Preconfigured examples include Cloudflare, Google, Quad9, and AdGuard.</p><p>By enabling UDP, DoT, and DoH entries together, users can evaluate how encryption and protocol selection affect DNS performance on their own network.</p><h3>The Results Dashboard</h3><p>After starting a test, Go DNSTester displays each query in a sortable and filterable results table.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*_I7K-bE9R2xe1N-K.png" /></figure><p>Each row includes information such as:</p><ul><li>DNS server name</li><li>DNS protocol</li><li>Queried FQDN</li><li>Response time in milliseconds</li><li>Query status</li><li>Resolved IP addresses or answers</li></ul><p>Protocol badges make it easy to distinguish between traditional DNS, DoT, and DoH results.</p><p>This detailed view is particularly useful because average values can sometimes hide individual failures or unusually slow domain lookups.</p><p>A server may appear fast overall while failing to resolve a specific domain. Looking at the complete query table makes these differences immediately visible.</p><h3>Visualizing Average Response Times</h3><p>Alongside the detailed results table, the application generates a bar chart showing the average DNS response time for each server during the current test.</p><p>This provides a fast visual comparison between resolvers.</p><p>The chart can also display a baseline from an earlier test. A baseline is useful when evaluating changes such as:</p><ul><li>Switching internet providers</li><li>Replacing a router</li><li>Enabling a VPN</li><li>Changing firewall policies</li><li>Moving a workload to another location</li><li>Testing a local caching resolver</li><li>Switching from UDP to DoT or DoH</li></ul><p>Instead of relying on memory or manually comparing exported files, the previous measurements can be loaded directly into the current view.</p><h3>Separating DNS Time from Network Latency</h3><p>A slow DNS response does not necessarily mean the resolver itself is slow.</p><p>The network path to the resolver may also be introducing latency.</p><p>To provide more context, Go DNSTester measures network latency to every configured DNS server. It attempts to use ICMP ping and can fall back to a TCP connection when ICMP is unavailable.</p><p>For encrypted protocols, the application tests the relevant service endpoint:</p><ul><li>DoT servers are checked through port 853.</li><li>DoH servers are checked through the upstream hostname on port 443.</li></ul><p>Comparing ping latency with DNS response time can help identify where a delay is occurring.</p><p>For example, a server with a 10-millisecond network latency and a 15-millisecond DNS response is behaving differently from a server with a 10-millisecond network latency and a 100-millisecond DNS response.</p><h3>Test History</h3><p>A single test provides only a snapshot.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*Qd2VHGAsEF6RVMql.png" /></figure><p>Network conditions, routes, resolver caches, and provider infrastructure change over time. For that reason, Go DNSTester stores every test run in a local SQLite database.</p><p>The History page includes:</p><ul><li>Test timestamp</li><li>Number of executed queries</li><li>Success rate</li><li>Average response time</li><li>Access to the complete test results</li></ul><p>Historical tests can be loaded back into the results view or selected as a baseline for another run.</p><p>The history list is paginated and supports page sizes of 10, 25, 50, or 100 entries.</p><p>This allows the application to operate continuously without turning the interface into one long, difficult-to-navigate table.</p><h3>Comparing Two Test Runs</h3><p>Sometimes a baseline overlay is not enough.</p><p>Go DNSTester allows users to select two historical runs and compare them directly.</p><p>The comparison view provides:</p><ul><li>The overall performance difference</li><li>Side-by-side average response-time charts</li><li>A per-server breakdown</li><li>Millisecond differences</li><li>Percentage changes</li></ul><p>This can help validate whether a change actually improved DNS performance.</p><p>For example, suppose a local Unbound resolver is added in front of a public DNS provider. Tests from before and after the deployment can be compared to determine whether the caching layer reduced response times.</p><p>The same process can be used when enabling DNS encryption, changing providers, or testing from different network connections.</p><h3>Scheduled DNS Tests</h3><p>Manually starting tests is useful during troubleshooting, but long-term analysis requires automation.</p><p>Go DNSTester includes a built-in scheduler that supports several timing options:</p><ul><li>Every specified number of minutes</li><li>Every specified number of hours</li><li>Daily</li><li>On selected weekdays</li><li>Weekly</li><li>Monthly</li><li>One time only</li></ul><p>Scheduled test results are stored in the same database as manual runs and are available in both the History and Compare views.</p><p>This removes the need to create an external cron job for regular monitoring.</p><p>A simple setup could run a test every hour and use the Trends view to show how resolver performance changes during the day.</p><h3>Configuration Management</h3><p>All major application settings can be managed through the web interface.</p><p>This includes:</p><ul><li>DNS server definitions</li><li>Protocol selection</li><li>FQDN lists</li><li>Test schedules</li><li>Authentication settings</li><li>General application preferences</li></ul><p>Configuration can also be backed up, restored, exported, and imported.</p><p>Exporting the configuration as JSON is helpful when moving the application to another host or deploying similar configurations in multiple locations.</p><p>For example, an administrator could deploy Go DNSTester in several offices and use the same server and FQDN configuration at every site. The results would then represent the DNS experience from each local network.</p><h3>Deploying Go DNSTester with Docker</h3><p>Docker is the recommended way to deploy the application.</p><p>The following command starts a container and exposes the web interface on port 7020:</p><pre>docker run -d \<br>  --name dnstester \<br>  -p 7020:7020 \<br>  --cap-add NET_RAW \<br>  --restart unless-stopped \<br>  -v dnstester-config:/config \<br>  techblog/dnstester:latest</pre><p>The NET_RAW capability allows the container to perform ICMP ping tests.</p><p>The named volume stores both the application configuration and SQLite database, ensuring that settings and test history remain available when the container is recreated.</p><p>After starting the container, open:</p><pre>http://localhost:7020</pre><p>For a remote server, replace localhost with the hostname or IP address of the Docker host.</p><h3>Deploying with Docker Compose</h3><p>For a permanent deployment, Docker Compose makes the configuration easier to maintain:</p><pre>services:<br>  dnstester:<br>    image: techblog/dnstester:latest<br>    container_name: dnstester<br>    ports:<br>      - &quot;7020:7020&quot;<br>    volumes:<br>      - dnstester-config:/config<br>    environment:<br>      - CONFIG_PATH=/config<br>    cap_add:<br>      - NET_RAW<br>    restart: unless-stopped</pre><pre>volumes:<br>  dnstester-config:</pre><p>Start the service with:</p><pre>docker compose up -d</pre><p>This setup automatically restarts the application after a server reboot or unexpected process exit.</p><h3>Running as a Standalone Binary</h3><p>Go DNSTester can also run without Docker.</p><p>The project is designed as a single Go binary, making it suitable for lightweight servers, virtual machines, and small ARM-based devices.</p><p>To build the project locally, Go 1.25 or newer and Node.js 20 or newer are required.</p><pre>git clone https://github.com/t0mer/go-dnstester.git<br>cd go-dnstester</pre><pre>make build-local</pre><p>The generated binary can then be started directly:</p><pre>./dist/dnstester-&lt;version&gt;-linux-amd64</pre><p>By default, the web application listens on port 7020.</p><p>A different port can be selected with:</p><pre>./dnstester --port 8080</pre><p>The configuration directory can also be explicitly defined:</p><pre>./dnstester --conf /etc/dnstester</pre><p>Alternatively, use an environment variable:</p><pre>CONFIG_PATH=/etc/dnstester ./dnstester</pre><h3>Multi-Architecture Support</h3><p>The published Docker images support several common Linux architectures:</p><pre>linux/amd64<br>linux/arm64<br>linux/arm/v7</pre><p>This means Go DNSTester can run on traditional x86 servers as well as ARM-based systems, including many Raspberry Pi models and other single-board computers.</p><p>The project uses calendar-based versioning in the YYYY.M.PATCH format, and release builds are automated through GitHub Actions.</p><h3>Practical Use Cases</h3><p>Go DNSTester can be useful in several environments.</p><h3>Home Networks</h3><p>Home users can compare public DNS providers and determine which resolver performs best through their internet connection.</p><p>It can also be used to compare a local resolver such as AdGuard Home, Pi-hole, or Unbound against its upstream providers.</p><h3>Home Labs</h3><p>A home-lab environment may include several DNS layers, encrypted upstream connections, filtering systems, and internal DNS zones.</p><p>Scheduled tests provide a convenient way to observe whether these layers affect external lookup performance.</p><h3>Enterprise Offices</h3><p>The application can be deployed in several offices to compare DNS behavior across internet providers, regions, VPNs, and corporate network paths.</p><h3>IoT Networks</h3><p>IoT devices often rely on DNS to locate MQTT brokers, APIs, update servers, and cloud endpoints.</p><p>Monitoring DNS performance from the same network as those devices can help identify connectivity problems that might otherwise appear to be application failures.</p><h3>Troubleshooting</h3><p>When users report that applications or websites feel slow, Go DNSTester can help determine whether DNS resolution is contributing to the issue.</p><h3>Protocol Evaluation</h3><p>Organizations considering DoT or DoH can compare encrypted and unencrypted resolution from the same network before making a wider configuration change.</p><h3>Understanding the Results</h3><p>The fastest result is not always the only factor that should determine which DNS provider to use.</p><p>When reviewing the data, consider:</p><ul><li>Average response time</li><li>Consistency between tests</li><li>Query success rate</li><li>Performance across several domains</li><li>Network latency to the resolver</li><li>Privacy policy</li><li>Filtering behavior</li><li>Security features</li><li>Availability of encrypted protocols</li></ul><p>A provider that is two milliseconds faster in one test may not be the best choice if its performance changes significantly throughout the day.</p><p>Long-term trends and repeated tests usually provide more useful information than a single benchmark.</p><p>Caching should also be considered. Repeated queries may be answered from a resolver’s cache, while less common domains may require recursive resolution. For this reason, the results should be interpreted as the DNS experience from the tested network rather than as a universal ranking of DNS providers.</p><h3>Conclusion</h3><p>DNS is frequently blamed when connectivity feels slow, but without measurements, it can be difficult to determine whether DNS is actually the cause.</p><p>Go DNSTester provides a simple way to replace assumptions with real data.</p><p>It benchmarks traditional DNS, DNS over TLS, and DNS over HTTPS; records detailed results; measures network latency; stores historical tests; compares runs; displays long-term trends; schedules automatic scans; exposes a REST API; and integrates with Prometheus.</p><p>At the same time, it remains easy to deploy as a single binary or Docker container.</p><p>Whether you are selecting a public DNS provider, validating a local resolver, evaluating encrypted DNS, monitoring an office network, or troubleshooting an IoT environment, Go DNSTester provides a clear view of how DNS is performing from the network that matters most — your own.</p><p>The project is open source and available on GitHub:</p><pre>https://github.com/t0mer/go-dnstester</pre><p>Deploy it, test your DNS servers, and discover whether the resolver you currently use is really the best option for your network.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e814cf9479fb" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[AGHSync: Automatic Configuration Synchronization for AdGuard Home]]></title>
            <link>https://medium.com/@tomer.klein/aghsync-automatic-configuration-synchronization-for-adguard-home-5bf41358c056?source=rss-7d5bb883dd6------2</link>
            <guid isPermaLink="false">https://medium.com/p/5bf41358c056</guid>
            <category><![CDATA[docker]]></category>
            <category><![CDATA[synchronization]]></category>
            <category><![CDATA[dns]]></category>
            <category><![CDATA[adguard]]></category>
            <category><![CDATA[homelab]]></category>
            <dc:creator><![CDATA[Tomer Klein]]></dc:creator>
            <pubDate>Mon, 03 Aug 2026 15:00:31 GMT</pubDate>
            <atom:updated>2026-08-03T15:00:31.055Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*8v9VkXeQC3_TFMcn.png" /></figure><p>Running one AdGuard Home instance is straightforward.</p><p>Running several instances is where things become more complicated.</p><p>Many home labs, small offices, and distributed environments use multiple DNS servers for redundancy. If one server is unavailable, clients can continue resolving DNS queries through another one.</p><p>However, redundancy creates a new challenge: configuration consistency.</p><p>Whenever I added a DNS rewrite, changed a filtering rule, modified a blocked service, or updated another setting, I had to repeat that change across every AdGuard Home server.</p><p>Manual configuration works until one update is forgotten.</p><p>At that point, two clients may receive different DNS results depending on which server answers their request. A domain might be blocked by one server and allowed by another. A local rewrite might work on one side of the network but fail on the other.</p><p>That is configuration drift, and it can turn a redundant DNS environment into an inconsistent one.</p><p>To solve this problem, I created <strong>AGHSync</strong>.</p><p>AGHSync is a self-hosted application that designates one AdGuard Home instance as the master and automatically synchronizes its selected configuration with every enabled slave instance.</p><p>Synchronization can run on a schedule, manually, through a REST API or webhook, during application startup, or immediately after the AdGuard Home configuration file changes.</p><h3>The Problem with Multiple AdGuard Home Instances</h3><p>Using multiple DNS servers is common practice.</p><p>A typical home network might have:</p><ul><li>One AdGuard Home server on a virtual machine</li><li>Another instance on a Raspberry Pi</li><li>Separate DNS servers in different physical locations</li><li>Primary and secondary instances across two hypervisors</li><li>DNS services in different network segments</li><li>Dedicated instances for home, laboratory, or IoT networks</li></ul><p>Clients are usually configured with two or more DNS server addresses.</p><p>This provides availability, but AdGuard Home instances do not automatically behave as a coordinated cluster. Each instance has its own configuration, including:</p><ul><li>Filtering settings</li><li>DNS rewrites</li><li>Blocked services</li><li>Safe browsing</li><li>Safe search</li><li>Parental controls</li><li>DNS configuration</li><li>DHCP configuration</li><li>TLS settings</li></ul><p>When a setting changes on one server, the other instances do not automatically know about it.</p><p>The administrator must either repeat the modification manually or create custom scripts around the AdGuard Home API.</p><p>Neither option provides a complete management experience.</p><p>I wanted a solution that would handle synchronization while also showing instance health, recording what changed, protecting credentials, sending notifications, and providing an API for external automation.</p><h3>What Is AGHSync?</h3><p>AGHSync is a centralized synchronization and management layer for multiple AdGuard Home installations.</p><p>The basic model is simple:</p><pre>                   ┌─────────────────────┐<br>                   │   Master AdGuard    │<br>                   │    Home instance    │<br>                   └──────────┬──────────┘<br>                              │<br>                        Read selected<br>                        configuration<br>                              │<br>                              ▼<br>                   ┌────────────────────┐<br>                   │       AGHSync      │<br>                   └─────┬─────┬─────┬──┘<br>                         │     │     │<br>              ┌──────────┘     │     └──────────┐<br>              ▼                ▼                ▼<br>        ┌───────────┐    ┌───────────┐    ┌───────────┐<br>        │  Slave 1  │    │  Slave 2  │    │  Slave 3  │<br>        └───────────┘    └───────────┘    └───────────┘</pre><p>One AdGuard Home server is designated as the master.</p><p>AGHSync reads the selected configuration categories from that master and propagates them to all enabled slave instances.</p><p>The master remains the source of truth, while the slaves provide redundant DNS service using consistent configuration.</p><p>AGHSync does not simply copy the entire configuration blindly. The administrator chooses which configuration categories should be synchronized.</p><h3>Granular Configuration Synchronization</h3><p>Not every AdGuard Home deployment needs to synchronize every available setting.</p><p>For example, two DNS servers might need identical filtering and rewrite rules but different DHCP or TLS configurations.</p><p>AGHSync therefore provides granular control over the synchronization process.</p><p>The master controls whether the following configuration types are included:</p><pre>blocked_services<br>dhcp<br>dns<br>filtering<br>parental<br>rewrite<br>safebrowsing<br>safesearch<br>tls</pre><p>Each category can be enabled or disabled independently.</p><p>This provides flexibility for different deployment models.</p><h3>Example: Identical DNS Filtering</h3><p>For two AdGuard Home servers providing the same DNS service, an administrator might synchronize:</p><ul><li>Filtering</li><li>DNS rewrites</li><li>Blocked services</li><li>Safe browsing</li><li>Safe search</li></ul><h3>Example: Separate DHCP Servers</h3><p>When DHCP is handled differently at each location, the DHCP category can remain disabled while the DNS-related settings continue to synchronize.</p><h3>Example: Different TLS Certificates</h3><p>Two servers may use different hostnames and certificates. In that case, TLS synchronization can be disabled to prevent the master configuration from replacing instance-specific certificate settings.</p><p>This selective model is safer than copying the complete configuration file from one server to another.</p><h3>Managing AdGuard Home Instances</h3><p>AGHSync provides a web interface for adding, editing, and removing AdGuard Home instances.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*kv8M0JYLeH0I0QZC.png" /></figure><p>Each instance includes:</p><ul><li>A display name</li><li>The AdGuard Home address</li><li>Authentication credentials</li><li>Its master or slave role</li><li>Its synchronization status</li><li>Its current availability</li><li>Its AdGuard Home version</li></ul><p>Before an instance is saved, AGHSync can test the connection and validate the supplied credentials.</p><p>This avoids saving an instance only to discover later that its address or password is incorrect.</p><p>For environments using self-signed HTTPS certificates, certificate verification can be disabled on a per-instance basis.</p><p>AGHSync also prevents the same address from being registered more than once.</p><h3>One Master at a Time</h3><p>An AGHSync environment always has one designated master.</p><p>The master acts as the source of truth for synchronization.</p><p>When an existing slave is promoted to master, AGHSync automatically demotes the current master. The synchronization configuration is transferred to the newly promoted instance.</p><p>This makes switching the authoritative server straightforward.</p><p>For example, an administrator might promote another instance when:</p><ul><li>Migrating AdGuard Home to a new server</li><li>Replacing an old Raspberry Pi</li><li>Moving DNS services to another virtual machine</li><li>Performing maintenance on the current master</li><li>Changing the primary site in a multi-site deployment</li></ul><p>Without automatic role handling, promoting one server could accidentally leave the system with two masters or no active master.</p><p>AGHSync ensures that the role remains unambiguous.</p><h3>Monitoring Instance Health</h3><p>Synchronization is only useful when the destination servers are available.</p><p>AGHSync checks the status of each configured instance and displays a colored online or offline indicator in the interface.</p><p>The status refreshes every 60 seconds.</p><p>Alongside the status indicator, AGHSync displays the running AdGuard Home version for each instance.</p><p>The Instances page also shows the latest synchronization result for every slave, including:</p><ul><li>When the instance was last synchronized</li><li>Whether the synchronization succeeded</li><li>Whether it failed</li><li>Whether synchronization is enabled for that slave</li></ul><p>A slave can be temporarily excluded from synchronization without deleting it.</p><p>This is useful during maintenance, testing, migration, or troubleshooting. The server remains registered in AGHSync, but synchronization runs skip it until it is re-enabled.</p><h3>Several Ways to Trigger Synchronization</h3><p>Different environments require different automation methods.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*7tfLzLyzS6rIc7JT.png" /></figure><p>AGHSync supports multiple synchronization triggers rather than forcing every deployment to use the same workflow.</p><h3>Scheduled Synchronization</h3><p>A configurable cron expression can run synchronization automatically.</p><p>For example:</p><pre>0 * * * *</pre><p>This expression runs a synchronization at the beginning of every hour.</p><p>Scheduling is useful when immediate consistency is not required and administrators prefer predictable synchronization intervals.</p><h3>Manual Synchronization</h3><p>A sync can be started at any time from the web interface.</p><p>This is useful after making several configuration changes and wanting to apply them immediately.</p><h3>Sync on Startup</h3><p>AGHSync can optionally start a full synchronization whenever the application launches.</p><p>This helps ensure that all enabled slaves are aligned after AGHSync or its host server restarts.</p><h3>Detecting Configuration Changes on Disk</h3><p>AdGuard Home stores its configuration in an AdGuardHome.yaml file.</p><p>Watching this file sounds simple, but configuration files are not always updated through a direct write operation.</p><p>Applications often use an atomic-write process:</p><ol><li>Write the new configuration to a temporary file</li><li>Flush the new content</li><li>Rename or replace the original file</li><li>Remove the temporary file</li></ol><p>A basic file watcher may miss the update or react multiple times during this sequence.</p><p>AGHSync’s watchdog is designed to handle this pattern. It debounces file events so that multiple low-level changes result in one synchronization run.</p><p>The watchdog supports:</p><ul><li>Linux paths</li><li>Windows paths</li><li>UNC network paths</li><li>Docker-mounted directories</li></ul><p>Example Linux path:</p><pre>/etc/adguardhome/AdGuardHome.yaml</pre><p>Example Windows path:</p><pre>C:\AdGuardHome\AdGuardHome.yaml</pre><p>Example UNC path:</p><pre>\\server\share\AdGuardHome.yaml</pre><p>This allows AGHSync to run on a different machine from the master AdGuard Home server, provided the configuration file is available through a mounted directory or network share.</p><h3>Using the Watchdog with Docker</h3><p>When AdGuard Home and AGHSync run in separate containers, AGHSync needs read access to the AdGuard Home configuration directory.</p><p>For example:</p><pre>services:<br>  aghsync:<br>    image: techblog/aghsync:latest<br>    container_name: aghsync<br>    restart: unless-stopped<br>    ports:<br>      - &quot;8080:8080&quot;<br>    volumes:<br>      - aghsync-data:/app/data<br>      - /opt/adguardhome/conf:/opt/adguardhome/conf:ro<br>    environment:<br>      AGHSYNC_DATA: /app/data</pre><pre>volumes:<br>  aghsync-data:</pre><p>The AdGuard Home configuration directory is mounted into the AGHSync container as read-only.</p><p>The watchdog can then be configured to monitor:</p><pre>/opt/adguardhome/conf/AdGuardHome.yaml</pre><p>Read-only access is sufficient because AGHSync only needs to detect that the file changed. Configuration synchronization itself is performed through the AdGuard Home API.</p><h3>Concurrent Synchronization</h3><p>When several slave instances are configured, AGHSync synchronizes them concurrently.</p><p>Consider an environment with five secondary DNS servers.</p><p>A sequential process would update the first server, wait for it to complete, move to the second server, and continue until all five had finished.</p><p>AGHSync instead processes slave instances concurrently.</p><p>Conceptually, the workflow looks like this:</p><pre>Read configuration from master<br>              │<br>              ├── Sync Slave 1<br>              ├── Sync Slave 2<br>              ├── Sync Slave 3<br>              ├── Sync Slave 4<br>              └── Sync Slave 5</pre><p>This reduces the total duration of a synchronization run and prevents one slow server from delaying updates to all the others.</p><p>The final run status summarizes whether all destinations succeeded or whether one or more instances failed.</p><h3>Understanding What Changed</h3><p>Knowing that a synchronization completed is useful.</p><p>Knowing exactly what changed is much more useful.</p><p>AGHSync maintains a complete synchronization history containing:</p><ul><li>Run status</li><li>Trigger source</li><li>Start time</li><li>Duration</li><li>Results for each slave</li><li>Results for each configuration category</li><li>Whether a configuration change was applied</li></ul><p>A run can have one of several outcomes:</p><ul><li><strong>Success</strong></li><li><strong>Partial Failure</strong></li><li><strong>Error</strong></li></ul><p>A partial failure indicates that some operations completed successfully while others did not.</p><p>For example, three slave instances may synchronize correctly while one offline instance fails.</p><p>This distinction is important because it prevents a single unavailable server from making an otherwise successful run appear completely unsuccessful.</p><h3>Configuration Diff Viewer</h3><p>AGHSync includes a detailed diff viewer for synchronization results.</p><p>When a configuration category differs between the master and a slave, AGHSync records the difference.</p><p>The run details page displays an indicator next to configuration types where an actual change was applied.</p><p>Opening a result shows a unified diff:</p><pre>- old configuration value<br>+ new configuration value</pre><p>Removed lines are displayed separately from added lines, and a summary badge shows the number of additions and removals.</p><p>The comparison uses a longest common subsequence, or LCS, based diff process.</p><p>This history is useful when:</p><ul><li>Troubleshooting an unexpected DNS behavior</li><li>Auditing configuration changes</li><li>Confirming that a rewrite was propagated</li><li>Checking when a filtering setting changed</li><li>Comparing the state before and after a synchronization</li><li>Identifying which slave required an update</li></ul><p>Instead of seeing only “Sync completed,” the administrator can see what the synchronization actually did.</p><h3>More Than a Sync Status Dashboard</h3><p>The main dashboard provides an overview of both synchronization and DNS activity.</p><p>For every AdGuard Home instance, AGHSync can display:</p><ul><li>AdGuard Home version</li><li>Total DNS queries</li><li>Queries blocked by filters</li><li>Malware or phishing requests blocked</li><li>Average DNS processing time</li></ul><p>These statistics refresh automatically every 60 seconds.</p><p>The dashboard also displays:</p><ul><li>The current master instance</li><li>Current synchronization activity</li><li>The latest run result</li><li>Instance availability</li><li>Recent configuration changes</li></ul><p>This makes AGHSync useful as a lightweight multi-instance AdGuard Home overview, even when no synchronization is currently running.</p><p>It does not replace a full monitoring platform, but it provides the operational information required for daily administration.</p><h3>Notifications After Every Run</h3><p>Administrators should not need to keep the AGHSync dashboard open.</p><p>AGHSync can send a notification after each synchronization run, including a summary of the result and what changed for each instance.</p><p>Three notification providers are supported.</p><h3>Shoutrrr</h3><p>Shoutrrr provides a common notification format for services including:</p><ul><li>Slack</li><li>Discord</li><li>Telegram</li><li>Gotify</li><li>ntfy</li><li>SMTP email</li><li>Additional messaging platforms</li></ul><p>Example URL formats include:</p><pre>slack://token@channel<br>discord://token@id<br>telegram://token@telegram?chats=@channel<br>gotify://hostname/token</pre><h3>GreenAPI</h3><p>GreenAPI support allows synchronization notifications to be delivered through WhatsApp.</p><p>The configuration includes:</p><ul><li>GreenAPI instance ID</li><li>API token</li><li>Recipient telephone number</li><li>Optional cluster-specific API address</li></ul><h3>Self-Hosted WhatsApp Web</h3><p>AGHSync can also send messages through a self-hosted go-whatsapp-web-multidevice instance.</p><p>This is useful for users who prefer to keep their notification service within their own environment.</p><p>Each notification channel can be configured independently to notify on:</p><ul><li>Successful runs</li><li>Failed or partially failed runs</li></ul><p>Channels can also be disabled without being deleted.</p><p>A Send Test function sends a real notification before the configuration is saved, helping verify that credentials, addresses, and recipients are correct.</p><h3>Installing AGHSync with Docker</h3><p>Docker is the recommended way to deploy AGHSync.</p><p>A minimal deployment requires one port and one persistent volume:</p><pre>docker run -d \<br>  --name aghsync \<br>  --restart unless-stopped \<br>  -p 8080:8080 \<br>  -v aghsync-data:/app/data \<br>  -e AGHSYNC_DATA=/app/data \<br>  techblog/aghsync:latest</pre><p>After the container starts, open:</p><pre>http://localhost:8080</pre><p>The persistent volume stores the AGHSync database.</p><p>A basic Docker Compose configuration looks like this:</p><pre>services:<br>  aghsync:<br>    image: techblog/aghsync:latest<br>    container_name: aghsync<br>    restart: unless-stopped<br>    ports:<br>      - &quot;8080:8080&quot;<br>    volumes:<br>      - aghsync-data:/app/data<br>    environment:<br>      AGHSYNC_DATA: /app/data<br>      LOG_LEVEL: info</pre><pre>volumes:<br>  aghsync-data:</pre><p>Start it with:</p><pre>docker compose up -d</pre><p>AGHSync publishes Docker images for the following platforms:</p><ul><li>Linux AMD64</li><li>Linux ARM64</li><li>Linux ARMv7</li></ul><p>This allows it to run on standard servers, virtual machines, NAS platforms, and many Raspberry Pi systems.</p><h3>Where AGHSync Can Be Useful</h3><h3>Home Labs</h3><p>Maintain identical DNS filtering and rewrite rules across redundant DNS servers.</p><h3>Small Offices</h3><p>Manage primary and secondary AdGuard Home servers without manually repeating every policy update.</p><h3>Multi-Site Environments</h3><p>Use one master policy and distribute selected settings to DNS servers at several locations.</p><h3>IoT Networks</h3><p>Keep local DNS rewrites and filtering policies consistent across isolated or remote IoT environments.</p><h3>Development Laboratories</h3><p>Synchronize DNS behavior between development, test, and validation infrastructure where consistent name resolution is required.</p><h3>Raspberry Pi Deployments</h3><p>Run secondary AdGuard Home instances on small ARM devices while centrally controlling their configuration.</p><h3>Disaster-Recovery DNS</h3><p>Maintain a standby server with current configuration so it can take over when the primary server becomes unavailable.</p><h3>Conclusion</h3><p>Redundant DNS servers improve availability, but redundancy without synchronization introduces a different kind of risk.</p><p>When two AdGuard Home instances use different filtering rules, rewrites, security settings, or blocked-service policies, DNS behavior becomes unpredictable.</p><p>AGHSync solves this by establishing a clear source of truth.</p><p>One instance becomes the master, while selected configuration categories are synchronized to every enabled slave.</p><p>But AGHSync goes beyond copying configuration.</p><p>It provides:</p><ul><li>Centralized instance management</li><li>Granular synchronization controls</li><li>Scheduled and event-driven synchronization</li><li>A cross-platform filesystem watchdog</li><li>Concurrent synchronization</li><li>Online and offline monitoring</li><li>AdGuard Home statistics</li><li>Detailed run history</li><li>Per-configuration diff views</li><li>Multi-channel notifications</li><li>Encrypted credentials</li><li>UI and API protection</li><li>Backup and restore</li><li>A documented REST API</li><li>Docker and standalone deployments</li></ul><p>The result is a practical management layer for anyone operating more than one AdGuard Home server.</p><p>Instead of asking:</p><blockquote><em>“Did I remember to update the secondary DNS server?”</em></blockquote><p>AGHSync makes the answer visible, automated, and verifiable.</p><p>The project is available on GitHub. Contributions, feedback, issue reports, and feature ideas are welcome.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5bf41358c056" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Stop Running Manual Speed Tests: Monitor Your Connection Automatically]]></title>
            <link>https://medium.com/@tomer.klein/stop-running-manual-speed-tests-monitor-your-connection-automatically-135d014d013d?source=rss-7d5bb883dd6------2</link>
            <guid isPermaLink="false">https://medium.com/p/135d014d013d</guid>
            <category><![CDATA[internet]]></category>
            <category><![CDATA[automation]]></category>
            <category><![CDATA[speed-test]]></category>
            <category><![CDATA[docker]]></category>
            <dc:creator><![CDATA[Tomer Klein]]></dc:creator>
            <pubDate>Mon, 03 Aug 2026 14:23:03 GMT</pubDate>
            <atom:updated>2026-08-03T14:23:03.224Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*_WRoAcZF-P5kIz6I.png" /></figure><p>Most of us only test our internet connection when something feels wrong.</p><p>A video call starts freezing, a download takes longer than expected, or someone in the house asks the familiar question:</p><blockquote><em>“Is the internet slow?”</em></blockquote><p>We then open a speed-testing website, run a single test, look at the result, and move on.</p><p>The problem is that one test provides only a snapshot. It does not tell us whether the connection has been unstable throughout the day, whether latency increases every evening, or whether the upload speed regularly drops below the level promised by the internet service provider.</p><p>For a home lab, remote office, development environment, or IoT site, internet connectivity is part of the infrastructure. It should be monitored like any other infrastructure component.</p><p>That is why I created <strong>Speedtest Exporter</strong>: a lightweight, self-hosted application that automatically measures internet performance, stores historical results, exposes Prometheus metrics, displays everything in a responsive dashboard, and sends notifications when performance falls below configured thresholds.</p><p>The project is written in pure Go and can run as a standalone binary or as a Docker container. It includes its own speed-testing engine, so no external Speedtest binary is required for the default setup.</p><h3>Why Another Speed Test Exporter?</h3><p>There are already scripts and exporters that periodically run a speed test and expose the results to Prometheus.</p><p>However, I wanted something that could operate as a complete monitoring application — not just a script that returns three numbers.</p><p>My main requirements were:</p><ul><li>A built-in web dashboard</li><li>Automatic and manually triggered tests</li><li>Historical result storage</li><li>Prometheus integration</li><li>Threshold-based notifications</li><li>Real-time test progress</li><li>Support for several notification platforms</li><li>Simple Docker deployment</li><li>No mandatory external Speedtest binary</li><li>A single portable application</li><li>Runtime configuration without editing files or restarting the service</li></ul><p>The result grew into a small internet observability platform that can work independently or become part of an existing Prometheus and Grafana monitoring stack.</p><h3>What Is Speedtest Exporter?</h3><p>Speedtest Exporter is a self-hosted service that periodically tests an internet connection and records several important measurements:</p><ul><li>Download speed</li><li>Upload speed</li><li>Ping latency</li><li>Jitter</li><li>Packet loss</li><li>Test duration</li><li>Selected Speedtest server</li><li>ISP information</li><li>Test time and status</li></ul><p>The application stores results locally in SQLite and displays them in a browser-based dashboard.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/390/0*VMswPsq9HkrrxTbS.png" /></figure><p>It also exposes a Prometheus-compatible /metrics endpoint, allowing the measurements to be collected by Prometheus and visualized in Grafana alongside the rest of your infrastructure.</p><p>Tests can be started in four main ways:</p><ol><li>Automatically through the built-in scheduler</li><li>Manually from the web interface</li><li>Through the REST API</li><li>From the command line</li></ol><p>Regardless of how a test starts, it follows the same internal pipeline: run the test, save the result, update the metrics, evaluate thresholds, and send any required notifications.</p><h3>A Dashboard for More Than the Latest Result</h3><p>The dashboard is designed to make the current state of the connection immediately understandable.</p><p>The latest download speed is displayed using an animated gauge. Additional cards show the upload speed, ping, jitter, packet loss, selected server, and other details from the most recent test.</p><p>Historical information is displayed using:</p><ul><li>A seven-day summary</li><li>Download and upload history charts</li><li>A paginated results table</li><li>Trend indicators comparing each test with the previous one</li></ul><p>The trend indicators make it easy to identify whether performance improved or declined between tests.</p><p>The interface is also responsive and designed for desktop and mobile use. On smaller screens, bottom navigation provides quick access to the dashboard, settings, alerts, and the manual test action.</p><p>This means the application can be checked easily from a phone without needing access to Grafana.</p><h3>Two Different Testing Engines</h3><p>Speedtest Exporter supports two speed-testing backends.</p><h3>The Built-In Go Engine</h3><p>The default backend is implemented in Go and does not require another executable to be installed.</p><p>This keeps deployment simple. The container or binary already contains everything required to run a test.</p><p>It is particularly useful for:</p><ul><li>Minimal Linux installations</li><li>Containers</li><li>Home lab servers</li><li>Small virtual machines</li><li>Remote gateways</li><li>Systems where installing an additional package is undesirable</li></ul><h3>The Official Ookla CLI</h3><p>Users who prefer the official Ookla Speedtest CLI can select the ookla backend.</p><p>In this mode, Speedtest Exporter runs the external Speedtest executable and processes its output.</p><p>The backend can be selected through the configuration file, an environment variable, or directly from the web interface.</p><h3>Selecting a Preferred Test Server</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*vNgPlKOBABGOX48p.png" /></figure><p>Automatically selecting the nearest server is convenient, but it is not always ideal for long-term monitoring.</p><p>Changing servers between tests can introduce variations that are caused by the test infrastructure rather than the internet connection itself.</p><p>Speedtest Exporter includes a server browser that lists available Speedtest.net servers and sorts them by distance.</p><p>A preferred server can then be selected from the web interface.</p><p>Future tests will try that server first. When it is unavailable or a test against it fails, the application automatically falls back to the nearest available server instead of failing the entire scheduled test.</p><p>Using a consistent server can make historical comparisons more meaningful, especially when investigating recurring performance issues.</p><h3>Scheduling Automatic Tests</h3><p>The built-in scheduler supports standard cron expressions and Go-style scheduling expressions.</p><p>For example:</p><pre>@every 1h</pre><p>runs a test every hour.</p><p>A standard cron expression can also be used:</p><pre>0 */6 * * *</pre><p>This runs a test every six hours.</p><p>The scheduler includes protection against overlapping tests. If a scheduled test is triggered while another test is still running, the additional execution is skipped rather than starting a second bandwidth-intensive operation.</p><p>The schedule can be modified from the Settings page and takes effect without restarting the application.</p><p>For most home connections, running a test every hour or every few hours provides enough historical information without consuming unnecessary bandwidth.</p><h3>Prometheus Metrics and Grafana Integration</h3><p>The application exposes its metrics through:</p><pre>GET /metrics</pre><p>The available measurements include:</p><pre>speedtest_download_mbps<br>speedtest_upload_mbps<br>speedtest_ping_ms<br>speedtest_jitter_ms<br>speedtest_packet_loss_ratio<br>speedtest_last_test_timestamp_seconds<br>speedtest_tests_total<br>speedtest_test_duration_seconds<br>speedtest_threshold_breaches_total</pre><p>The exporter also provides server information using labels such as the server name, server ID, and ISP.</p><p>A minimal Prometheus configuration looks like this:</p><pre>scrape_configs:<br>  - job_name: speedtest<br>    static_configs:<br>      - targets:<br>          - speedtest-exporter:9090<br>    scrape_interval: 60s</pre><p>Once Prometheus collects the metrics, Grafana can be used to create longer-term dashboards and correlations.</p><p>For example, internet performance can be compared with:</p><ul><li>Router CPU usage</li><li>Interface traffic</li><li>Wi-Fi signal quality</li><li>Packet loss monitoring</li><li>Application response times</li><li>Cloudflare Tunnel connectivity</li><li>Remote gateway availability</li></ul><p>This is where a simple speed test becomes a useful part of a broader observability platform.</p><h3>Threshold-Based Notifications</h3><p>Collecting metrics is valuable, but users should not need to constantly watch a dashboard.</p><p>Speedtest Exporter can evaluate every completed test against configurable thresholds.</p><p>Notifications can be triggered when:</p><ul><li>Download speed falls below a minimum</li><li>Upload speed falls below a minimum</li><li>Ping rises above a maximum</li><li>Jitter rises above a maximum</li><li>Packet loss exceeds a configured ratio</li></ul><p>For example, a connection that is expected to provide at least 500 Mbps download speed could use a lower threshold of 350 Mbps.</p><p>When a result falls below that value, the application sends an alert through the configured notification channels.</p><p>A cooldown period prevents the same condition from generating repeated messages after every scheduled test.</p><p>Thresholds can be enabled or disabled individually by setting their value to zero.</p><h3>Running Speedtest Exporter with Docker</h3><p>The fastest way to start the application is through Docker:</p><pre>docker run -d \<br>  --name speedtest-exporter \<br>  --restart unless-stopped \<br>  -p 9090:9090 \<br>  -v &quot;$(pwd)/data:/data&quot; \<br>  -e SPEEDTEST_DATA_DIR=/data \<br>  -e SPEEDTEST_SCHEDULE=&quot;@every 1h&quot; \<br>  techblog/speedtest-exporter:latest</pre><p>After the container starts, open:</p><pre>http://localhost:9090</pre><p>The mounted data directory stores the SQLite database and other persistent information.</p><p>For an existing Docker Compose environment, the service can be defined as follows:</p><pre>services:<br>  speedtest-exporter:<br>    image: techblog/speedtest-exporter:latest<br>    container_name: speedtest-exporter<br>    restart: unless-stopped<br>    ports:<br>      - &quot;9090:9090&quot;<br>    volumes:<br>      - ./data:/data<br>    environment:<br>      SPEEDTEST_DATA_DIR: /data<br>      SPEEDTEST_SCHEDULE: &quot;@every 1h&quot;</pre><p>The repository also contains a Docker Compose setup that includes Speedtest Exporter, Prometheus, and Grafana for users who want to deploy a complete monitoring stack.</p><h3>Conclusion</h3><p>Internet connectivity is too important to monitor only when someone notices a problem.</p><p>A manual speed test answers one question:</p><blockquote><em>How fast is the connection right now?</em></blockquote><p>Continuous monitoring answers more useful questions:</p><ul><li>When did performance begin to decline?</li><li>Does the slowdown happen at the same time every day?</li><li>Is download speed affected, upload speed, or both?</li><li>Is the actual problem bandwidth, latency, jitter, or packet loss?</li><li>Did performance improve after changing the router or ISP?</li><li>How often does the connection fall below an acceptable threshold?</li></ul><p>Speedtest Exporter turns isolated speed tests into historical, measurable, and actionable information.</p><p>It combines automated tests, SQLite storage, a responsive dashboard, live progress updates, Prometheus metrics, a REST API, encrypted notification credentials, and multi-channel alerts in one lightweight Go application.</p><p>The project is open source and available on GitHub. Contributions, feature suggestions, bug reports, and feedback are welcome.</p><p>Because when the inevitable question comes —</p><blockquote><em>“Is the internet slow?”</em></blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=135d014d013d" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[From Open Ports to Zero Trust: Securing My Home Lab]]></title>
            <link>https://medium.com/@tomer.klein/from-open-ports-to-zero-trust-securing-my-home-lab-c46d2aabf0b7?source=rss-7d5bb883dd6------2</link>
            <guid isPermaLink="false">https://medium.com/p/c46d2aabf0b7</guid>
            <category><![CDATA[cloudflare]]></category>
            <category><![CDATA[security]]></category>
            <category><![CDATA[auth-service]]></category>
            <category><![CDATA[zero-trust-security]]></category>
            <category><![CDATA[homelab]]></category>
            <dc:creator><![CDATA[Tomer Klein]]></dc:creator>
            <pubDate>Sun, 22 Feb 2026 22:22:44 GMT</pubDate>
            <atom:updated>2026-02-22T22:22:44.594Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*uZUHHUxxk7pTCieZr_NOGw.png" /></figure><p>Running a home lab is fun. You get to experiment, build systems, break things, and learn a lot along the way. But once you start exposing internal services to the internet, things become more complicated.</p><p>In my setup, I’m running multiple Prometheus exporters: node exporters, n8n metrics, ESXi monitoring, custom services, and more. All of them are essential for observability, but none of them were designed to be exposed publicly.</p><p>At first, I went with the usual approach: open a port, put it behind a reverse proxy, maybe add basic authentication, and move on. It worked, but it never felt right. I kept seeing scans in the logs, random requests, and failed login attempts. Even if nothing had been compromised, it was clear the setup was fragile. I wanted something better.</p><p>My goal was simple:</p><ul><li>No open inbound ports</li><li>No direct exposure to the internet</li><li>Only trusted systems allowed</li><li>Protection against automated attacks</li><li>Minimal maintenance</li></ul><p>This article describes how I built a secure access layer around my monitoring stack using Cloudflare Tunnel and Access policies, and how this completely changed how I expose services in my home lab.</p><h4>Why I Chose Cloudflare Tunnel</h4><p>I wanted to remove all inbound connections to my home lab:</p><ul><li>No open ports.</li><li>No public services.</li><li>No direct access from the internet.</li></ul><p>Cloudflare Tunnel made this possible.<br>Instead of exposing services, I run a small agent inside my network.<br>It creates an outbound connection to Cloudflare.</p><p>All traffic goes through that tunnel.<br>Nothing listens on public ports.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*_HTcC2pWGfQPquqh.png" /></figure><h3>From Design to Deployment</h3><h4>Prerequisites</h4><p>Before implementing this setup, a few basic requirements are needed.</p><p>First, your domain must be managed by Cloudflare.<br>All relevant DNS records should be routed through Cloudflare.</p><p>Second, you need an active <a href="https://tomerklein.dev/cloudflare-tunnel-revolutionizing-network-security-89eb4cc0a1e8">Cloudflare Zero Trust account</a>.<br>This enables Access policies, service tokens, and tunnel management.</p><p>With these two components in place, the rest of the setup can be done entirely from the Cloudflare dashboard and the local agent.</p><p>Cloudflare Tunnel operates primarily by establishing outbound-only, persistent connections from your infrastructure to the Cloudflare edge, typically utilizing <a href="https://www.google.com/search?q=TLS-encrypted+HTTP%2F2+or+QUIC+%28HTTP%2F3%29+tunnels&amp;sca_esv=4e1b0ad867098811&amp;sxsrf=ANbL-n6DeGKVvyS0Wwjewfrx4nHtjW97JA%3A1771758892369&amp;ei=LOWaaZymFrzri-gP8PuLmA8&amp;biw=1920&amp;bih=911&amp;oq=underlying+layer+in+cloudflare+t&amp;gs_lp=Egxnd3Mtd2l6LXNlcnAiIHVuZGVybHlpbmcgbGF5ZXIgaW4gY2xvdWRmbGFyZSB0KgIIADIFECEYoAFInHZQlQ1Yw2pwBHgBkAEAmAGpAaAB1xWqAQQwLjE5uAEDyAEA-AEBmAIXoAKaFsICChAAGLADGNYEGEfCAgUQABiABMICChAAGIAEGEMYigXCAgsQABiABBiGAxiKBcICBhAAGBYYHsICBRAAGO8FwgIIEAAYgAQYogTCAgUQIRifBcICBxAhGKABGAqYAwCIBgGQBgiSBwQ0LjE5oAe2d7IHBDAuMTm4B5AWwgcEMS4yMsgHKIAIAA&amp;sclient=gws-wiz-serp&amp;ved=2ahUKEwiyyYCn_OySAxUaygIHHT4cHYUQgK4QegQIARAB"><strong>TLS-encrypted HTTP/2 or QUIC (HTTP/3) tunnels</strong></a>. These secure tunnels operate at Layer 7 to handle application traffic (HTTP/S) but are underpinned by <a href="https://www.google.com/search?q=Layer+4+%28TCP%2FUDP%29+protocols+for+connection+establishment&amp;sca_esv=4e1b0ad867098811&amp;sxsrf=ANbL-n6DeGKVvyS0Wwjewfrx4nHtjW97JA%3A1771758892369&amp;ei=LOWaaZymFrzri-gP8PuLmA8&amp;biw=1920&amp;bih=911&amp;oq=underlying+layer+in+cloudflare+t&amp;gs_lp=Egxnd3Mtd2l6LXNlcnAiIHVuZGVybHlpbmcgbGF5ZXIgaW4gY2xvdWRmbGFyZSB0KgIIADIFECEYoAFInHZQlQ1Yw2pwBHgBkAEAmAGpAaAB1xWqAQQwLjE5uAEDyAEA-AEBmAIXoAKaFsICChAAGLADGNYEGEfCAgUQABiABMICChAAGIAEGEMYigXCAgsQABiABBiGAxiKBcICBhAAGBYYHsICBRAAGO8FwgIIEAAYgAQYogTCAgUQIRifBcICBxAhGKABGAqYAwCIBgGQBgiSBwQ0LjE5oAe2d7IHBDAuMTm4B5AWwgcEMS4yMsgHKIAIAA&amp;sclient=gws-wiz-serp&amp;ved=2ahUKEwiyyYCn_OySAxUaygIHHT4cHYUQgK4QegQIARAC">Layer 4 (TCP/UDP) protocols for connection establishment</a>.</p><p>Next, we need to create and install <strong>Cloudflared Tunnel,</strong> which is responsible for:</p><ul><li><strong>Establish Underlying Transport Layer:</strong> Cloudflare Tunnel (cloudflared) creates a persistent connection to the nearest Cloudflare edge node. It typically uses HTTP/2 or QUIC (HTTP/3) wrapped in TLS, which provides security and multiplexing for multiple applications over a single connection.</li><li><strong>Layer 4 (TCP/UDP):</strong> The initial connection from the connector (cloudflared) to the Cloudflare network is established using TCP or UDP (for QUIC).</li><li><strong>Layer 7 (HTTP/S):</strong> Once established, the tunnel handles web application traffic, routing HTTP/S requests to specific hostnames.</li><li><strong>Security &amp; Encryption:</strong> The connection is encrypted via mutual TLS (mTLS) to ensure secure communication between your origin and the Cloudflare edge.</li></ul><p>To install the Cloudflared agent, we first need to create the Tunnel. To do so, on Cloudflare’s main page, navigate to “Networking” and select “Tunnels”:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/271/1*nyTwWvueFVIo3c3TTjvwVw.png" /></figure><p>Next, click on the “+ Create Tunnel” button in the upper-right corner of the page:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*hzn7jKuKXIh5TFuIeLTPUQ.png" /></figure><p>Give your tunnel a name and click on the “Create Tunnel” button:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/679/1*x4DCZl8QPF3g_NIMYUVZWQ.png" /></figure><p>Next, select the OS and Architecture of the target server and run the installation commands:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/733/1*lSxPZ9S9OJ0S6YN6HGRyeg.png" /></figure><p>After the installation, wait for the connector to connect. The status will appear the the “Connection Status” at the bottom of the page:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/664/1*3rKD787uoRWyDTMnuNCqVQ.png" /></figure><p>And click on the “Continue” button to complete the installation, you will now see the list of tunnels:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/940/1*RpI8WbtjWN-wr54NV_i2qQ.png" /></figure><p>To configure the tunnel and routes, click on the “…” on the right side:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/928/1*cCsJW0u2kOHZ0LUjqpfz7w.png" /></figure><p>And click on “Configure”:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/919/1*dVaqYZAGbfs3wTpP6wdyxA.png" /></figure><p>In this screen, you will be able to:</p><ul><li>Update the tunnel name.</li><li>Add routes (Expose applications and more).</li><li>See the connector information (IP, version, uptime, and more).</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*qImrUGceEeyvkgSsrOaPIg.png" /></figure><blockquote><strong>Important</strong>! If you expose an application without an Access Application and Policy, anyone can access it.</blockquote><h3>Securing the application</h3><p>By default, the exposed application will be accessible to anyone, unless you secure it using the Access application and policies.</p><p>The access policy can have one of the following actions:</p><ul><li><strong>Allow</strong>: Grant access after authentication.</li><li><strong>Block</strong>: Explicitly deny access.</li><li><strong>Bypass</strong>: Skip Access authentication completely.</li><li><strong>Service Auth</strong>: Machine-to-machine authentication (no humans).</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*nLDYcR1nBg6_GUgJuDANBQ.png" /></figure><p>In this article, I’ll cover the “Service Auth” used for machine-to-machine communication, allowing my Prometheus scraper to access exporters installed on multiple networks.</p><p><strong>What happens:</strong></p><ul><li>Requires a <strong>Service Token</strong>:<br>CF-Access-Client-Id<br>CF-Access-Client-Secret</li><li>No browser login.</li><li>No UI.</li><li>Used for automated systems.</li></ul><p><strong>Typical use:</strong></p><ul><li>Prometheus exporters</li><li>API integrations</li><li>CI/CD pipelines</li><li>n8n / automation</li><li>Backend services</li></ul><p><strong>Example:</strong></p><blockquote><em>“Allow requests with valid service token headers.”</em></blockquote><h4>Step A — Create new Service Token</h4><p>Before we can create the <strong>Policy</strong>, we need to create the “<strong>Service Token</strong>” that will secure the connection. To do so, navigate to the “Zero Trust” from the main menu:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/268/1*EvJUahjAxqDZha5kgBJ7Ug.png" /></figure><p>And then to “Access controls” → “Service credentials”:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/228/1*uuOxQi9BPO9BQZAMwXVH8Q.png" /></figure><p>Next, under “Service Tokens” click on the “+ Create Service Token”:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8Jhgy4BhmULJ4BTWAztUWw.png" /></figure><p>Give the token a name, set the duration, and click on “Generate Token”</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*eFPhqUe8kaetGA6CGKbRcA.png" /></figure><blockquote>It’s highly recommended to set a short-lived duration.</blockquote><p>Next, copy the <strong>CF-Access-Client-Id</strong> and <strong>CF-Access-Client-Secret</strong>, which we will need later to access the exporters from Prometheus.</p><p>Click on the save button to save the changes.</p><h4>Step B — Create new Access Policy</h4><p>The next step of securing the application is creating the access policy that defines what action to use and its parameters.</p><p>To create the policy, navigate to “Access controls” → “Policies”:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/235/1*SLM_cg3iyDnOHNx6M1bhcw.png" /></figure><p>And click on “+ Add policy”:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ASE5I6bUnAJ3bk5Z5O0vRQ.png" /></figure><p>Configure the policy with the following:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*tzxjtef2byQnR0BL-jqh1g.png" /></figure><ul><li><strong>Policy name</strong>: any meaningful name.</li><li><strong>Action</strong>: Service Auth.</li><li><strong>Include</strong>:<br><strong>Selector</strong>: Service Token<br><strong>Value</strong>: The service token we created in the previous step.</li></ul><p>And click on the “Save” button to create the policy.</p><p>You should now see the new policy in the list of policies as follows:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*qOYRZBPTuEHTeym4skYnGg.png" /></figure><h4>Step C — Create new Access Application</h4><p>The “Access Application” is the core object that defines what you are protecting and how Cloudflare should secure it.</p><p>Before starting, identify:</p><ul><li>The public hostname (DNS record)</li><li>The internal service address</li><li>The required access type (human, machine, or both)</li></ul><p>To create a new Access Application, navigate to “Access Controls” → “Applications:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/225/1*3XF1NE0wl0dpOF5Sxa1wDg.png" /></figure><p>And click on the “+ Add an application” button:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*dTKds1mJy8KsFdbnHhE3XQ.png" /></figure><p>Next, select “Self-hosted”:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*xKt8s9WlXuwDe1HfagsvPw.png" /></figure><p>Next, set the following parameters:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*BX2jrQ0FMJC-KwrXCcfzeg.png" /></figure><ul><li><strong>Application Name</strong>: Meaningful name for the application.</li><li><strong>Session Duration</strong>: You can leave the default of 24 Hours.</li></ul><p>As for “Public hostname”, by default, each application can protect up to 5 hostnames. For most use cases, it’s more than enough. If you would like to use the same application with more than 5 hostnames, you can use a wildcard hostname like the following:</p><ul><li>-exporter.domain.com.</li></ul><p>This way, the following URLs will be secured by the application:</p><ul><li>esxi-exporter.domain.com</li><li>jfrog-exporter.domain.com</li><li>tasmota-exporter.domain.com</li><li>my-exporter.domain.com</li></ul><p>When finished, click Next at the bottom of the page,then click “Save” to save the new policy.</p><p>The Policy will be added to the policies list:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0vcY3d3hIAGRwJQxi3LrWg.png" /></figure><p>Now, if you try to access the protected URL, you will be blocked by Cloudflare before your request even gets to the device running to application:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/781/1*yT2qbdnEOoVuoImFAKF4DQ.png" /></figure><p>This is the default Cloudflare block page. You can change it from the configuration to a redirect URL for hosting your own page (<a href="https://github.com/t0mer/sg-404">https://github.com/t0mer/sg-404</a>):</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-RODMUYsnTIwMCunhNYO2A.png" /></figure><h4>Step D — Configure Prometheus scraper</h4><p>To allow access from the Prometheus scraper to the exporter, add the following headers to the scraper job, as follows:</p><pre>  - job_name: &#39;MyJob&#39;<br>    scrape_interval: 60s<br>    honor_labels: true<br>    static_configs:<br>      - targets: [&#39;my-exporter.domain.com&#39;]<br>    http_headers:<br>      CF-Access-Client-Id:<br>        values: [&#39;[Client_Id].access&#39;]<br>      CF-Access-Client-Secret:<br>        values: [&#39;[Client_Secret]&#39;]</pre><p>Restart Prometheus to reload the configuration.</p><h3>Wrapping up</h3><p>This article describes how I transformed my home lab from a traditional port-exposed setup into a secure, Zero Trust–based environment using Cloudflare Tunnel and Access policies. After facing constant scans and security concerns with publicly exposed services, I eliminated all inbound ports and routed traffic through encrypted outbound tunnels. By combining Cloudflare Tunnel with Service Authentication and Access Applications, I secured Prometheus exporters and internal services using machine-to-machine tokens instead of public access or basic authentication. I deliberately chose Service Tokens over IP allowlists to avoid managing static address lists and to enable a more dynamic and versatile access model. The result is a resilient, low-maintenance architecture that blocks unauthorized traffic at the edge, protects against automated attacks, and allows only trusted systems to access critical monitoring infrastructure.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c46d2aabf0b7" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Virtualizing Android on VMware ESXi for WhatsApp Automation]]></title>
            <link>https://medium.com/@tomer.klein/virtualizing-android-on-vmware-esxi-for-whatsapp-automation-44e0044666fd?source=rss-7d5bb883dd6------2</link>
            <guid isPermaLink="false">https://medium.com/p/44e0044666fd</guid>
            <category><![CDATA[virtualization]]></category>
            <category><![CDATA[whatsapp]]></category>
            <category><![CDATA[homelab]]></category>
            <category><![CDATA[android]]></category>
            <category><![CDATA[automation]]></category>
            <dc:creator><![CDATA[Tomer Klein]]></dc:creator>
            <pubDate>Sat, 17 Jan 2026 20:06:26 GMT</pubDate>
            <atom:updated>2026-01-17T20:48:40.864Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zEoy9KQv56JtN7G-h2TkJw.png" /></figure><p>Android is one of the most widely used operating systems in the world, powering billions of smartphones and tablets. In most cases, there is little reason to install Android on a physical computer. However, when working with development, testing, or long-running automation workloads, running Android inside a virtual machine can become not only useful but necessary. Thanks to Android-x86, Android can run reliably on virtualization platforms such as VMware Workstation, VirtualBox, and VMware ESXi.</p><p>While building WhatsApp-based automation solutions using WhatsApp Web and the Green API, I encountered a critical limitation. WhatsApp requires a phone that is always connected to the internet. Once the phone disconnects, WhatsApp Web sessions are terminated, disrupting automation flows and requiring re-authentication. Relying on a physical device proved fragile, difficult to monitor, and unsuitable for long-term, always-on scenarios.</p><p>To solve this, I moved WhatsApp to an Android virtual machine running on VMware ESXi. By hosting Android as a virtual machine VM), I gained a stable, server-grade environment that remains online 24/7, survives reboots, and eliminates the dependency on physical hardware. The result is a reliable, scalable foundation for WhatsApp automation, with WhatsApp Web sessions remaining active and automation flows running continuously without interruption.</p><h3>Setting Up a New Android Virtual Machine on VMware ESXi</h3><p>Before installing Android, the first step is to create a new virtual machine in VMware ESXi. This section walks through the full VM creation process using the ESXi Host Client, exactly as shown in the screenshots below.</p><p>Click <a href="https://kutit.xyz/android">here </a>to download the <a href="https://static.tomerklein.dev/Android/Iso/android-x86_64-9.0-r2.iso">android-x86_64–9.0-r2.iso</a> file.</p><h4><strong>Step 1: Create a New Virtual Machine</strong></h4><p>From the <strong>ESXi Host Client</strong>, open the <strong>Virtual Machines</strong> view. This screen lists all existing VMs on the host.</p><p>Click <strong>Create/Register VM to create </strong>a new virtual machine.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/967/1*GraCYkyh9XgVo3hR4ySB_w.png" /></figure><h4><strong>Step 2: Select Creation Type</strong></h4><p>Choose <strong>Create a new virtual machine</strong>.</p><p>This option gives full control over hardware settings, which is required when installing Android-x86 manually from an ISO image.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/947/1*2B9KxRJX_qLwBUzEJTTt5Q.png" /></figure><h4>Step 3: Define VM Name and Guest OS</h4><p>Set a meaningful name for the VM, such as Android or Android-WhatsApp.</p><p>Configure the guest OS as follows:</p><ul><li><strong>Compatibility</strong>: ESXi 7.0 U2 virtual machine (or your current version)</li><li><strong>Guest OS Family</strong>: Linux</li><li><strong>Guest OS Version</strong>: Other Linux (64-bit)</li></ul><p>Android-x86 is not listed explicitly, so this configuration works best.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/946/1*kGfuMW8mRZG2RJpIW4_RGA.png" /></figure><h4>Step 4: Select Datastore</h4><p>Choose the datastore where the VM configuration files and virtual disk will be stored.</p><p>Make sure the selected datastore has enough free space for Android, WhatsApp, and future data growth.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/945/1*brpA5r-UCo8f5IcLv2UD7Q.png" /></figure><h4>Step 5: Customize Virtual Hardware</h4><p>Configure the virtual hardware with stability and performance in mind.</p><p>Recommended settings:</p><ul><li><strong>CPU</strong>: 2 vCPUs</li><li><strong>Memory</strong>: 8–16 GB</li><li><strong>Hard Disk</strong>: 16 GB or more</li><li><strong>SCSI Controller</strong>: LSI Logic Parallel</li><li><strong>Network Adapter</strong>: VM Network (Connected)</li><li><strong>USB Controller</strong>: USB 2.0</li><li><strong>CD/DVD Drive</strong>: Host device (will be attached to ISO next)</li></ul><p>These settings provide a stable environment for running Android and WhatsApp continuously.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/1*HqR9f9f14YiXFfjwzgFp2g.png" /></figure><p>Attach the Android-x86 installer ISO to the virtual CD/DVD drive.</p><p>From the <strong>Datastore Browser</strong>, select the uploaded ISO file, for example:<br> android-x86_64-9.0-r2.iso</p><p>Ensure the CD/DVD drive is <strong>Connected</strong>, so the VM boots into the installer.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/724/1*9XtOi84zeEvjV5fZ2Bvwzg.png" /></figure><h4>Step 7: Review and Complete</h4><p>Review the final VM configuration summary:</p><ul><li>CPU and memory</li><li>Disk size and provisioning</li><li>Network adapter</li><li>ISO attachment</li></ul><p>Once everything looks correct, click <strong>Finish</strong> to create the virtual machine.</p><p>The VM is now ready to be powered on and proceed with the Android installation.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3sHzlVk2hoXmzSdb2c2Gwg.png" /></figure><h3>Installing Android Inside the ESXi Virtual Machine</h3><p>Once you’ve created the Android VM and attached the Android-x86 ISO in the CD/DVD drive, you’re ready to install Android just like you would on a physical PC.</p><h4>Step 1: Power On the Android VM</h4><p>Power on the VM you created in the previous section, then open the <strong>Console</strong>. The VM will start booting from the Android-x86 ISO you attached.</p><h4>Step 2: Select the Installation Option</h4><p>When the Android installer menu appears, use the arrow keys to highlight:</p><p><strong>Installation – Install Android-x86 to harddisk</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/640/1*Lo8vHBoXJs6LIfG4dKYolw.png" /></figure><p>Then press <strong>Enter</strong> to start the installer.</p><h4>Step 3: Create or Modify Partitions</h4><p>Choose <strong>Create/Modify partitions:</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/706/1*wuG4pJ9bFSS0r8DDHWgCDw.png" /></figure><p><strong>Confirm</strong>. Select <strong>No</strong> when you see the “<em>Do you want to use GPT?</em>” question.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/732/1*UUPLZOC2PzUxZ5AZkUZLGg.png" /></figure><p>The <em>cfdisk</em> utility is now opened. Select <strong>New</strong> to create a new disk partition.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/722/1*GsMW0Q7_iS1D5J-Y3-pylQ.png" /></figure><p>Select <strong>Primary</strong> to create a primary partition.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/718/1*GYVyBeKMAhPiVLK23XskTw.png" /></figure><p>Set all available space on the virtual disk to be used as a partition for installing Android on VMware.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/721/1*mdhqm3W9ofmjd1g6Ogx9FA.png" /></figure><p>After creating a new partition, make the partition bootable. Select the partition, navigate to the <strong>Bootable</strong> option, and press <strong>Enter</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/720/1*4ngkDN2WNyO0Rwn95L_7jQ.png" /></figure><p>Once the <strong>Boot</strong> flag is enabled for the partition, save the changes to the disk. Go to the <strong>Write</strong> option and press <strong>Enter</strong>. You will then be prompted with the question:</p><p><strong>“Are you sure you want to write the partition table to disk? (yes or no)”</strong></p><p>Type <strong>yes</strong> and press <strong>Enter</strong> to confirm.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/721/1*V9Dyvj431yGygdSTpwUwMQ.png" /></figure><p>The partition has now been created. You can exit <strong>cfdisk</strong> by selecting the <strong>Quit</strong> option.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/717/1*m0MQI5qJplDki8HU2lJ8uQ.png" /></figure><p>On the <strong>Choose Partition</strong> screen, you will see the newly created 8-GB partition. Select it and click <strong>OK</strong> to proceed.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/706/1*GlDAmCFpD5RfNTfgxwfgLQ.png" /></figure><p>Choose the filesystem type and select <strong>ext4</strong> to format the <strong>sda1</strong> partition that was created in the previous step.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/712/1*L_Pex8QTM-e3i03Tl1cwIQ.png" /></figure><p><strong>Confirm</strong>. Select <em>Yes</em> to confirm that you want to format the sda1 partition.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/537/1*atEQ1g_IWFrZ5qSyHNzuaw.png" /></figure><p><em>Do you want to install boot loader GRUB</em>? Hit <strong>Yes</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/428/1*XkOdfcm-LRrumDE4SppK8A.png" /></figure><p>When prompted with the question <strong>“Do you want to install the /system directory as read-write?”</strong>, select <strong>Yes</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/552/1*05EcVINTW46MAP6MqiRpaA.png" /></figure><p>Congratulations! <strong>Android-x86</strong> has been installed successfully. Click <strong>OK</strong> to reboot the machine.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/468/1*dZkSoULR-p7QL1RrLe0W5Q.png" /></figure><p>After the Android VMware virtual machine restarts, the <strong>GRUB</strong> boot menu will appear. If no action is taken, the first (highlighted) option is selected automatically; however, Android will not boot properly. Instead, you will only see a command prompt.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/465/1*VL-6O3S82LjDrNHp-st53w.png" /></figure><p>To fix this issue, select the first boot option, then press <strong>e</strong> to edit the boot commands before booting.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*w0SWYkp26nLY__0XjSgi3g.png" /></figure><p>After that, you can see existing boot commands in the boot sequence. Select the upper item as shown on the screenshot below and press <strong>e</strong> once more to edit the boot command for GRUB.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*AVTMf3XlhBq7-pAPIjz2Ww.png" /></figure><p>Edit the string and change <strong>quiet</strong> to <strong>nomodeset xforcevesa</strong></p><p>Finally, your boot command for GRUB must be:</p><pre>kernel /android-9.0-r2/kernel nomodeset xforcevesa root=/dev/ram0 androidboot.selinux=permissive SRC=/android-9.0-r2</pre><p>After editing the boot command, press <strong>Enter</strong> to return to the boot menu. Then click on <strong>b </strong>to boot<strong>.</strong></p><p>Now that the Android VMware VM is booted, you can see the Android graphical user interface. Select your preferred language and hit <strong>Start</strong>. In this walkthrough, English (United States) is used.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/896/1*dKUlSxWqRr9O1BNFpptrsA.png" /></figure><p>Connect to a Wi-Fi network. Android is designed primarily for mobile devices, which typically do not have an RJ-45 Ethernet port and rely on wireless connectivity. As a result, Android does not detect wired networks. Click <strong>See all Wi-Fi networks anyway</strong>, since an internet connection is essential for most Android applications.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*JE2PtoFCjO-G-RAsh4b7yw.png" /></figure><p>On the next screen, you should see the <strong>VirtWiFi</strong> network. This represents the network to which the virtual Ethernet controller of your Android VMware virtual machine is connected.</p><p>Alternatively, you can use a USB Wi-Fi adapter and connect it directly to the VM, as described in our blog posts about installing Kali Linux on VMware and VirtualBox hypervisors. To do this, plug a USB Wi-Fi adapter into a USB port on the physical machine running the VMware hypervisor (VMware ESXi or VMware Workstation) and enable it using the USB pass-through feature.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*H6bPIlAFWSs3pK1CMhGCnQ.png" /></figure><p>Configure the <strong>Date &amp; time</strong>, set up a <strong>user name</strong>, and sign in using a <strong>Gmail account</strong>, adjusting Google services options as needed. After completing all steps in the Android setup wizard, you will be taken to the main Android interface.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*UxIfwaOF_xEASSrpcn-3yw.png" /></figure><h3>Edit GRUB Configuration</h3><p>As you may recall, we edited the GRUB configuration to boot the Android VMware virtual machine, but those changes are not preserved after a reboot. To make the boot loader settings permanent, we need to update the GRUB configuration accordingly.</p><p>After Android finishes loading, press <strong>Alt + F1</strong> to open the console. Then, run the required commands in the console.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Km2bRi1MIh93EgHL7NfuMg.png" /></figure><p>Create a directory to which a virtual disk will be mounted:</p><p>mkdir /mnt/sda</p><p>Mount the virtual disk to the created directory:</p><p>mount /dev/block/sda1 /mnt/sda</p><p>Edit the GRUB bootloader boot menu with the text editor vi:</p><p>vi /mnt/sda/grub/menu.lst</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*N3Zlu1q8dxw5Pt5cpZsLog.png" /></figure><p>As you did earlier, edit the first boot option and replace <strong>quiet</strong> with <strong>nomodeset xforcevesa</strong>.</p><p>After making this change, the first boot loader option string should appear as follows:</p><p>kernel /android-9.0-r2/kernel <strong><em>nomodeset xforcevesa</em></strong> root=/dev/ram0 <strong>androidboot.selinux=permissive</strong> SRC=/android-9.0-r2</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*OTY30XSYLMtzSdG-8UcDFQ.png" /></figure><p>Press Esc, then type :wq to write changes to the file and quit.</p><p>After that, reboot the Android VMware virtual machine. Android should now boot successfully without requiring any manual intervention.</p><h3>Keeping the Screen Always On</h3><p>After installing Android and completing the initial setup, there’s one critical configuration step that’s easy to overlook but absolutely essential for long-running WhatsApp automation: enabling <strong>Developer Options</strong> and keeping the screen <strong>always on</strong>.</p><h4><strong>Why This Matters</strong></h4><p>WhatsApp behaves like a real mobile application. If Android enters deep sleep, turns off the screen, or aggressively manages background processes, WhatsApp Web sessions may disconnect or become unstable. In a virtualized, always-on environment, we want Android to behave like a phone that is constantly powered and active.</p><h3>Step 1: Enable Developer Options</h3><p>By default, <strong>Developer Options</strong> are hidden in Android. To enable them:</p><ul><li>Open <strong>Settings</strong></li><li>Scroll down and enter <strong>About tablet</strong> or <strong>About phone</strong> (the wording depends on the Android-x86 build)</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*yNCa1kVUxBdfUSnozgNeRA.png" /></figure><ul><li>Locate <strong>Build number</strong></li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*PYDKd1Ae2spEe4W--lsArQ.png" /></figure><ul><li>Tap <strong>Build number</strong> repeatedly (usually 7 times)</li><li>You’ll see a message confirming that <strong>Developer mode has been enabled</strong></li></ul><p>Once enabled, go back to the main <strong>Settings</strong> .</p><h4>Step 2: Open Developer Options</h4><p>Now, click on “Advanced”</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1021/1*M1FYkOcvSNrl5mRtBxCNBw.png" /></figure><p>And enter “Developer options.”</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*L4PSyWSi4WvngxxHV_eiqg.png" /></figure><p>And turn on “Stay awake.”</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*n-mn6fivvGiNaRt9f3M3KA.png" /></figure><p>What this does:</p><ul><li>Prevents the screen from turning off</li><li>Keeps Android active as long as the VM is powered on</li><li>Avoids background suspension that can interfere with WhatsApp</li></ul><p>In a virtual machine environment, Android is effectively “always charging”, so this setting ensures the screen never sleeps.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=44e0044666fd" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Traveling but Still at Home: My VPN Setup with wg-easy and Cloudflare]]></title>
            <link>https://medium.com/@tomer.klein/traveling-but-still-at-home-my-vpn-setup-with-wg-easy-and-cloudflare-dcd8a23d3e36?source=rss-7d5bb883dd6------2</link>
            <guid isPermaLink="false">https://medium.com/p/dcd8a23d3e36</guid>
            <category><![CDATA[home-and-away]]></category>
            <category><![CDATA[wg-easy]]></category>
            <category><![CDATA[cloudflare]]></category>
            <category><![CDATA[wireguard]]></category>
            <category><![CDATA[vpn]]></category>
            <dc:creator><![CDATA[Tomer Klein]]></dc:creator>
            <pubDate>Mon, 25 Aug 2025 22:30:56 GMT</pubDate>
            <atom:updated>2025-08-26T07:31:24.004Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*H0Kls_dQG-oCZ5Ia" /></figure><p>A few weeks ago, I was packing for a family vacation abroad. Like most people, I wasn’t planning to take my entire home network with me, but I did want to keep access to a few things:</p><ul><li>My home server with family photos.</li><li>Streaming services (Netflix, local TV provider) that only work in my country</li><li>My smart home dashboard</li></ul><p>The challenge? My ISP gives me a <strong>dynamic IP</strong>, my router blocks incoming traffic unless I open ports, and I definitely didn’t want to leave my network UI exposed to the internet.</p><h3>What You’ll Build</h3><ul><li>A <strong>WireGuard VPN</strong> managed by <strong>wg-easy</strong></li><li><strong>Cloudflare Tunnel</strong> to safely access wg-easy’s web UI (no port 51821 exposure)</li><li><strong>Port forwarding</strong> for UDP/51820 on your router for VPN traffic</li><li><strong>Dynamic DNS</strong> updates to Cloudflare via cloudflare-ddns so your clients always find you</li></ul><h3>Prerequisites</h3><ul><li>A Linux server (Ubuntu 22.04/24.04 recommended)</li><li>Docker + Docker Compose installed</li><li>A Cloudflare account with a domain</li><li>Access to your router for port forwarding</li></ul><h4>Step 1: Deploy wg-easy</h4><p>I’m using <a href="https://kutit.xyz/OjHvtW">Docker Compose</a> to deploy the <a href="https://github.com/wg-easy/wg-easy">wg-easy</a> instance using the following file:</p><pre>volumes:<br>  etc_wireguard:<br><br>services:<br>  wg-easy:<br>    environment:<br>      - WG_HOST=dhd.klein.org.il          # your public DNS name / static IP<br>      - WG_ALLOWED_IPS=0.0.0.0/    # ← split-tunnel to your home LAN<br>      - WG_DEFAULT_DNS=192.168.0.231,1.1.1.1<br>      - WG_PERSISTENT_KEEPALIVE=25<br><br>    image: ghcr.io/wg-easy/wg-easy:15<br>    container_name: wg-easy<br>    networks:<br>      wg:<br>        ipv4_address: 10.42.42.42<br>        ipv6_address: fdcc:ad94:bacf:61a3::2a<br>    volumes:<br>      - ./wireguard:/etc/wireguard<br>      - /lib/modules:/lib/modules:ro<br>    ports:<br>      - &quot;51820:51820/udp&quot;<br>      - &quot;51821:51821/tcp&quot;<br>    restart: unless-stopped<br>    cap_add:<br>      - NET_ADMIN<br>      - SYS_MODULE<br>      # - NET_RAW # ⚠️ Uncomment if using Podman<br>    sysctls:<br>      - net.ipv4.ip_forward=1<br>      - net.ipv4.conf.all.src_valid_mark=1<br>      - net.ipv6.conf.all.disable_ipv6=0<br>      - net.ipv6.conf.all.forwarding=1<br>      - net.ipv6.conf.default.forwarding=1<br><br>networks:<br>  wg:<br>    driver: bridge<br>    enable_ipv6: true<br>    ipam:<br>      driver: default<br>      config:<br>        - subnet: 10.42.42.0/24<br>        - subnet: fdcc:ad94:bacf:61a3::/64</pre><ul><li>WG_ALLOWED_IPS: Set to 0.0.0.0 if you want to access external IPs (WAN).</li><li><strong>51820/UDP</strong> → must be forwarded on your router to the Docker host.</li><li>No need to expose <strong>51821/TCP</strong> (UI) — Cloudflare Tunnel will handle that.</li></ul><h4>Step 2: Secure the Web UI with Cloudflare Tunnel</h4><p>I‘m using <a href="https://kutit.xyz/VyfvPn">Cloudflare tunnel (Cloudflared) </a>to secure access to the wg-easy UI. Why Cloudflare Tunnel? because it is the best way to allow access to the UI without exposing the port in your router, and also allows us to set better access control, like geo-blocking, WAF, and more.</p><p>Open you docker-compose file and add the following text into it:</p><pre>  cloudflared:<br>    image: cloudflare/cloudflared:latest # or a specific version like 2025.8.22<br>    restart: unless-stopped<br>    command: tunnel run<br>    environment:<br>      - TUNNEL_TOKEN=${TUNNEL_TOKEN} # Recommended for dashboard-managed tunnels</pre><ul><li>TUNNEL_TOKEN= The token of the tunnel you created in Cloudflare.</li></ul><p>Then configure a tunnel that maps a DNS record (e.g., vpn-ui.example.com) → <a href="http://wg-easy:51821.">http://wg-easy:51821.</a></p><p>Advantages:</p><ul><li>No extra firewall ports open</li><li>Protected by Cloudflare Access policies if desired (SSO, 2FA)</li></ul><h4>Step 3: Dynamic DNS with cloudflare-ddns</h4><p>When your ISP gives you a changing IP, you can keep WG_HOST updated automatically.</p><p>Example docker-compose:</p><pre>  cloudflare-ddns:<br>    image: oznu/cloudflare-ddns<br>    environment:<br>      - API_KEY=${CF_API_KEY}<br>      - ZONE=example.com<br>      - SUBDOMAIN=vpn<br>    restart: unless-stopped</pre><h4>Step 4: Router Configuration</h4><p>To allow the client to access and connect to the VPN server, we need to expose (Port forwarding) the VPN UDP port:</p><ul><li>Forward <strong>UDP 51820</strong> → Docker host</li><li>Do <strong>not</strong> forward 51821 (UI is only accessible via Cloudflare Tunnel)</li></ul><h4>Step 5: Configure wg-easy</h4><p>To start working with wg-easy, run the following command:</p><pre>docker-compose up -d</pre><p>This will start all the services we just configured.</p><p>Next, open your browser and navigate to the URL you assigned to the wg-easy UI. On the welcome screen, click on the “Continue” button:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/793/1*WW8WwCw0e7AC4ZwUfgHZ7g.png" /></figure><p>Next, create the admin account:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/780/1*Qh0lDCVruxV7ezRhzYFcEg.png" /></figure><p>If this is a clean installation, on the next screen, click on the “No” button:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/780/1*2RwjEwoWa8Y36le6AcKgJA.png" /></figure><p>Next, enter the domain selected for the VPN server (not the wg-easy ui) and click on “Continue”:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/788/1*s0cafO_DV6jPZUtA0SHDRQ.png" /></figure><p>Next, click on “Sign In” to access the server UI:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/777/1*J_bKAIl06seu7K_-BVIMPg.png" /></figure><h4>Step 6: Create client configuration</h4><p>On the main screen of the wg-easy, click on the “New client” button:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/793/1*rrolrPtGqgMMc0F1CbqOVQ.png" /></figure><p>Set the name of the profile you would like to create and set the expiration date (Optional but highly recomended):</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/458/1*oyT3MSnZPmibdMly5uObLw.png" /></figure><p>Back to the profiles (clients) list:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/781/1*Ht60N6dWkcaq6gtnZC5QeA.png" /></figure><p>The icons (left to right):</p><ul><li>Edit: Allows you to edit the profile and change the allowed IPs, set the client IP, change the name, or the expiration date.</li><li>QR: By scanning the QR, you can configure the client.</li><li>Download: download the configuration file and import it on the client.</li><li>Create a short-lived, one-time link to the configuration.</li></ul><h4>Step 7: Securing the UI with 2FA</h4><p>As always, whenever it is possible, enable 2FA to secure your application.</p><p>To do so, click on “Administrator” in the upper right corner and then on “Account.”</p><p>Scroll down to the bottom of the page and click on “Enable Two Factor Authentication.”</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/764/1*erNIirAtW2SZItqG2-vsoQ.png" /></figure><p>Scan the QR code, enter the six-digit OPT, and click on the “Enable Two Factor Authentication” button.</p><p>To disable the 2FA, enter your password and click the “Disable Two Factor Authentication.” button:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/779/1*9zlvRMxm_A1F61WwbjsrXA.png" /></figure><h3>Wrap Up</h3><p>Traveling doesn’t mean losing access to your home network or streaming services. With a few Docker containers and Cloudflare, I now have a <strong>vacation-proof VPN</strong> that “brings home with me” wherever I go.</p><p>So next time I’m at a café in Rome or a hotel in Tokyo, I just tap my WireGuard app — and suddenly I’m home.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=dcd8a23d3e36" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>