【无标题】

正向:

服务端:

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.

相关推荐
写bug的小屁孩2 小时前
登录注册窗口(一)
运维·服务器·数据库·c++·用户界面·qt6.3
q567315233 小时前
使用 Python 编辑 XML 文件中的文本字段
xml·java·数据库·python·sqlite
鲸屿1953 小时前
数据库第五次作业
数据库
陈大爷(有低保)3 小时前
数据库连接池JNDI
数据库·mysql·tomcat
Gauss松鼠会4 小时前
GaussDB的向量化处理技术
运维·数据库·database·gaussdb
Gauss松鼠会4 小时前
GaussDB Ustore存储引擎解读
java·前端·数据库·gaussdb
_GR5 小时前
每日OJ题_牛客_最长公共子序列_DP_C++_Java
java·开发语言·数据结构·c++·算法·leetcode
2401_857610035 小时前
Spring Boot技术在导师双选系统中的应用
java·数据库·spring boot
祁思妙想5 小时前
7.《双指针篇》---⑦三数之和(中等偏难)
数据结构·算法·leetcode
祁思妙想6 小时前
6.《双指针篇》---⑥和为S的两个数字(中等但简单)(牛客)
java·数据结构·算法