DNS not change

Hello, I'm using OpenWRT for the first time.

|Model|SIM SIMAX1800T|
|Architecture|MediaTek MT7621 ver:1 eco:3|
|Target Platform|ramips/mt7621|
|Firmware Version|OpenWrt 24.10.0 r28427-6df0e3d02a / LuCI openwrt-24.10 branch 25.168.50434~d6b13f6|
|Kernel Version|6.6.73|

But I'm having a problem with DNS.

The router keeps communicating with 127.0.0.1

I changed it, I made a link but it always comes back.

Demo >

nameserver 1.1.1.1
nameserver 8.8.8.8
root@OpenWRT:~# cat /tmp/resolv.conf
nameserver 1.1.1.1
nameserver 8.8.8.8
root@OpenWRT:~# ping google.com
PING google.com (2800:3f0:4004:80d::200e): 56 data bytes
64 bytes from 2800:3f0:4004:80d::200e: seq=0 ttl=117 time=11.778 ms
64 bytes from 2800:3f0:4004:80d::200e: seq=1 ttl=117 time=11.918 ms
64 bytes from 2800:3f0:4004:80d::200e: seq=2 ttl=117 time=10.687 ms
64 bytes from 2800:3f0:4004:80d::200e: seq=3 ttl=117 time=10.820 ms
64 bytes from 2800:3f0:4004:80d::200e: seq=4 ttl=117 time=11.093 ms
64 bytes from 2800:3f0:4004:80d::200e: seq=5 ttl=117 time=10.757 ms
64 bytes from 2800:3f0:4004:80d::200e: seq=6 ttl=117 time=10.827 ms
^C
--- google.com ping statistics ---
7 packets transmitted, 7 packets received, 0% packet loss
round-trip min/avg/max = 10.687/11.125/11.918 ms
root@OpenWRT:~# /etc/init.d/dnsmasq restart
udhcpc: started, v1.36.1
udhcpc: broadcasting discover
udhcpc: no lease, failing
udhcpc: started, v1.36.1
udhcpc: broadcasting discover
udhcpc: no lease, failing
udhcpc: started, v1.36.1
udhcpc: broadcasting discover
udhcpc: no lease, failing
root@OpenWRT:~# cat /tmp/resolv.conf
search lan
nameserver 127.0.0.1
nameserver ::1
root@OpenWRT:~# ping google.com
^C
root@OpenWRT:~# cat /tmp/resolv.conf.auto
nameserver 1.1.1.1
nameserver 8.8.8.8
root@OpenWRT:~# ls -lha /tmp/
drwxrwxrwt   18 root     root         520 Jun 23 10:09 .
drwxr-xr-x    1 root     root         608 Feb  3 20:09 ..
drwx------    2 root     root         200 Feb  3 20:09 .uci
----------    1 root     root           0 Jun 23 10:09 .ujailnoafile
-rw-r--r--    1 root     root           7 Jun 23 00:12 TZ
-rw-r--r--    1 root     root         285 Dec 31  1969 board.json
-rw-r--r--    1 root     root         675 Jun 23 10:08 dhcp.leases
drwxr-xr-x    2 root     root          40 Feb  3 20:09 dnsmasq.cfg01411c.d
drwxr-xr-x    3 root     root          80 Jun 23 10:09 etc
drwxr-xr-x    2 root     root          80 Jun 23 10:09 hosts
drwxr-xr-x    5 root     root         100 Jun 23 00:07 lib
drwxrwxrwt    2 root     root         460 Jun 23 10:04 lock
drwxr-xr-x    2 root     root          80 Feb  3 20:09 log
-rw-------    1 root     root       10.3K Jun 22 23:53 luci-indexcache.e744c87f.json
drwxr-xr-x    2 root     root         320 Jun 23 10:04 opkg-lists
drwxr-xr-x    2 root     root          40 Dec 31  1969 overlay
-rw-r--r--    1 root     root          47 Jun 23 10:09 resolv.conf
-rw-r--r--    1 root     root          38 Jun 23 09:51 resolv.conf.auto
drwxr-xr-x    2 root     root          60 Jun 23 10:08 resolv.conf.d
-rw-r--r--    1 root     root          50 Jun 23 10:01 resolv.conf.ppp
drwxr-xr-x    9 root     root         640 Jun 23 10:09 run
drwxrwxrwt    2 root     root          40 Jun 23 10:01 shm
drwxr-xr-x    2 root     root          80 Jun 22 21:21 state
drwxr-xr-x    2 root     root          80 Dec 31  1969 sysinfo
drwxr-xr-x    2 root     root          40 Feb  3 20:09 tmp
drwxr-xr-x    3 root     root          60 Jun 22 21:26 usr
root@OpenWRT:~# ping google.com
ping: bad address 'google.com'
root@OpenWRT:~# cat /tmp/resolv.conf
search lan
nameserver 127.0.0.1
nameserver ::1
root@OpenWRT:~# ls -lha /tmp/resolv.conf
-rw-r--r--    1 root     root          47 Jun 23 10:09 /tmp/resolv.conf

rather a problem with your customizing...

it's the default, why is it a problem, and what are you trying to achieve ?

root@OpenWrt:~# nslookup google.com
Server:         127.0.0.1
Address:        127.0.0.1:53

Non-authoritative answer:
Name:   google.com
Address: 142.250.74.46

Non-authoritative answer:
Name:   google.com
Address: 2a00:1450:400f:801::200e
1 Like

trouble is, "option noresolv '1'" until you change it !!! You might as well not have dnsmasq running.

where is it set ?

/etc/config/dhcp - under dnsmasq

That is not enabled by default, so either you did this yourself or use e.g. https-dns proxy or another DNS resolver which does that for you.

1 Like

That's not the default setting.

You set it, something you installed did it for you, or you're not using an official image.

2 Likes

hmm... how do i check for the resolv-proxy? I didn't install anything

if you haven't "installed anything" simply do a reset.

1 Like

I didn't want to lose everything

then you need to figure out what's causing it, we can't do it for you.

1 Like

t

It seems to be an enabled setting, but I didn't see anything about it.
I want the DNS to be 1.1.1.1 and 8.8.8.8
As defined above, once added my router works perfectly

with the default setting your router would have worked perfectly too, assuming your ISP have a sane DNS IP shipped with the DHCP answer, and there's nothing "strange" about your uplink.

the only thing - i was previously using a snapshot. Maybe the setting carried over. I have never used anything except "official" packages. I experienced this when I first went from a working router to 24.10. The docs say the setting in dhcp takes precedence.

The setting is under Resolv & Host files

These are the default settings.

If things are changed I would recommend to reset to defaults indeed
Oh and perhaps update to the latest stable build 24.10.1

2 Likes

@egc I will reset from factory, updated to version 24.10.1

Thank you!

1 Like

Build 24.10.2 is imminent might be up this week

1 Like

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.