EdgeRouter X + AdGuardHome

Cason Adams
2 min readDec 31, 2019

--

More notes for my self here. Here is how I setup ad blocking on my home router.

From a factory reset and wizard Basic Setup

ssh into the router and download AdGuardHome

curl -sL https://static.adguard.com/adguardhome/release/AdGuardHome_linux_mipsle.tar.gz | tar xvz

I am going to just keep AdGuardHome directory in my home directory. Might consider moving it to /opt in the future.

Lets free up port 53 on the router so AdGuardHome can use it. I think it is pretty easy to do using the web UI.

  1. Login to UI
  2. Select Config Tree from tabs
  3. Under Configuration reveal service
  4. Then reveal dns
  5. Next to the forwarding option select the - sign to remove.
  6. Select Preview then save apply

Get back in the shell and goto where AdGuardHome is.

cd ~/AdGuardHome
chmod +x AdGuardHome

Lets run a test run before we install.

sudo ./AdGuardHome

You should now be prompted to open the web UI for AdGuardHome. Follow the instructions in the terminal for url. It should have an option for http://ip_to_router:3000. Note the ip for my router is 192.168.5.1 so the image below will reflect that.

Select Get Started

I am going to restrict things here a bit.

First I only want to access the UI from my local router ip on port 8080.

Second lets make the DNS only avalible only on switch0 on port 53.

Select Next.

Follow the rest of the steps to setup a login and verify setup.

Once done ad blocking should be enabled. Verify DNS Queries are happening by going to the Dashboard.

When satisfied with everything back in the shell stop the running process with a ctrl + c. Then install AdGuardHome

cd ~/AdGuardHome
./AdGuardHome -s install

Happy surfing with no more ads!

--

--