Search
K
Links

How to protect your network with AdGuard Home

Learn how to protect your network remotely by using AdGuard Home as your DNS server over Meshnet.

Introduction

AdGuard Home is a free and open-source tool for network protection. It can help you protect your devices from advertisements, malicious URLs, and dangerous websites. AdGuard Home is highly customizable and works network wide. However, without exposing the server device to the outside internet, you cannot use your AdGuard Home instance from a remote device or another location.
With the help of Meshnet, you can connect your AdGuard Home server and devices from anywhere in the world into a single virtual network. This technology allows you to use self-hosted LAN services, such as AdGuard Home, remotely without compromising on security.
This guide outlines the steps to install AdGuard Home on Windows, macOS, and Linux and explains how to change your DNS addresses to use it remotely.
Note
Changing DNS addresses while using cellular data and keeping the Meshnet connection active is not possible. If you are using a mobile device with a cellular connection, you will need to use AdGuard Home with a VPN connection.

Install AdGuard Home

Begin by downloading and installing AdGuard Home on your device.
Windows
macOS
Linux
To install AdGuard Home on Windows:
  1. 1.
    Download the AdGuard Home package for Windows from GitHub.
  2. 2.
    Extract the downloaded .zip file.
  3. 3.
    Open Command Prompt as an administrator by pressing the Windows
    key + R, entering cmd, and pressing Ctrl + Shift + Enter.
  4. 4.
    Navigate to the extracted AdGuard Home folder location using the cd command. Example
    cd "C:\Users\secretmeerkat\Downloads\AdGuardHome_windows_amd64\AdGuardHome"
  5. 5.
    Run the following command to install and start AdGuard Home:
    AdGuardHome.exe -s install
  6. 6.
    Check if the service status is running by using this command:
    AdGuardHome.exe -s status
    The Command Prompt window displaying the "running" status of AdGuard Home
AdGuard Home is now installed and active on your device.
To install AdGuard Home on macOS:
  1. 1.
    Download the AdGuard Home package for macOS from GitHub.
    • If you are using an Intel Mac, choose the AMD64 release package.
    • If you are using an Apple silicon Mac, choose the 64-bit ARM release package.
  2. 2.
    Extract the downloaded .zip file by double-clicking it.
  3. 3.
    In Finder
    , drag the extracted AdGuard Home package to the Applications folder.
    The process of dragging AdGuard Home from the Downloads folder to the Applications folder in Finder
  4. 4.
    Open Terminal and navigate to the AdGuard Home folder using this command:
    cd /Applications/AdGuardHome
  5. 5.
    Install AdGuard Home with the following command:
    sudo ./AdGuardHome -s install
  6. 6.
    Enter your administrator password. The input will be hidden.
  7. 7.
    Check if the service status is running by using this command:
    sudo ./AdGuardHome -s status
    Example
    The terminal displaying the "running" status of AdGuard Home
AdGuard Home is now installed and active on your device.
Note
When trying to install AdGuard Home, you may receive an error message indicating that the developer cannot be verified. To proceed with the installation, open System preferences > Privacy & security, scroll down and click Allow anyway.
Clicking 'Allow anyway' in system preferences

Method 1: Using the Snap Store

For a quick and easy installation, you can download AdGuard Home from the Snap Store.
  1. 1.
    Open Terminal.
  2. 2.
    Run the following command to download and install AdGuard Home:
    sudo snap install adguard-home
When the process finishes, AdGuard Home is started automatically.

Method 2: Using an automated install script

Another way to install AdGuard Home is by using an automated install script with the curl command.
  1. 1.
    Open Terminal.
  2. 2.
    Run this command to execute the automated install script:
    curl -s -S -L https://raw.githubusercontent.com/AdguardTeam/AdGuardHome/master/scripts/install.sh | sh -s -- -v
Once the installation process finishes, check if the AdGuard Home service is running with this command:
sudo /opt/AdGuardHome/AdGuardHome -s status
The terminal displaying the "running" status of AdGuard Home
AdGuard Home is now active and ready for use.

Configure AdGuard Home settings

After you install AdGuard Home, its web interface is created. By default, the interface listens on port 3000. All of the settings are configured via the web interface.

Set up your account

To set up your AdGuard Home account, take the following steps:
  1. 1.
    Open your internet browser and enter the following URL: localhost:3000/
  2. 2.
    Click Get started.
  3. 3.
    In the Admin web interface section, select the port number. The default port is 80, but if it is already occupied, you can change it to another one, such as port 81. If the selected port is already in use, an error message will appear:
    An error message indicating that an attempt was made to access a socket in a way forbidden by its access permissions
  4. 4.
    Under DNS server, make sure that the All interfaces option is selected. This option allows you to use AdGuard Home locally and remotely over Meshnet.
  5. 5.
    Click Next.
  6. 6.
    Follow the on-screen instructions to create your account and finish the setup procedure.

Select your upstream DNS

With AdGuard Home, you can select from a wide range of upstream DNS addresses. In addition to standard DNS, you can also choose:
To configure your upstream DNS:
  1. 1.
    Access your AdGuard Home dashboard at http://localhost:<port>, replacing <port> with the previously selected port number. To open the dashboard from a Meshnet peer device, substitute localhost with the server device’s Nord name or Meshnet IP.
  2. 2.
    Log in to your account.
  3. 3.
    From the dashboard, click Settings > DNS settings.
    The "DNS settings" option is highlighted
  4. 4.
    In the Upstream DNS servers field, enter your preferred DNS servers. You can choose from the list of known DNS providers.
    Displaying the highlighted DNS servers that have been entered
  5. 5.
    Click Test upstreams to check if the DNS servers are working correctly and click Apply.
Now your selected upstream DNS servers are used for hostname resolution.

Choose your blocklists

To enhance your network security, you have the option of adding DNS blocklists to your dashboard. You can choose from the built-in list or add your custom blocklist URLs.
  1. 1.
    From your AdGuard Home dashboard, select Filters > DNS blocklists.
    The "DNS blocklists" option is highlighted
  2. 2.
    Click the Add blocklist button at the bottom and select Choose from the list.
  3. 3.
    Check the blocklists that you want to include and click Save.
    Lists that block tracking and advertising are displayed, with some of them selected
You will see the chosen blocklists added to the DNS blocklist table.

Use AdGuard Home DNS over Meshnet

Now that you've completed all the necessary steps, your AdGuard Home is fully set up. To make use of its features, you need to change your device’s DNS address to the Meshnet IP of the AdGuard Home device.

Without a VPN connection

Windows
Android
iOS
macOS
Linux
Android TV

Windows 11

  1. 1.
    Right-click the Start
    button and select Network connections.
  2. 2.
    Choose the network type your device is using (Wi-Fi or Ethernet).
  3. 3.
    Find the DNS server assignment option and click Edit.
  4. 4.
    Choose Manual from the dropdown list and enable IPv4.
  5. 5.
    Enter the following information:
    • Under Preferred DNS, enter the Meshnet IP of the AdGuard Home server.
    • Under Alternate DNS, enter the DNS address of another provider.
      The Meshnet IP and alternate DNS addresses entered in the network DNS settings
  6. 6.
    Click Save.

Windows 10

  1. 1.
    Right-click the Start
    button and select Network connections.
  2. 2.
    Select Change adapter options.
  3. 3.
    Right-click your current network adapter (Wi-Fi or Ethernet) and select Properties.
  4. 4.
    In the new window, select Internet Protocol Version 4 (TCP/IPv4) and click Properties.
  5. 5.
    Select Use the following DNS server addresses.
  6. 6.
    Enter the following information:
    • In the Preferred DNS server field, enter the Meshnet IP of the AdGuard Home server.
    • In the Alternate DNS server field, enter the DNS address of another provider.
      The Meshnet IP and alternate DNS addresses entered
  7. 7.
    Click OK twice to apply the changes.
  1. 1.
    Open the Settings menu.
  2. 2.
    Go to Connections and select Wi-Fi.
  3. 3.
    Find your current Wi-Fi network and tap the gear icon.
  4. 4.
    Go to Advanced/View more.
  5. 5.
    Change the IP settings value to Static.
  6. 6.
    Fill in the required DNS addresses:
    • Under DNS 1, enter the Meshnet IP of the AdGuard Home server.
    • Under DNS 2, enter the DNS address of another provider.
      The Meshnet IP and alternate DNS addresses entered in Android settings.
  7. 7.
    Press Save (if such a button is present).
  1. 1.
    Open Settings.
  2. 2.
    Tap Wi-Fi, find your current network, and tap the Info
    button.
  3. 3.
    Tap Configure DNS and choose Manual.
  4. 4.
    Select Add server and enter the Meshnet IP of the AdGuard Home server.
    The Meshnet IP entered in iOS DNS settings.
  5. 5.
    Ensure that the added IP address is at the top.
  6. 6.
    Tap Save.

macOS Ventura 13 and newer

  1. 1.
    Go to System settings and click Network.
  2. 2.
    Select the network interface you use (Wi-Fi or Ethernet) and click Details.
  3. 3.
    Open the DNS tab and click the plus (+) button at the bottom to add the Meshnet IP of the AdGuard Home server.
  4. 4.
    Ensure that the added IP address is at the top.
    The Meshnet IP entered in macOS DNS settings
  5. 5.
    Click OK to save the changes.

macOS Monterey 12 and older

  1. 1.
    Go to System preferences and click Network.
  2. 2.
    Select the network interface you use (Wi-Fi or Ethernet) and click Advanced.
  3. 3.
    Open the DNS tab and add the Meshnet IP of the AdGuard Home server by clicking the plus (+) icon.
  4. 4.
    Ensure that the added IP address is at the top.
    The Meshnet IP entered in macOS DNS settings.
  5. 5.
    Click OK and Apply.

Method 1: Using Network Manager

  1. 1.
    Open Settings, and then select either Network or Wi-Fi based on your network type.
  2. 2.
    Click the gear button and head to the IPv4 tab.
  3. 3.
    Next to DNS, disable the Automatic toggle.
  4. 4.
    In the DNS field, enter the Meshnet IP of the AdGuard Home server and the DNS of another provider, separated by a comma.
     The Meshnet IP and alternate DNS addresses entered in Linux network settings
  5. 5.
    Click Apply.
  6. 6.
    Open Terminal and run the following command to restart the Network Manager daemon:
    sudo systemctl restart NetworkManager
  7. 7.
    Enter your sudo password. The input will be hidden.

Method 2: Using Terminal

  1. 1.
    Open Terminal and run the following command:
    sudo nano /etc/systemd/resolved.conf
  2. 2.
    Locate the DNS and FallbackDNS lines.
  3. 3.
    Uncomment the lines by removing the hash (#) symbols.
  4. 4.
    Enter the appropriate DNS addresses after the equals (=) sign, as shown:
    DNS=<Meshnet IP of the AdGuard Home server> FallbackDNS=<DNS of another provider> Example
    The Meshnet IP of the AdGuard Home server and an alternate DNS address entered
  5. 5.
    Press Ctrl + X, Y, and Enter to exit and save the changes.
  6. 6.
    Run the following command to ensure that the network changes are applied:
    sudo systemctl restart systemd-resolved
  7. 7.
    Enter your sudo password. The input will be hidden.
Note
Changes in the /etc/systemd/resolved.conf file take priority over settings in the Network Manager. Therefore, if you apply the DNS change directly via the Network Manager settings, ensure that there are no custom configurations in the previously mentioned resolved.conf file. Otherwise, the specified DNS addresses will not be used.
  1. 1.
    Open the Android TV Settings menu.
  2. 2.
    Select Network & internet.
  3. 3.
    Choose your network and change the IP settings value to Static.
  4. 4.
    Enter your device's local IP address, network gateway, and network prefix length.
  5. 5.
    Type in the DNS addresses:
    • In the DNS 1 field, enter the Meshnet IP address of your AdGuard Home device.
      Meshnet IP address entered in the DNS 1 field.
    • In the DNS 2 field, enter the DNS address of another provider.

With a VPN connection

Meshnet allows you to use your custom, self-hosted DNS server alongside a VPN connection via the NordVPN app. Follow these steps to use your AdGuard Home DNS when connected to a VPN server:
Windows
Android
iOS
macOS
Linux
Android TV
  1. 1.
    Open the NordVPN app.
  2. 2.
    Navigate to Meshnet
    and copy the Meshnet IP address of your AdGuard Home device.
  3. 3.
    In the lower-left corner, click Settings
    .
  4. 4.
    Select the Connection section.
  5. 5.
    Enable the Use custom DNS toggle and click the dropdown arrow.
  6. 6.
    In the first field, paste the copied Meshnet IP address.
    Entering the Meshnet IP address in the Use custom DNS section in the NordVPN app settings.
  7. 7.
    On the right, click the Save
    checkmark.
Now, when you establish a VPN connection to a NordVPN server, the DNS address that you specified will be used for the connection.
Note
On the Threat protection
tab, make sure that the Threat protection lite toggle is disabled. Otherwise, the custom DNS change will be overwritten by the Threat Protection feature.
  1. 1.
    Open the NordVPN app.
  2. 2.
    Navigate to the Meshnet
    tab and copy the Meshnet IP address of your AdGuard Home device.
  3. 3.
    In the lower-right corner, tap Profile, and then select Settings.
  4. 4.
    Under VPN and security, tap DNS.
  5. 5.
    Select Custom, paste the copied Meshnet IP address, and tap Add.
    Entering the Meshnet IP address as the custom DNS server in the NordVPN app.
Now, when you establish a VPN connection to a NordVPN server, the DNS addresses that you specified will be used for the connection.
Note
In the Settings menu, make sure that the Threat protection lite toggle is disabled. Otherwise, the custom DNS change will be overwritten by the Threat Protection feature.
  1. 1.
    Open the NordVPN app.
  2. 2.
    Navigate to Meshnet
    and copy the Meshnet IP address of your AdGuard Home device by tapping it.
    Tapping the Meshnet IP address of the peer device to copy it.
  3. 3.
    In the lower-right corner, tap Profile
    .
  4. 4.
    In the upper-right corner, select Settings
    .
  5. 5.
    Under VPN connection, tap Protocol.
  6. 6.
    In the Enter custom DNS address field, paste the copied Meshnet IP address.
    Entering the Meshnet IP address as the custom DNS server in the NordVPN app.
Now, when you establish a VPN connection to a NordVPN server, the DNS address that you specified will be used for the connection.
Note
In the Profile
menu, make sure that the Threat protection lite toggle is disabled. Otherwise, the custom DNS change will be overwritten by the Threat Protection feature.
Note
The custom DNS feature is available only on the sideload version of the NordVPN app.
  1. 1.
    Open the NordVPN app.
  2. 2.
    Navigate to Meshnet
    and copy the Meshnet IP address of your AdGuard Home device.
    Clicking the Meshnet IP address of the peer device to copy it to the clipboard.
  3. 3.
    In the lower-left corner, click Settings
    .
  4. 4.
    On the left, select the DNS section.
  5. 5.
    Click Add new DNS.
  6. 6.
    In the new entry, paste the copied Meshnet IP address.
  7. 7.
    Turn on the Enable custom DNS servers toggle.
    Enabling the custom DNS toggle in the NordVPN app settings.
Now, when you establish a VPN connection to a NordVPN server, the DNS addresses that you specified will be used for the connection.
Note
On the Threat protection
page, make sure that the Use lite version toggle is disabled. Otherwise, the custom DNS change will be overwritten by the Threat Protection feature.
  1. 1.
    Open Terminal.
  2. 2.
    Run the following command, replacing <MeshnetIP> with your AdGuard Home device's Meshnet IP address:
    nordvpn set dns <MeshnetIP>
    Example
    Running the 'nordvpn set dns' command with the Meshnet IP address of the DNS server.
Now, when you establish a VPN connection to a NordVPN server, the DNS addresses that you specified will be used for the connection.
Note
Make sure that Threat protection lite is disabled. Otherwise, the custom DNS change will be overwritten by NordVPN’s Threat Protection feature.
To disable Threat Protection lite, use the nordvpn set tplite off command.
  1. 1.
    Open the NordVPN app.
  2. 2.
    Scroll down to the Settings section and select the Settings card.
  3. 3.
    Choose DNS and select Custom.
  4. 4.
    Enter the Meshnet IP address of your AdGuard Home device.
    Meshnet IP written in the 'Enter DNS server address' field.
Now, when you establish a VPN connection to a NordVPN server, the DNS address that you specified will be used for the connection.
Note
In the Settings menu, make sure that the Threat protection lite option is turned off. Otherwise, the custom DNS change will be overwritten by NordVPN’s Threat Protection feature.
© 2023 Nord Security. All Rights Reserved.