Cannot resolve hostnames in OpenWRT shell

Hi, I have a problem with OpenWRT: if I ping a domain in the shell, it replies "bad address:", if, instead, I ping an ip directly, for example, it replies. What can I do to fix? Thank you!

define one of more DNSes.

1 Like

Where should I define it? In /etc/resolv.conf it has localhost as nameserver and in /etc/config/network in WAN interface I have cloudflare as DNS

adding it to resolv.conf should be enough, but the entry will be lost during a reboot.

what's in /tmp/resolv.conf.d/

what's the mode of the device ? router ? AP ?

in /tmp/resolv.conf.d/ i have this:

# Interface lan
nameserver (ip of pi-hole)
# Interface wan

The openwrt act as a router.

then it should work, can you resolve any other DNS name, like ?

no, it always says bad address


post the output of
nslookup and perhaps also
nslookup 10.0.04 and

1 Like

here it is