Fixing DNS Issues After Upgrading to Pi Hole V6

A Step-by-Step Guide to Updating Your /etc/resolv.conf for Reliable DNS Resolution

Website Visitors:
Contents

Troubleshooting Pi-hole v6: Resolving DNS Issues After Upgrade

Pi-hole is a powerful tool for network-wide ad blocking, and with the release of version 6, many users have upgraded to take advantage of new features and improvements. However, some users may encounter issues with DNS resolution after the upgrade, particularly when the /etc/resolv.conf file is configured to use 127.0.0.1#53 as the nameserver. This article will explain the problem and provide a step-by-step solution to restore DNS functionality.

After upgrading to Pi-hole v6, you may find that your devices are unable to resolve domain names. This issue often arises because the /etc/resolv.conf file, which specifies the DNS servers used by the system, is set to use the local Pi-hole instance (127.0.0.1#53). This is because of the change in pihole v6 design.

  1. Inability to Access Websites: Devices on your network may fail to load websites, displaying errors related to DNS resolution.

  2. Pi-hole Admin Interface Unreachable: You may be unable to access the Pi-hole admin interface, which can hinder troubleshooting efforts.

  3. Network Devices Report DNS Errors: Devices connected to your network may report that they cannot connect to the internet due to DNS issues.

To determine if the issue is related to the /etc/resolv.conf configuration, follow these steps:

  1. Check the Current DNS Configuration: Open a terminal on the device running Pi-hole and run the following command:

    1
    
    cat /etc/resolv.conf
    

    Look for the line that specifies the nameserver. If it reads 127.0.0.1#53, this indicates that the system is trying to use the local Pi-hole instance for DNS resolution.

  2. Verify Pi-hole Status: Check if the Pi-hole service is running correctly by executing:

    1
    
    pihole status
    

    If the service is not running, you may need to restart it or investigate further.

To resolve the DNS issues after upgrading to Pi-hole v6, you need to change the nameserver in the /etc/resolv.conf file to a reliable external DNS server. Here’s how to do it:

  1. Open the File for Editing: Use a text editor to open the /etc/resolv.conf file. You can use nano or vi:

    1
    
    sudo nano /etc/resolv.conf
    
  2. Change the Nameserver: Replace the existing line that reads:

    1
    
    nameserver 127.0.0.1#53
    

    with a public DNS server IP address. You can use your router’s DNS (e.g., 192.168.1.1), or popular public DNS servers like:

    • Cloudflare: 1.1.1.1
    • Google: 8.8.8.8

    For example, your updated /etc/resolv.conf might look like this:

    1
    
    nameserver 192.168.1.1
    

    or

    1
    
    nameserver 1.1.1.1
    
  3. Save and Exit: If you are using nano, press CTRL + X, then Y to confirm changes, and Enter to save.

After updating the /etc/resolv.conf file, restart the Pi-hole service to ensure that the changes take effect:

1
sudo pihole restartdns
  1. Check Connectivity: On a device connected to your network, try accessing a website to see if the issue is resolved.

  2. Verify DNS Functionality: You can also test DNS resolution directly from the terminal by using the dig or nslookup command:

    1
    
    dig example.com
    

    or

    1
    
    nslookup example.com
    

    If the commands return an IP address, DNS resolution is working correctly.

Upgrading to Pi-hole v6 can introduce some DNS configuration challenges, particularly if the /etc/resolv.conf file is set to use 127.0.0.1#53 as the nameserver. By changing this to a reliable external DNS server, you can restore DNS functionality and ensure that your network devices can access the internet without issues. Regularly check your Pi-hole configuration and DNS settings to maintain a smooth browsing experience across your network.

Your inbox needs more DevOps articles.

Subscribe to get our latest content by email.