Linux DNS Configuration Modification tutorial, linuxdns configuration tutorial

Source: Internet
Author: User

Linux DNS Configuration Modification tutorial, linuxdns configuration tutorial
Question

A problem occurs at work. You need to modify DNS resolution.

Solution

Change the/etc/resolv. conf file to the following Configuration:

Nameserver 180.76.76.76nameserver 114.114.114.114

Three methods for modifying linux dns resolution ~

1. HOST local DNS resolution

Vi/etc/hosts

Add rules such:

223.231.234.33 www.baidu.com

2. Nic configuration file DNS service address

Vi/etc/sysconfig/network-scripts/ifcfg-eth0

Add rules such:

DSN1 = '1970. 114.114.114'

3. default DNS Configuration

Vi/etc/resolv. conf

Add rules such:

Nameserver 114.114.114.114

Priority of system resolution

1> 2> 3

Reference

[1]. Three Methods for modifying linux dns resolution ~

[2] viewing DNS servers and setting DNS servers in Linux

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.