Answer the question
In order to leave comments, you need to log in
Why can't I get DNS name servers on CentOS?
Goodnight. Please advise comrades. I shoveled the entire Internet, turned off ipv6 as well, and as soon as the resolv.conf file didn’t rule, I couldn’t ping Yandex or mail. CentOS is running on a virtual machine. Virtual box. Network settings "network bridge" DNS distributes the router 192.168.1.1 if the ifcfg-enp0s3 file looks like this: nothing works. As soon as I prescribe dhcp everything works
. Moreover, the gateway address is pinged 192.168.1.1 but ping ya.ru does not go. The resolv.conf file contains only one line nameserver 192.168.1.1
Tell me where to dig? What to read on this topic? At the simplest hang!
Answer the question
In order to leave comments, you need to log in
1. GETAWAY in the configuration file is written as GATEWAY
2. I didn’t see where the DNS server is specified in the configuration file ( DNS1= directive )
What device (computer, router) holds the address 192.168.1.1? Is the DNS server/daemon enabled (running) there? Is there a firewall on the way with port prohibition: 53 (TCP and UDP - both)?
What is the team's response ping ya.ru
?
Learn commands dig
and nslookup
. Read the manuals in the system and on the Internet.
Well, write cloudflare and other Google DNS in resolv.conf.
nameserver 1.1.1.1
nameserver 8.8.8.8
nameserver 8.8.4.4
First, look at the settings ifconfig enp0s3
with BOOTPROTO=dhcp enabled. So you will find out what parameters can be set in the config for manual configuration BOOTPROTO=static.
Secondly, is there a network in the virtual machine in general? Does it work ping 192.168.1.1
? huh ping 8.8.8.8
? And look at the result traceroute 8.8.8.8
, is there a plug?
Thirdly, if there is a network and pings ping 8.8.8.8
are working, check the operation of your own NS server at 192.168.1.1, arrived via DHCP. Do dig @192.168.1.1 ya.ru
, there should be a correct result. Next dig @8.8.8.8 google.ru
, to check that the outer NS are also available.
And finally, if all previous checks (except dig @192.168.1.1 ya.ru
) passed positively, then you can register the available NS in the system config: sudo echo "nameserver 8.8.8.8" >/etc/resolv.conf
.
Do you have everything?
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question