๐ŸชŸ Configure Windows 11 for Secure DNSaaS

Complete guide to configure Windows 11 to use DNS-over-HTTPS (DoH) with token-based authentication using Docker Desktop.

๐ŸชŸ Windows 11 • 22H2+ ๐Ÿณ Docker Desktop โœ… Verified • Working ๐Ÿ”’ DoH • Token Auth

๐Ÿ“‹ Overview

Our DNSaaS service uses DNS-over-HTTPS (DoH) with token-based authentication for maximum privacy and security. This guide will help you configure Windows 11 using Docker Desktop to run the DNS proxy.


Service Endpoint Authentication
Primary DNS https://dns1.oss.co.za/xxxxx Token in URL path
Protocol DNS-over-HTTPS (DoH) • Port 443 • TLS 1.3
Container bwmoran/https-dns-proxy listening on 0.0.0.0:5053
Fallback โœ… 1.1.1.1 • โœ… 8.8.8.8 (if service unreachable)
โœ… Verified Working This configuration has been tested and confirmed working on Windows 11 22H2 and 23H2 with Docker Desktop.
๐Ÿ’ก Why Docker?
  • No WSL2 setup required - Docker Desktop handles everything
  • Easy to start/stop with a single command
  • Works with Windows native DNS settings
  • Automatically restarts if your PC reboots
  • Lightweight and resource-efficient

โœ… Prerequisites

๐Ÿ’ก Token Format Your token is provided by the DNSaaS administrator. It looks like: token_xxxxxxxxxx. Keep it secure!
โš ๏ธ Docker Desktop License Docker Desktop is free for personal use, small businesses (under 250 employees and less than $10 million in annual revenue), and education. For larger commercial use, a paid subscription is required.

๐Ÿณ Docker Setup Required

If you don't have Docker Desktop installed, follow these steps.

1 Download Docker Desktop

Visit https://www.docker.com/products/docker-desktop and download Docker Desktop for Windows.

2 Install Docker Desktop

Run the installer and follow the prompts. Make sure to enable WSL 2 when prompted for better performance.

๐Ÿ’ก WSL 2 Docker Desktop uses WSL 2 for better performance. If you don't have WSL 2 installed, Docker Desktop will guide you through the setup.

3 Start Docker Desktop

Launch Docker Desktop from the Start menu. Wait for the status to show "Running" in the bottom-left corner.

๐Ÿš€ One-Click Install Recommended

The quickest way to get started. Copy and paste this command in PowerShell to run the DNS proxy in a Docker container.

โœจ What This Does
  • Pulls the bwmoran/https-dns-proxy Docker image
  • Runs the container with your token using environment variables
  • Listens on port 53 for DNS queries (mapped to container port 5053)
  • Automatically restarts if it crashes or your PC reboots

1 Open PowerShell as Administrator

Right-click the Start menu โ†’ select Terminal (Admin) or PowerShell (Admin).

2 Run the Docker Container

Replace token_testclient123 with your actual token:

# Replace token_testclient123 with YOUR token
docker run -d --name "https-dns-proxy" --restart unless-stopped -p 53:5053/udp -p 53:5053/tcp `
  -e RESOLVER_URL="https://dns1.oss.co.za/testclient123" `
  -e DNS_SERVERS="1.1.1.1,8.8.8.8" `
  bwmoran/https-dns-proxy -vvv
โš ๏ธ Important
  • Replace token_testclient123 with your actual token
  • Use environment variables (-e RESOLVER_URL and -e DNS_SERVERS) - this image does NOT support -r or -b command-line arguments
  • The -vvv flag enables verbose logging (optional)
  • Port 53 is mapped to the container's internal port 5053

3 Verify the Container is Running

# Check container status
docker ps --filter name=https-dns-proxy

4 Test DNS Resolution

# Test normal resolution
nslookup google.com

# Test blocked domain (should return Non-existent domain)
nslookup adult.filterdns.net
โœ… Success Indicators
  • nslookup google.com returns IP addresses
  • nslookup adult.filterdns.net returns Non-existent domain
  • docker ps shows the container as Up

๐ŸชŸ Configure Windows DNS Step-by-Step

Now configure Windows to use the DNS proxy running in Docker.

๐Ÿ’ก DNS Server IP

The DNS proxy runs in a Docker container and is accessible at 127.0.0.1 (localhost).

1 Open Network Settings

Right-click the Network icon in the system tray โ†’ select Network and Internet settings.

Alternatively, go to Settings โ†’ Network & internet.

2 Select Your Network Connection

Click Ethernet (for wired) or Wi-Fi (for wireless), then click the name of your active network connection.

3 Edit DNS Assignment

Scroll to the DNS server assignment section โ†’ click Edit.

Change from Automatic (DHCP) to Manual โ†’ toggle IPv4 to ON.

4 Enter DNS Server Addresses

In the Preferred DNS field, enter 127.0.0.1.

In the Alternate DNS field, enter 1.1.1.1 as a fallback.

๐Ÿ’ก DNS Server IPs
  • Primary: 127.0.0.1 (Docker container)
  • Secondary: 1.1.1.1 (fallback)

5 Save and Validate

Click Save to apply the changes.

Open PowerShell and run:

# Test DNS resolution
nslookup google.com

Check that the server field shows localhost or 127.0.0.1.

๐ŸŽ›๏ธ Service Management Toggle On/Off

Easily start, stop, or check the status of your DNS proxy in Docker.

๐Ÿ”’ DNSaaS Proxy (Docker) Checking...

Docker Commands (PowerShell)

Action Command
Start docker start https-dns-proxy
Stop docker stop https-dns-proxy
Restart docker restart https-dns-proxy
Check status docker ps --filter name=https-dns-proxy
View logs docker logs https-dns-proxy -f
Remove container docker rm -f https-dns-proxy

๐Ÿงช Test Your Configuration

Use these commands to verify your Windows configuration is working correctly.

Command Line Tests

Test Command Expected Result
Basic Resolution nslookup google.com Returns IP address(es)
Blocking nslookup adult.filterdns.net Returns Non-existent domain
MX Record nslookup -type=MX gmail.com Returns mail servers
DNS Server Check ipconfig /all | findstr DNS Shows 127.0.0.1 as DNS server

Browser Tests

Test Domain Expected Result
https://example.com โœ… Should load normally
http://zycdjz.com โŒ Should show "This site can't be reached"
http://adult.filterdns.net โŒ Should show "This site can't be reached"

๐Ÿ”ง Troubleshooting

โŒ Container fails to start
  • Check logs: docker logs https-dns-proxy
  • Make sure you're using environment variables, not command-line arguments: -e RESOLVER_URL=... not -r ...
  • Port 53 may be in use: netstat -ano | findstr :53
  • If port 53 is in use, stop the conflicting service
  • Verify token is correct in the environment variable
โŒ DNS resolution returns "No response from server"
  • Check if the container is running: docker ps
  • Verify the endpoint is reachable: curl -sk https://dns1.oss.co.za/testclient123
  • Check your token is valid and active
  • Check Docker logs for errors: docker logs https-dns-proxy
  • Make sure Windows DNS is set to 127.0.0.1
โŒ DNS not working after reboot
  • Make sure Docker Desktop starts automatically
  • The container has --restart unless-stopped which should restart it
  • Check if Docker Desktop is running: docker version
โœ… Quick Fix Commands
# Restart the container
docker restart https-dns-proxy

# Recreate the container with your token
docker rm -f https-dns-proxy
docker run -d --name "https-dns-proxy" --restart unless-stopped -p 53:5053/udp -p 53:5053/tcp `
  -e RESOLVER_URL="https://dns1.oss.co.za/testclient123" `
  -e DNS_SERVERS="1.1.1.1,8.8.8.8" `
  bwmoran/https-dns-proxy -vvv

โ†ฉ๏ธ How to Roll Back

To revert to your previous DNS settings:

1 Stop and Remove the Container

docker stop https-dns-proxy
docker rm https-dns-proxy

2 Reset Windows DNS

Go to Settings โ†’ Network & internet โ†’ select your network โ†’ Edit DNS assignment.

Change from Manual back to Automatic (DHCP).

3 Clear DNS Cache

Open PowerShell as Administrator and run:

ipconfig /flushdns

๐ŸŽฏ Summary


๐Ÿš€ Quick Reference:
docker run -d --name "https-dns-proxy" --restart unless-stopped -p 53:5053/udp -p 53:5053/tcp -e RESOLVER_URL="https://dns1.oss.co.za/testclient123" -e DNS_SERVERS="1.1.1.1,8.8.8.8" bwmoran/https-dns-proxy -vvv

๐ŸชŸ Windows Commands:
Start: docker start https-dns-proxy
Stop: docker stop https-dns-proxy
Status: docker ps --filter name=https-dns-proxy
Logs: docker logs https-dns-proxy -f

๐Ÿ”‘ Important Notes:
Use environment variables: RESOLVER_URL and DNS_SERVERS
DO NOT use -r or -b command-line arguments (not supported)
Port mapping: 53:5053 (host:container)
Container image: bwmoran/https-dns-proxy