linux服务器修改dns_什么是Windows,Linux的DNS服务器,如何更改DNS服务器?

linux服务器修改dns

linux服务器修改dns

DNS Servers are a very important part of the internet and computer networks. When DNS servers are down we can not use the internet in a easy manner. DNS servers provide the domain name to IP or vice versa resolution.

DNS服务器是Internet和计算机网络中非常重要的一部分。 当DNS服务器停机时,我们无法轻松地使用Internet。 DNS服务器将域名提供给IP,反之亦然。

视窗 (Windows)

Windows operating system family provides ipconfig command for a general information-gathering tool. ipconfig command without any parameter will show base configuration about the network of the operating system. Just issue the following command into DOS command prompt. This will list all network configuration in detail with DNS related configuration.

Windows操作系统家族为常规的信息收集工具提供了ipconfig命令。 不带任何参数的ipconfig命令将显示有关操作系统网络的基本配置。 只需在DOS命令提示符下发出以下命令即可。 这将详细列出所有网络配置以及与DNS相关的配置。

> ipconfig /all
DNS information
DNS information
DNS信息

There may be multiple DNS servers. In this example our DNS server is our default router.

可能有多个DNS服务器。 在此示例中,我们的DNS服务器是我们的默认路由器。

要设置DNS服务器,请使用“控制面板” (To set DNS server use  Control Panel)

We will use a network interface configuration with the GUI.

我们将通过GUI使用网络接口配置。

打开网络与共享中心 (Open Network and Sharing Center)

Open Network and Sharing Center
打开网络与共享中心

打开网络适配器(Open Network Adapter)

Click Network Adapter
单击网络适配器

打开属性(Open Properties)

Click Properties
单击属性

打开本地连接属性(Open Local Area Connection Properties)

Internet Protocol Version 4
互联网协议版本4

开放互联网协议版本 (Open Internet Protocol Version)

We can set from here preferred DNS Servers. Here is a list of popular DNS servers.

我们可以从此处设置首选的DNS服务器。 这是受欢迎的DNS服务器的列表。

  • 8.8.8.8

    8.8.8.8
  • 2.2.4.4

    2.2.4.4
  • 2.2.2.2

    2.2.2.2

Linux (Linux)

Linux provides alternative ways to get DNS server and set DNS server.

Linux提供了获取DNS服务器和设置DNS服务器的替代方法。

$ cat /etc/resolv.conf

The old friend resolv.conf is deprecated to edit by hand so a new way to set DNS servers in resolv.conf. But we can get DNS server with the cat command.

不建议老朋友resolv.conf手动编辑,因此是在resolv.conf中设置DNS服务器的新方法。 但是我们可以使用cat命令获取DNS服务器。

添加DNS服务器 (Add DNS Server)

We can add new DNS server to the resolv.conf with interface configuration like below. Add related lines to the interface static IP configuration.

我们可以使用以下接口配置将新的DNS服务器添加到resolv.conf中。 将相关行添加到接口静态IP配置。

dns-nameserver 8.8.8.8
LEARN MORE  How To Exclude Hosts From Nmap Scan?
了解更多如何从Nmap扫描中排除主机?

翻译自: https://www.poftut.com/what-is-my-dns-server-and-hot-to-change-dns-server-for-windows-linux/

linux服务器修改dns

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值