Disable or change port of ASUS RT-AC56U DNS server

1

I need the outside facing UDP port 53 of my ASUS router for something else than a DNS server. Here is what i have tried so far:

  • Look for a setting in the GUI, i cant find one.
  • Tried editing /etc/dnsmasq.conf but its symlinked to /tmp/etc and reset on reboot.
  • Tried editing /etc/services but its symlinked to ROM (readonly).
  • killall dnsmasq. This worked but i need the setup to come online automatically after a reboot. Maybe i can script this on boot?

Is there any other way to disable or change the DNS server port?

Maciej Swic

Posted 2015-10-16T16:40:35.660

Reputation: 730

Port 53 is officially assigned to DNS by RFC6335 (I believe). It would help if you clarified why you need to break this standard? – ChrisInEdmonton – 2015-10-16T16:50:12.743

@ChrisInEdmonton Thanks, i know. I just want to run something else there. – Maciej Swic – 2015-10-16T16:52:51.540

I'm pretty sure you router's DNS would only answer on the inside... at least by default. What happens if you just forward UDP port 53 through the router to whatever device it is to want to use it for? – Ƭᴇcʜιᴇ007 – 2015-10-16T17:00:02.713

The service i want on 53 is on the router, when i set it to port 53 it doesnt start because the port is already taken so i really need to kill the DNS. I use Google DNS so nobody will miss the local DNS. – Maciej Swic – 2015-10-16T17:02:18.027

Why don't you just terminate the DNS server? – qasdfdsaq – 2015-10-16T19:19:27.943

That worked, but i will have to do it manually after every reboot so its not an option :( – Maciej Swic – 2015-10-16T19:27:49.270

Answers

-1

I don't have an ASUS device, but most (if not all) OpenWRT/DD-WRT type systems have a /etc/rc.local file which runs on startup - you could automate the killing of DNSMASQ or whatever it is you do by adding the commands you type manually into that file (before the "exit 0" line if it exists)

You should also be able to remount the "rom" from Read Only to rewrite. This is from my OpenWRT setup, so its probably not identical, but it should be analogous -

mount /dev/root -o remount,rw

(I found /dev/root by doing a df).

Another thing you may well be able to do is to simply stop it at startup. Most Linux variants - including OpenWRT and maybe your variant will have a file like /etc/rc.d/???dnsmasq - If you (re)move this file - I'd recommend backing it up first, or edit it so it has an exit 0 line at the top, and that is in readable memory, that could solve the problem.

davidgo

Posted 2015-10-16T16:40:35.660

Reputation: 49 152

/etc is reset on reboot. Symlinked to /tmp/etc as i said in my question :( – Maciej Swic – 2015-10-17T06:50:03.960