当前位置:网站首页>DNS域名解析协议
DNS域名解析协议
2022-07-28 14:39:00 【不会调制解调的猫】
目录
原理
DNS域名解析的过程:DNS域名解析的过程_不会调制解调的猫的博客-CSDN博客
配置
检查是否有bind工具,没有则直接yum安装
yum install -y bind

查看配置文件位置
rpm -qc bind

修改区域配置文件,添加正向区域配置
vim /etc/named.confoptions {
listen-on port 53 { 192.168.150.30; }; #监听端口
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 { 192.168.150.0/24; }; 允许通过的网段
/*
- 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

继续
vim /etc/named.rfc1912.zones
其中:
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
相当于分界线,往上是正向解析,往下是反向解析
复制“分界线”上面的样例进行配置:
zone "van.com" IN {
type master;
file "van.com.zone";
allow-update { none; };
};

配置正向区域数据文件
touch /var/named/van.com.zone
cp -p named.localhost ./van.com.zone
vim /var/named/van.com.zone $TTL 1D
@ IN SOA van.com. admin.van.com. (
0 ; serial
1D ; refresh
1H ; retry
1W ; expire
3H ) ; minimum
NS van.com.
A 192.168.150.30
AAAA ::1
IN MX 10 mail.vam.com.
WWW IN A 192.168.150.30
mail IN A 192.168.150.222
ftp IN CNAME www
* IN A 192.168.150.200关闭防火墙
systemctl stop firewalld 启动服务
systemctl start named查看服务状态
systemctl status named 边栏推荐
猜你喜欢

Vs dynamic library debugging

Pycharm - output exception of program run and default comment of added function

关于Simulink如何生成模型覆盖率报告

使用Mock技术帮助提升测试效率的小tips,你知道几个?
![【删除指定数字——leetcode]](/img/16/b40492d8414a363a3a24f00b4afd47.png)
【删除指定数字——leetcode]

An article about rsocket protocol

Rongyun real-time community solution

Summarize the knowledge points of the ten JVM modules. If you don't believe it, you still don't understand it

如何获取及嵌入Go二进制执行包信息

Sharing of award-winning activities: you can get up to iphone13 after using WordPress to build your own blog
随机推荐
Grpc protocol buffer
Pytorch - sequential and modulelist
File and directory operations (5)
多线程
Give you a linked list, delete the penultimate node of the linked list, and return the head node of the linked list.
Gfpgan blurred photo repair artifact
设置结构体字节对齐
Getting started with crawlers (1) -- requests (1)
融云实时社区解决方案
一文了解 Rainbond 云原生应用管理平台
Easy start, swagger
堆操作
迟来的2021年终总结
给你一个链表,删除链表的倒数第 n 个结点,并且返回链表的头结点。
ECCV 2022 | SSP: 自支持匹配的小样本任务新思想
语音社交系统——完善有声系统产业链
samba服务器如何配置
Explain the difference set, intersection set and union set of complex type set in detail.Net
Stateflow logic system modeling
百度提出动态自蒸馏方法,结合交互模型与双塔模型实现稠密段落检索