Learn how to set up a static DNS server in Ubuntu

Source: Internet
Author: User
Tags opendns servers
In XP, I had a long time ago when I was very upset with the DNS hijacking of China Telecom. I always transferred Google.com to Google.cn, and got the wrong domain name and gave it a "114 search". The entire super hooligans of China Telecom. Therefore, in XP, it is easy to set all DNS servers as OpenDNS servers. It is also very easy to set in Ubutu. You can also set it in Ubuntu, such as "Main Menu", "system", "system management", and "network". In "DNS", delete the original two IP addresses and fill in the OpenDNS server, however, after the restart

In XP, I had a long time ago when I was very upset with the DNS hijacking of China Telecom. I always transferred Google.com to Google.cn, and got the wrong domain name and gave it a "114 search". The entire super hooligans of China Telecom. Therefore, in XP, it is easy to set all DNS servers as OpenDNS servers. It is also very easy to set in Ubutu.

You can also set it in Ubuntu, such as "Main Menu", "system", "system management", and "network". In "DNS", delete the original two IP addresses and fill in the OpenDNS server, however, it will be restored after the restart, and it will be reset again after the next boot.

The method is found. The reprinting method is as follows:

First backup:
Sudo cp/etc/resolv. conf/etc/resolv. conf. bak

Edit
Sudo gvim/etc/dhcp3/dhclient. conf

Add the following lines to the end, which is the two servers of OpenDNS.

Prepend domain-name-servers 208.67.222.222, 208.67.220.220;
Edit "/etc/ppp/peers/dsl-provide"

However, I do not have the "dsl-provide" file. I have used adsl on the vro, but I have a provide. I should have edited this file. In order to be complete, back up the file first.

Sudo cp/etc/ppp/peers/provider. Bak
Sudo gvim/etc/ppp/peers/provider

Comment out
Usepeerdns

This line, finally restarted, restarted, right-click the Network icon in the notification area, "view information", and found that DNS is still the one in China Telecom, but opened "www.linuxidc.com", no longer transferred to "www.google.cn"

Intentionally enter an incorrect domain name, open the OpenDNS Error Correction page, and the static DNS settings are successful.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.