Centos7 DNS神奇的配置
文件
[root@iff etc]# cat /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 { any; };
// 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";
allow-query { any; }; /*
- If you are building an AUTHORITATIVE DNS server, do NOT enable recursion.
- If you are building a RECURSIVE (caching) DNS server, you need to enable
recursion.
- If your recursive DNS server has a public IP address, you MUST enable access
control to limit queries to your legitimate users. Failing to do so will
cause your server to become part of large scale DNS amplification
attacks. Implementing BCP38 within your network would greatly
reduce such attack surface
*/
recursion yes; dnssec-enable yes;
dnssec-validation yes; /* Path to ISC DLV key */
bindkeys-file "/etc/named.iscdlv.key"; managed-keys-directory "/var/named/dynamic"; pid-file "/run/named/named.pid";
session-keyfile "/run/named/session.key";
}; logging {
channel default_debug {
file "data/named.run";
severity dynamic;
};
}; zone "." IN {
type hint;
file "named.ca";
}; include "/etc/named.rfc1912.zones";
include "/etc/named.root.key"; [root@iff etc]#
文件
[root@iff etc]# cat /etc/named.rfc1912.zones
// named.rfc1912.zones:
//
// Provided by Red Hat caching-nameserver package
//
// ISC BIND named zone configuration for zones recommended by
// RFC 1912 section 4.1 : localhost TLDs and address zones
// and http://www.ietf.org/internet-drafts/draft-ietf-dnsop-default-local-zones-02.txt
// (c)2007 R W Franks
//
// See /usr/share/doc/bind*/sample/ for example named configuration files.
// zone "localhost.localdomain" IN {
type master;
file "named.localhost";
allow-update { none; };
}; zone "localhost" IN {
type master;
file "named.localhost";
allow-update { none; };
}; zone "1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.ip6.arpa" IN {
type master;
file "named.loopback";
allow-update { none; };
}; zone "1.0.0.127.in-addr.arpa" IN {
type master;
file "named.loopback";
allow-update { none; };
}; zone "0.in-addr.arpa" IN {
type master;
file "named.empty";
allow-update { none; };
};
zone "179.108.30.129.in-addr.arpa" IN {
type master;
file "179.108.30.129.zone";
allow-update { none; };
}; zone "iff.csttires.com.cn" IN {
type master;
file "iff.csttires.com.cn.zone";
allow-update { none; };
};
zone "iff-web.csttires.com.cn" IN {
type master;
file "iff-web.csttires.com.cn.zone";
allow-update { none; };
}; [root@iff etc]#
文件
[root@iff etc]# cat /var/named/iff.csttires.com.cn.zone
$TTL 1D
@ IN SOA iff.csttires.com.cn root (
0 ; serial
1D ; refresh
1H ; retry
1W ; expire
3H ) ; minimum
NS @
A 127.0.0.1
AAAA ::1 IN A 129.30.108.179
[root@iff etc]#
[root@iff named]# cat iff-web.csttires.com.cn.zone
$TTL 1D
@ IN SOA iff-web.csttires.com.cn root (
0 ; serial
1D ; refresh
1H ; retry
1W ; expire
3H ) ; minimum
NS @
A 127.0.0.1
AAAA ::1 IN A 129.30.108.179
[root@iff named]#
文件
[root@iff etc]# cat /var/named/179.108.30.129.zone
$TTL 600
@ IN SOA @ iff.csttires.com.cn. (
0 ; serial
28800 ; refresh
1H ; retry
1W ; expire
3H ) ; minimum
NS iff.csttires.com.cn.
IN PTR iff.csttires.com.cn.
IN PTR iff-web.csttires.com.cn.
[root@iff etc]#
测试成功:
[root@iff etc]# nslookup
> iff.csttires.com.cn
Server: 129.30.108.179
Address: 129.30.108.179#53 Name: iff.csttires.com.cn
Address: 127.0.0.1
Name: iff.csttires.com.cn
Address: 129.30.108.179
> iff-web.csttires.com.cn
Server: 129.30.108.179
Address: 129.30.108.179#53 Name: iff-web.csttires.com.cn
Address: 127.0.0.1
Name: iff-web.csttires.com.cn
Address: 129.30.108.179
[root@iff etc]# nslookup
> 129.30.108.179
Server: 129.30.108.179
Address: 129.30.108.179#53 179.108.30.129.in-addr.arpa name = iff.csttires.com.cn.
179.108.30.129.in-addr.arpa name = iff-web.csttires.com.cn.
>
常用命令:
yum -y install bind
rndc flush #清空DNS缓存
systemctl restart named
nslookup
host 129.30.108.179 #查看反向解析
Centos7 DNS神奇的配置的更多相关文章
- centos7 dns(bind)安装配置
		
yum install -y bind bind-chroot bind-utils chroot是通过相关文件封装在一个伪根目录内,已达到安全防护的目的,一旦程序被攻破,将只能访问伪根目录内的内容, ...
 - CentOS7.5模板机配置
		
CentOS7.5模板机配置 标签(空格分隔): linux学习知识整理 Mr.Wei's notes! 人一定要有梦想,没有梦想那根咸鱼有什么区别: 即便自己成为了一条咸鱼,也要成为咸鱼里最咸的那一 ...
 - 转载:Centos7 从零编译配置Memcached
		
序言 Memcached 是一个高性能的分布式内存对象缓存系统,用于动态Web应用以减轻数据库负载.它通过在内存中缓存数据和对象来减少读取数据库的次数,从而提高动态.数据库驱动网站的速度. Memca ...
 - [原创]Centos7 从零编译配置Memcached
		
序言 Memcached 是一个高性能的分布式内存对象缓存系统,用于动态Web应用以减轻数据库负载.它通过在内存中缓存数据和对象来减少读取数据库的次数,从而提高动态.数据库驱动网站的速度. Memca ...
 - centos7+redis+php环境配置
		
centos7+redis+php环境配置 下载redis(更多版本可到redis官网进行查找) wget http://download.redis.io/releases/redis-3.0.7. ...
 - CentOS7下Firewall防火墙配置用法详解
		
官方文档地址: https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/7/html/Security_Guide ...
 - Ubuntu 12.04 DNS服务器的配置方法
		
Bind是一款开放源码的DNS服务器软件,由美国加州大学Berkeley分校开发和维护的,全名为Berkeley Internet Name Domain它是目前世界上使用最为广泛的DNS服务器软件, ...
 - Windows Server 2008 DNS服务器安装与配置
		
Windows Server 2008 DNS服务器安装与配置本文关键字:Windows Server 2008 DNS.IIS 服务器安装与配置,DNS服务器本文来源:http://www.ip-t ...
 - Centos7安装RocketMQ及配置测试
		
环境 Centos7 RocketMQ 3.2.6 安装位置 /usr/local/alibaba-rockermq 外网ip 182.254.145.66 内网ip 10.105.23.114 安装 ...
 
随机推荐
- GPS坐标转换为百度地图坐标
			
/** * GPS坐标转换为百度地图坐标 * 需要引入javabase64.jar 和json的一些包 * */ public class Gps2BaiDu { public static void ...
 - python机器学习工具包scikit-learn
			
scikit-learn这个非常强大的python机器学习工具包 http://scikit-learn.org/stable/modules/generated/sklearn.svm.SVC.ht ...
 - kbmMWtable for XE5 接近尾声
			
为了支持多平台开发的delphi XE5,kbmmwtable 做了非常大的改动. 目前已经可以在ios 和android 上建立和查询数据表了,但是众说周知,在ios 和android 上 使用Li ...
 - K8S中RC与Deployment的区别
			
原文:http://fx114.net/qa-81-152379.aspx replication controller与deployment的区别 replication controller Re ...
 - 前端福利之个性化设置table的td宽度(总结)
			
很多时候,我们在用到table时,都希望随意设置 每个单元格的宽度,而不希望单元格被内容撑开table的样式. 1.首先,设置table的宽度 width=“1000” 或者 width=“100%” ...
 - Java反射API研究(4)——Class中的重要对象
			
一.Constructor与Method的父类:Executable Executable表示一个可执行类,构造方法与普通方法都是Executable AnnotatedType[] getAnnot ...
 - struts2设置index.action为主页(另:web.xml编辑卡死问题解决)
			
本来是弄拦截器的问题,结果弄主页的时候,还是发现了问题. 公司网站的项目里面,是用index.action作为主页的,访问WEB-INF里面的html文件.可是我设置的却不成功,追根到底,一个原因,s ...
 - App与微信WebAPP
			
我的App与微信搞上了 小麦积分墙摘自网络 最近有很多开发者关心的一个问题是如何提升app的下载量,透过现象开本质,app下载量的终极目标还是为多少客户提供了服务,抛开下载量KPI,app真心关心的问 ...
 - 正则表达式REGEXP
			
正则表达式:REGular EXPression, REGEXP 元字符: .: 匹配任意单个字符 []: 匹配指定范围内的任意单个字符 [^]:匹配指定范围外的任意单个字符 字符集合:[:digit ...
 - 开源一款强大的文件服务组件(QJ_FileCenter)(系列三 访问接口与项目集成)
			
系列文章 1. 开源一款强大的文件服务组件(QJ_FileCenter)(系列一) 2. 开源一款强大的文件服务组件(QJ_FileCenter)(系列二 安装说明) 3. 开源一款强大的文件服务组件 ...