
If you’re using a Gl.inet router with AdGuard installed, you might encounter an issue where only “localhost” appears in the clients’ list when AdGuard is first activated. This occurs because dnsmasq operates on port 53, while AdGuard defaults to port 3053. To resolve this, you’ll need to switch this port. This workaround, shared in this gl-inet-forum thread, proved effective for me. Here’s a concise summary of the steps I followed:
Backup configuration
I Recommend to create a backup of your router configuration first:
- In Luci: System -> Backup/Flash firmware. This will save your settings.
Change dnsmasq and AdGuard ports
The following steps has to be run as root
- connect with ssh on to your Gl-inet router.
- change the
dnsmasqport. by default is running on port 53, so we can can move this to another port, “parked”, so it does not occupy this port
- Check the service
dnsmasqrunning by usingnetstatcommand, example below:
netstat -naulp | grep -i dns
- Designate another port such as
5300in thednsmasqconfig
#echo "port=5300" >> /etc/dnsmasq.conf
- Now we can change the AdGuard port to 53. Open the AdGuard config using a text editor,
vi
vi /etc/AdGuardHome/config.yaml
- Find the entry in the config that assigns the listening port, and change it from ”
port: xxxx” to “port: 53” e.g:
---
dns:
bind_hosts:
- 0.0.0.0
port: 53
---
- Then restart your Router.
Disable dnsmasq service
- Lastly, we can safely disable
dnsmasqservice, the commands below:
# Stop
/etc/init.d/dnsmasq stop
# Disable start on boot
/etc/init.d/dnsmasq disable
If any issues occur after these changes, we can roll back to the backed-up config either by y restoring them using a backup file or reversing the changes made here
Before Changes: DNS query appears as “localhost” and Client requests appear from localhost 127.0.0.1 (AdGuard port was listening to port 3053)

Before Changes: DNS query appears correct and Client requests appear from Client IP (AdGuard port is now listening to port 53 and dnsmasq is disabled)
