You're running AdGuard Home in a Docker container on Ubuntu 22.04 with a static IP address (192.168.1.3). You've tested DNS queries, but they aren't being directed to AdGuard Home. This article will help you understand the problem and provide a solution by configuring your router's DNS settings.
Understanding DNS Queries and AdGuard Home
DNS (Domain Name System) is responsible for translating human-readable domain names (like google.com) into machine-readable IP addresses (e.g., 142.250.74.46). When you set up AdGuard Home, it acts as a local DNS server that handles these queries for devices on your network. If your DNS queries aren't going to AdGuard Home, it's likely because your router is still using its default DNS settings.
Why Configure Router DNS Settings
By default, most routers use DNS servers provided by your Internet Service Provider (ISP). Configuring your router's DNS settings to point to AdGuard Home ensures all devices on your network use it for DNS queries. This way, you can take advantage of AdGuard Home's features, like ad-blocking and enhanced privacy.
Configuring Router DNS Settings
To configure your router's DNS settings, you need to access its web-based administration panel. The exact steps can vary between different router models. We'll use a generic approach that should work for most routers.
- Connect to your router's network (wired or wireless).
- Open a web browser and enter your router's IP address in the address bar. (Typically, it's
192.168.1.1,192.168.0.1, or10.0.0.1.) - Enter your router's username and password when prompted. (If you haven't changed these, refer to your router's documentation for the default credentials.)
- Once logged in, look for the 'Network' or 'Internet' settings section.
- Find the 'DNS' or 'Domain Name Server' settings. Change the Primary and Secondary DNS server fields to match AdGuard Home's IP address (
192.168.1.3in your case). - Save and apply the changes. Your router may reboot for the changes to take effect.
After configuring your router's DNS settings, test DNS queries again by running nslookup google.com on a device connected to the network. Queries should now be directed to AdGuard Home at 192.168.1.3.
- DNS queries weren't going to AdGuard Home on Ubuntu 22.04 because the router still used its default DNS settings.
- Configuring your router's DNS settings to point to AdGuard Home's IP address ensures all devices on the network use it for DNS queries and take advantage of its features.