I don’t; I think I will list my steps over here it would be better (later I’ll edit it from my website):

Note: The following instruction has been applied into router below

  • Router: GL-AX1800
  • Kernel version: 4.4.60

It would be faster if you plug the computer with RJ45 wire.

Steps:
1- do a backup.**
2- connect on your device by ssh.

From here I supposed you have “dnsmasq” service up and running.

3- change dnsmasq port.

echo "port=5300" >> /etc/dnsmasq.conf 

4- change port from Adguard config file

vi /etc/AdGuardHome/config.yaml
---
dns:
  bind_hosts:
  - 0.0.0.0
  port: 53
---

5- stop dnsmasq

/etc/init.d/dnsmasq stop.

6- starts Adguard, go to Settings - DHCP Settings and startup DHCP service on Adguard.

7- disable dnsmasq

 /etc/init.d/dnsmasq disable.

8- restart Router

Steps Explanation:
1- not explanation needed, do always a backup before a change.
2- ssh connection to your router.eg: ssh root@x.x.x.x
3- this will change the default port of DHCP service, not needed it but it would be better to apply it; cos at the end you will disable the service thus this port shouldn’t be use it.
4- set the port “53” to Adguard service.
5- as we won’t use it.
6- setup adguard service to be use as dhcp server
7- disable service as we won’t use it any more.
8- test if these changes are persisted.

From my side (Adguard):

image

root@GL-AX1800:~# netstat -pnlt | grep -E "53"
tcp        0      0 0.0.0.0:xxx             0.0.0.0:x               LISTEN      xxxx/xxxx
tcp        0      0 0.0.0.0:xxx             0.0.0.0:x               LISTEN      xxxx/xxxx
tcp        0      0 :::53                   :::*                    LISTEN      8124/AdGuardHome
tcp        0      0 :::xxx                 :::*                    LISTEN      xxxx/xxxx
tcp        0      0 :::xxxx                  :::*                    LISTEN      xxxx/xxxx