【无标题】

正向:

服务端:

vim /etc/named.conf

options {

listen-on port 53 { 192.168.41.128; };

directory "/var/named";

allow-query { any; };

};

zone "openlab.com" IN {

type master;

file "openlab.zone";

cd /var/named/

ll

总用量 44

cp -a named.localhost openlab.zone

vim /var/named/openlab.zone

$TTL 1D

@ IN SOA dns.openlab.com. test.163.com ( 0

1D

1H

1W

3H

)

IN NS dns.openlab.com.

IN MX 10 mail.openlab.com.

dns.openlab.com. IN A 192.168.41.160

mail.openlab.com. IN A 192.168.41.161

www.openlab.com. IN A 192.168.41.160

named-checkconf /etc/named.conf

named-checkzone openlab.com /var/named/openlab.zonezone openlab.com/IN: loaded serial 0

systemctl restart named

客户端

nslookup www.openlab.com

Server: 192.168.41.128

Address: 192.168.41.128#53

Name: www.openlab.com

Address: 192.168.41.160

nslookup mail.openlab.com

Server: 192.168.41.128

Address: 192.168.41.128#53

Name: mail.openlab.com

Address: 192.168.41.161

二.反向:

服务端:

vim /etc/named.conf

zone "41.168.192.in-addr.arpa" IN {

type master;

file "41.168.192.zone";

};

vim /var/named/41.168.192.zone

$TTL 1D

@ IN SOA dns.openlab.com. test.163.com (

0

1D

1H

1W

3H

)

IN NS dns.openlab.com.

160 IN PTR dns.openlab.com

161 IN PTR mail.openlab.com

160 IN PTR www.openlab.com

named-checkconf /etc/named.conf

named-checkzone 41.168.192 /var/named/41.168.192.zone

zone 2.168.192/IN: loaded serial 0

systemctl restart named

nslookup 192.168.41.160

160.41.168.192.in-addr.arpa name = dns.openlab.com.41.168.192.in-addr.arpa.

相关推荐
_OLi_几秒前
力扣 LeetCode 106. 从中序与后序遍历序列构造二叉树(Day9:二叉树)
数据结构·算法·leetcode
我明天再来学Web渗透32 分钟前
【SQL50】day 2
开发语言·数据结构·leetcode·面试
宛唐羁客1 小时前
ODBC连接PostgreSQL数据库后,网卡DOWN后,客户端进程阻塞问题解决方法
网络·数据库
冉佳驹1 小时前
数据结构 ——— 希尔排序算法的实现
c语言·数据结构·算法·排序算法·希尔排序
吴半杯1 小时前
Redis-monitor安装与配置
数据库·redis·缓存
是糖不是唐1 小时前
代码随想录算法训练营第五十三天|Day53 图论
c语言·数据结构·算法·图论
DC妙妙屋1 小时前
11.19.2024刷华为OD
数据结构·链表·华为od
是桃萌萌鸭~2 小时前
mysqldbcompare 使用及参数详解
数据库·mysql
gma9992 小时前
brpc 与 Etcd 二次封装
数据库·c++·rpc·etcd
Yz98762 小时前
hive复杂数据类型Array & Map & Struct & 炸裂函数explode
大数据·数据库·数据仓库·hive·hadoop·数据库开发·big data