Resolve domain names in Linux
After graduating from the undergraduate course, I realized that as a computer Major, I had little knowledge about the Linux environment. So in May this year, I abandoned Win7 directly, instead of dual systems or virtual machines, it is hoped that the dependency on the Microsoft ecosystem will be completely removed. I chose ubuntu12.04 and later read some books and videos on Linux basics intermittently. In particular, I recommend nash_su series videos in Linuxcast.net, I am not responsible for saying: after reading the basics, you can get started!
To solve this problem, ubuntu is installed in schools (in Beijing). After changing the system, though it is a little complicated, it basically does not affect usage. After going home (in Wuhan) on February's holiday, I suddenly found that I could not access the internet. Countless attempts: After opening the browser-> waiting for the page-> page error-> closing the brainless process of the browser, I have determined that it is indeed a technical problem. At this time, I had to secretly hate that I didn't get started with Linux earlier. I was so embarrassed to tell my parents that I was learning computer science when I went home and even went online.
In fact, the problem is obvious at this time. Obviously, this is caused by regional differences. What kind of network environment difference will this cause? At this time, I finally noticed the error message in the browser: dns search failed! Obviously, I tried to ping the company's server ip Address by accident and found that the ping was successful, but it was impossible to directly ping domain names such as www.baidu.com, the problem is that the DNS server cannot be found (of course, the DNS server may be down, but it is generally not possible ).
But in Linux, How do I know which DNS server I configured? Following the bad habits of windows, I shamelessly clicked "system settings" with the mouse and found the "network" option in it, the displayed DNS servers connected to the current network are 202.103.24.68 and 202.103.44.150. I checked these two addresses online. They are indeed the local DNS server addresses in Wuhan, and I also pinged these two addresses, it can also be pinged. I suddenly wondered why I couldn't resolve the domain name because I could find the DNS server? Is the server actually down?
The problems that need to be summarized have not been solved yet. If you want to study them later, post them again:
1. Why is the network DNS server address displayed in the settings center false?
2. How is the/etc/resolv. conf file generated? It seems that this is the first time you have configured a network connection. Can't you adjust it dynamically?
3. This is not a problem: the DNS server address in the school is a private address, while the DNS server address in the home is a public address. Is this the design reason for the campus network?
I would like to ask, my vps is a linux system, and I found that the domain name cannot be resolved. The error 403 occurs.
In linux, you cannot resolve a domain name to an IP address and modify/etc/resolv. conf to add a DNS server ratio.
Nameserver 192.168.1.1