A
A
Alexey R2020-01-29 23:39:55
linux
Alexey R, 2020-01-29 23:39:55

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: 5e31ec913f534614993577.pngnothing works. As soon as I prescribe dhcp everything works 5e31ed21e9b0a613918868.png. 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

4 answer(s)
G
Germanjon, 2020-01-30
@Axeles

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 )

K
Karpion, 2020-01-30
@Karpion

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 digand nslookup. Read the manuals in the system and on the Internet.

V
Vadim Priluzkiy, 2020-01-29
@Oxyd

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

A
AUser0, 2020-01-30
@AUser0

First, look at the settings ifconfig enp0s3with 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.8are 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 question

Ask a Question

731 491 924 answers to any question