Skip to main content

2 posts tagged with "security"

View All Tags

Encrypt Pi-hole Upstream DNS with dnscrypt-proxy on Debian 13

· 10 min read
Hung Viet Nguyen
Developing Jest Preview and Vitest Preview

Pi-hole is a network-wide DNS sinkhole that can block ads and trackers by filtering requests to domains on its blocklists. It also caches answers and shows which devices made DNS requests. These features work only for requests that pass through Pi-hole.

My use case is Chrome's Secure DNS, which uses DNS-over-HTTPS (DoH). When Chrome is set to a custom secure DNS provider, its lookups go directly to that provider and bypass Pi-hole, so Pi-hole cannot filter or log them. I wanted to keep Pi-hole in the request path while encrypting the connection from Pi-hole to its upstream resolver. To do that, clients need to use Pi-hole for DNS, and Pi-hole needs an encrypted upstream.

This guide adds dnscrypt-proxy on a Debian 13 host and configures it to use Quad9 over DoH. Pi-hole runs in Docker, and the proxy listens on the Docker bridge gateway so the container can reach it. This encrypts the Pi-hole-to-Quad9 connection; it does not configure Pi-hole to provide DoH or DNS-over-TLS (DoT) to clients. A client configured to send DoH or DoT directly to an external provider will still bypass Pi-hole.

Secure SSH by Disabling Password Login

· 6 min read
Hung Viet Nguyen
Developing Jest Preview and Vitest Preview

If your SSH port is exposed to the internet and your account password is compromised, an attacker could use it to log in to your server. One way to reduce this risk is to disable password login and require an authorized SSH key instead. Only clients with access to the matching private key can authenticate, so a stolen account password alone is not enough.

Here is how to configure it, check the settings, and test a new connection without locking yourself out.

The server commands below are for Debian. On other systems, the configuration paths, service names, or service-management commands may differ.