ubuntu域名服务器地址怎么配置

本篇内容主要讲解“ubuntu域名服务器地址怎么配置”,感兴趣的朋友不妨来看看。本文介绍的方法操作简单快捷,实用性强。下面就让小编来带大家学习“ubuntu域名服务器地址怎么配置”吧!

1.打开终端输入以下命令进行安装配置DNS。

sudo apt install bind9


2.修改配置文件“/etc/bind/named.conf.local”,添加正逆解析文件的配置,修改后如下:

//
// Do any local configuration here
//
// Consider adding the 1918 zones here, if they are not used in your
// organization
//include "/etc/bind/zones.rfc1918";
//domain->ip
zone "flovem.home" in {
type master;
file "/var/cache/bind/db.flovem.home";
};
//ip->domain
zone "0.168.192.in-addr.arpa" in {
type master;
file "/var/cache/bind/reverse/db.0.168.192";
};

3.根据第2步中的配置,添加相应的正逆向解析文件,例如:

在/var/cache/bind/目录下添加文件db.flovem.home:

//正向解析

$TTL 604800

@ IN SOA flovem.home. root.flovem.home. (

2 ; Serial

604800 ; Refresh

86400 ; Retry

2419200 ; Expire

604000) ; Negative Cache TTL

;

; name servers

@ IN NS ns.flovem.home.

@ IN A 192.168.0.102

;ns records

ns IN A 192.168.0.102

;host records

hangzhou IN A 192.168.0.102


在/var/cache/bind/reverse/目录中添加文件db.0.168.192

//逆向解析

$TTL 604800

@ IN SOA flovem.home. root.flovem.home. (

2 ; Serial Number

604800 ; Refresh

86400 ; Retry

2419200 ; Expire

86400 ); ; Minimum


@ IN NS flovem.home.


66 IN PTR hangzhou.flovem.home.


4.重启ubuntu使其生效即可。

到此,相信大家对“ubuntu域名服务器地址怎么配置”有了更深的了解,不妨来实际操作一番吧!这里是蜗牛博客网站,更多相关内容可以进入相关频道进行查询,关注我们,继续学习!

免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:niceseo99@gmail.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。

评论

有免费节点资源,我们会通知你!加入纸飞机订阅群

×
天气预报查看日历分享网页手机扫码留言评论电报频道链接