ONEDNS配置1:centos7DNS服务器forwarder配置
Posted 神.秘.人
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了ONEDNS配置1:centos7DNS服务器forwarder配置相关的知识,希望对你有一定的参考价值。
ONEDNS配置1:centos7DNS服务器forwarder配置
1.显示当前网络连接
输入:#nmcli connection show
NAME UUID TYPE DEVICE
ens192 340e3b19-3e7c-41b4-a7d6-a17c208ad516 ethernet ens192
2.修改当前网络连接对应的DNS服务器
#nmcli con mod eno1 ipv4.dns "52.80.53.83 52.80.59.89"
3.将dns配置生效
#nmcli con up ens192
4.修改 /etc/NetworkManager/NetworkManager.conf 文件
在main部分添加 “dns=none” 选项:
[main]
plugins=ifcfg-rh
dns=none
5.NetworkManager重新装载上面修改的配置
#systemctl restart NetworkManager.service
6.打开resolv.conf,查看配置是否存在
输入:vi /etc/resolv.conf
# Generated by NetworkManager
nameserver 52.80.53.83
nameserver 52.80.59.89
7. 打开named.conf
输入:vi /etc/named.conf
// named.conf
//
// Provided by Red Hat bind package to configure the ISC BIND named(8) DNS
// server as a caching only nameserver (as a localhost DNS resolver only).
//
// See /usr/share/doc/bind*/sample/ for example named configuration files.
//
// See the BIND Administrator's Reference Manual (ARM) for details about the
// configuration located in /usr/share/doc/bind-{version}/Bv9ARM.html
options {
listen-on port 53 { 127.0.0.1; };
listen-on-v6 port 53 { ::1; };
directory "/var/named";
dump-file "/var/named/data/cache_dump.db";
statistics-file "/var/named/data/named_stats.txt";
memstatistics-file "/var/named/data/named_mem_stats.txt";
recursing-file "/var/named/data/named.recursing";
secroots-file "/var/named/data/named.secroots";
allow-query { localhost; };
...省略...
forwarders{
8.8.4.4;
114.114.114.114;
};
...省略...
};
8.添加One DNS的IP地址为优先Forwarding DNS服务器地址
...省略...
forwarders{
52.80.66.30;
52.80.52.30;
##如果网络出口室动态IP,请使用
52.80.53.83;
52.80.59.89;
};
...省略...
9.重新启动DNS服务
systemctl restart named
以上是关于ONEDNS配置1:centos7DNS服务器forwarder配置的主要内容,如果未能解决你的问题,请参考以下文章