0

when I try to change my DNS to any other DNS, nothing works as expected its like I set up nothing as DNS but i did!

when i open browser and try to open websites i get this error:

ERR_NAME_NOT_RESOLVED


I tried changing my DNS in :

sudo nano /etc/resolv.conf

like this:

nameserver 178.22.122.100
nameserver 185.51.200.2

but after that when i open browser and try to open websites i get this error:

ERR_NAME_NOT_RESOLVED


And also I tried changing my DNS here :

sudo nano /etc/systemd/resolved.conf

like this:

DNS=178.22.122.100 185.51.200.2

and after/before that i done a systemd-resolved restart with this command:

sudo systemctl restart systemd-resolved

but after that when i open browser and try to open websites i get this error:

ERR_NAME_NOT_RESOLVED


I also tried this command :

sudo resolvectl dns wlp3s0 178.22.122.100 185.51.200.2

which sets shecan DNS directly to wlp3s0(my network adaptor), when i check resolvectl status it shows the following :

Link 3 (wlp3s0)
Current Scopes: DNS
     Protocols: +DefaultRoute +LLMNR -mDNS -DNSOverTLS DNSSEC=no/unsupported
   DNS Servers: 178.22.122.100 185.51.200.2

but the DNS is not working as expected. when i open browser and try to open websites i get this error:

ERR_NAME_NOT_RESOLVED


When I try to ping these IPs they work:

$ping 185.51.200.2 -c 4
PING 185.51.200.2 (185.51.200.2) 56(84) bytes of data.
64 bytes from 185.51.200.2: icmp_seq=1 ttl=53 time=101 ms
64 bytes from 185.51.200.2: icmp_seq=1 ttl=53 time=101 ms (DUP!)
64 bytes from 185.51.200.2: icmp_seq=2 ttl=53 time=55.1 ms
64 bytes from 185.51.200.2: icmp_seq=3 ttl=53 time=99.0 ms
64 bytes from 185.51.200.2: icmp_seq=4 ttl=53 time=54.9 ms

--- 185.51.200.2 ping statistics ---
4 packets transmitted, 4 received, +1 duplicates, 0% packet loss, time 3003ms
rtt min/avg/max/mdev = 54.940/82.227/101.074/22.213 ms

$ping 178.22.122.100 -c 4
PING 178.22.122.100 (178.22.122.100) 56(84) bytes of data.
64 bytes from 178.22.122.100: icmp_seq=1 ttl=51 time=68.9 ms
64 bytes from 178.22.122.100: icmp_seq=2 ttl=51 time=123 ms
64 bytes from 178.22.122.100: icmp_seq=3 ttl=51 time=66.3 ms
64 bytes from 178.22.122.100: icmp_seq=4 ttl=51 time=105 ms

--- 178.22.122.100 ping statistics ---
4 packets transmitted, 4 received, 0% packet loss, time 3004ms
rtt min/avg/max/mdev = 66.326/90.860/122.741/24.041 ms

EDIT: output of ls -al /etc/resolv.conf:

lrwxrwxrwx 1 root root 37 May 25 15:24 /etc/resolv.conf -> /run/systemd/resolve/stub-resolv.conf
11
  • 1
    Please edit your question and add details about your network and IP addresses. Can you ping the specified servers?
    – Bodo
    May 25, 2023 at 14:25
  • @Bodo thanks for reply, i got ping from them and edited question, what kind on network information is necessary ? let me know and ill put them
    – mahdi
    May 25, 2023 at 14:35
  • Maybe a diagram of your local system, the DNS servers and your local network in between showing the IP addresses of the relevant systems. You wrote "the DNS is not working as expected". How exactly do you check this and what error or wrong result do you get?
    – Bodo
    May 25, 2023 at 14:39
  • @Bodo bro i dont know much about linux, just say commands and ill execute, lol. i check dns not working issue with openning browser and trying to use websites, websites not working and it shows ERR_NAME_NOT_RESOLVED
    – mahdi
    May 25, 2023 at 14:58
  • @Bodo is this fine now? can you leave me more replys please
    – mahdi
    May 25, 2023 at 15:08

0

You must log in to answer this question.

Browse other questions tagged .