设为首页 收藏本站
查看: 551|回复: 0

[经验分享] Configuring Domain Name Server On AIX 7.1-candon123

[复制链接]

尚未签到

发表于 2018-10-15 11:31:45 | 显示全部楼层 |阅读模式
  In this article,you will be learn how to configure Domain Name Server on IBM AIX.Before you do,ensure that the bind package was installed.
  


  • [root@dbserv1 named]# named -v
  • named: continuing without SRC support
  • BIND 9.4.1
  • [root@dbserv1 named]# lslpp -w /usr/sbin/named
  •   文件                                        文件集                类型
  •   ----------------------------------------------------------------------------
  •   /usr/sbin/named                             bos.net.tcp.server    Symlink

  

  一.Configuring The Master DNS Server:
  1.Make the rndc.conf file:
  If you want to manage DNS by rndc command,ensure that the rndc.conf or rndc.key are exist.If them aren't exist,use following command to make it.
  


  • [root@dbserv1 named]# rndc-confgen >/etc/rndc.conf
  

  2.Create /etc/named.conf:
  


  • options {
  •             listen-on port 53 { 127.0.0.1;172.16.255.11; };
  •             directory "/etc/named";
  • };

  • zone "." IN {
  •         type hint;
  •         file "named.ca";
  • };

  • zone "xzxj.edu.cn" in {
  •             type master;
  •             file "named.xzxj.data";
  • };

  • zone "255.16.172.in-addr.arpa" in {
  •             type master;
  •     file "named.xzxj.rev";
  • };

  • zone "0.0.127.in-addr.arpa" in {
  •             type master;
  •         file "named.local";
  • };

  • zone "localdomain" IN {
  •         type master;
  •         file "localdomain.zone";
  • };

  • zone "localhost" IN {
  •         type master;
  •         file "localhost.zone";
  • };

  • zone "255.in-addr.arpa" IN {
  •         type master;
  •         file "named.broadcast";
  • };

  • zone "0.in-addr.arpa" IN {
  •         type master;
  •         file "named.zero";
  • };
  • logging {

  •         channel syslog_errors {         // this channel will send errors or
  •                 syslog user;            // or worse to syslog (user facility)
  •                 severity error;
  •         };

  •         channel audit_log {
  •                 file "named.log" versions 3 size 20m;
  •                 severity info;
  •                 print-time yes;
  •                 print-category  yes;
  •         };
  •         category default { audit_log; };
  •         category general { audit_log; };
  •         category security { audit_log; default_syslog; };
  •         category config { default_syslog; };
  •         category resolver { audit_log; };
  •         category xfer-in { audit_log; };
  •         category xfer-out { audit_log; };
  •         category notify { audit_log; };
  •         category client { audit_log; };
  •         category network { audit_log; };
  •         category update { audit_log; };
  •         category queries { audit_log; };
  •         category lame-servers { audit_log; };
  • };
  

  3.Append following lines to named.conf and uncomment them:
  


  • [root@dbserv1 named]# tail -10 /etc/rndc.conf>>/etc/named.conf
  • [root@dbserv1 named]# tail -10 /etc/named.conf
  • key "rndc-key" {
  •        algorithm hmac-md5;
  •        secret "ExxtiKY7VCbCJQew9fVsMA==";
  • };

  • controls {
  •        inet 127.0.0.1 port 953
  •                allow { 127.0.0.1; } keys { "rndc-key"; };
  • };
  

  4.Create named home directory:
  


  • [root@dbserv1 named]#mkdir /etc/named
  • [root@dbserv1 named]#touch /etc/named/named.log
  

  5.Create zones file:
  The named.xzxj.data file:
  


  • [root@dbserv1 named]# cat named.xzxj.data
  • $TTL    86400
  • @               IN SOA  dbserv1.xzxj.edu.cn.       root (
  •                                         2012070100      ; serial (d. adams)
  •                                         3H              ; refresh
  •                                         15M             ; retry
  •                                         1W              ; expiry
  •                                         1D )            ; minimum

  •                         IN   NS         dbserv1.xzxj.edu.cn.
  •                         IN   MX   10    mail.xzxj.edu.cn.
  • xzxj.edu.cn.            IN   A          172.16.255.11
  • mail                    IN   A          172.16.255.11
  • dbserv1                 IN   A          172.16.255.11
  • dbserv2                 IN   A          172.16.255.13
  

  The named.xzxj.rev file:
  


  • [root@dbserv1 named]# cat named.xzxj.rev
  • $TTL    86400
  • @       IN      SOA     dbserv1.xzxj.edu.cn. root  (
  •                                       2012070100 ; Serial
  •                                       28800      ; Refresh
  •                                       14400      ; Retry
  •                                       3600000    ; Expire
  •                                       86400 )    ; Minimum
  •         IN      NS      dbserv1.xzxj.edu.cn.
  •         IN  MX  70      mail.xzxj.edu.cn.
  • 11      IN      PTR     mail.xzxj.edu.cn.
  •         IN      PTR     dbserv1.xzxj.edu.cn.
  • 13      IN      PTR     dbserv2.xzxj.edu.cn.
  

  The localhost.zone file:
  


  • [root@dbserv1 named]# cat localhost.zone
  • $TTL    86400
  • @               IN SOA  @       root (
  •                                         42              ; serial (d. adams)
  •                                         3H              ; refresh
  •                                         15M             ; retry
  •                                         1W              ; expiry
  •                                         1D )            ; minimum

  •                 IN NS           @
  •                 IN A            127.0.0.1
  •                 IN AAAA         ::1
  

  The localdomain.zone file:
  


  • [root@dbserv1 named]# cat localdomain.zone
  • $TTL    86400
  • @               IN SOA  localhost root (
  •                                         42              ; serial (d. adams)
  •                                         3H              ; refresh
  •                                         15M             ; retry
  •                                         1W              ; expiry
  •                                         1D )            ; minimum
  •                 IN NS           localhost
  • localhost       IN A            127.0.0.1
  

  The named.local file:
  


  • [root@dbserv1 named]# cat named.local
  • $TTL    86400
  • @       IN      SOA     localhost. root.localhost.  (
  •                                       2012070100 ; Serial
  •                                       28800      ; Refresh
  •                                       14400      ; Retry
  •                                       3600000    ; Expire
  •                                       86400 )    ; Minimum
  •         IN      NS      localhost.
  • 1       IN      PTR     localhost.
  

  The named.broadcast file:
  


  • [root@dbserv1 named]# cat named.broadcast
  • $TTL    86400
  • @               IN SOA  localhost.      root.localhost. (
  •                                         42              ; serial (d. adams)
  •                                         3H              ; refresh
  •                                         15M             ; retry
  •                                         1W              ; expiry
  •                                         1D )            ; minimum
  •         IN      NS      localhost.
  

  The named.zero file:
  


  • [root@dbserv1 named]# cat named.zero
  • $TTL    86400
  • @               IN SOA  localhost.      root.localhost. (
  •                                         42              ; serial (d. adams)
  •                                         3H              ; refresh
  •                                         15M             ; retry
  •                                         1W              ; expiry
  •                                         1D )            ; minimum
  •         IN      NS      localhost.
  

  The named.ca file:
  


  • [root@dbserv1 named]# cat named.ca
  • ;  DiG 9.3.6-P1-RedHat-9.3.6-4.P1.el5_4.2  -t NS .
  • ;; global options:  printcmd
  • ;; Got answer:
  • ;; ->>HEADERHEADER/etc/named.conf
  

  2.Edit the named.conf file:
  


  • [root@dbserv2 named]# cat /etc/named.conf
  • options {

  •         listen-on port 53 { 127.0.0.1;172.16.255.11; };
  •         directory "/etc/named";
  • };

  • zone "." IN {
  •     type hint;
  •     file "named.ca";
  • };

  • zone "xzxj.edu.cn" IN {
  •     type slave;
  •     file "named.xzxj.data.bak";
  •     masters { 172.16.255.11; };
  • };

  • zone "255.16.172.in-addr.arpa" IN {
  •     type slave;
  •     file "named.xzxj.rev.bak";
  •     masters { 172.16.255.11; };
  • };

  • zone "0.0.127.in-addr.arpa" in {
  •     type master;
  •     file "named.local";
  • };

  • logging {

  •         channel syslog_errors {         // this channel will send errors or
  •                 syslog user;            // or worse to syslog (user facility)
  •                 severity error;
  •         };

  •         channel audit_log {
  •                 file "named.log" versions 3 size 20m;
  •                 severity info;
  •                 print-time yes;
  •                 print-category  yes;
  •         };
  •         category default { audit_log; };
  •         category general { audit_log; };
  •         category security { audit_log; default_syslog; };
  •         category config { default_syslog; };
  •         category resolver { audit_log; };
  •         category xfer-in { audit_log; };
  •         category xfer-out { audit_log; };
  •         category notify { audit_log; };
  •         category client { audit_log; };
  •         category network { audit_log; };
  •         category update { audit_log; };
  •         category queries { audit_log; };
  •         category lame-servers { audit_log; };
  • };

  • key "rndc-key" {
  •         algorithm hmac-md5;
  •         secret "5xl+9GORa0hrur3AmakrXQ==";
  • };

  • controls {
  •         inet 127.0.0.1 port 953
  •                 allow { 127.0.0.1; } keys { "rndc-key"; };
  • };
  

  3.Create zone files:
  The named.local file:
  


  • [root@dbserv2 named]# cat named.local
  • $TTL    86400
  • @       IN      SOA     localhost. root.localhost.  (
  •                                       2012070100 ; Serial
  •                                       28800      ; Refresh
  •                                       14400      ; Retry
  •                                       3600000    ; Expire
  •                                       86400 )    ; Minimum
  •         IN      NS      localhost.
  • 1       IN      PTR     localhost.
  

  The named.ca file:
  


  • [root@dbserv2 named]# cat named.ca
  • ;  DiG 9.3.6-P1-RedHat-9.3.6-4.P1.el5_4.2  -t NS .
  • ;; global options:  printcmd
  • ;; Got answer:
  • ;; ->>HEADERHEADER

运维网声明 1、欢迎大家加入本站运维交流群:群②:261659950 群⑤:202807635 群⑦870801961 群⑧679858003
2、本站所有主题由该帖子作者发表,该帖子作者与运维网享有帖子相关版权
3、所有作品的著作权均归原作者享有,请您和我们一样尊重他人的著作权等合法权益。如果您对作品感到满意,请购买正版
4、禁止制作、复制、发布和传播具有反动、淫秽、色情、暴力、凶杀等内容的信息,一经发现立即删除。若您因此触犯法律,一切后果自负,我们对此不承担任何责任
5、所有资源均系网友上传或者通过网络收集,我们仅提供一个展示、介绍、观摩学习的平台,我们不对其内容的准确性、可靠性、正当性、安全性、合法性等负责,亦不承担任何法律责任
6、所有作品仅供您个人学习、研究或欣赏,不得用于商业或者其他用途,否则,一切后果均由您自己承担,我们对此不承担任何法律责任
7、如涉及侵犯版权等问题,请您及时通知我们,我们将立即采取措施予以解决
8、联系人Email:admin@iyunv.com 网址:www.yunweiku.com

所有资源均系网友上传或者通过网络收集,我们仅提供一个展示、介绍、观摩学习的平台,我们不对其承担任何法律责任,如涉及侵犯版权等问题,请您及时通知我们,我们将立即处理,联系人Email:kefu@iyunv.com,QQ:1061981298 本贴地址:https://www.yunweiku.com/thread-621880-1-1.html 上篇帖子: SQL2K必备经验六条 下篇帖子: DVWA系列之2 low级别SQL注入
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

扫码加入运维网微信交流群X

扫码加入运维网微信交流群

扫描二维码加入运维网微信交流群,最新一手资源尽在官方微信交流群!快快加入我们吧...

扫描微信二维码查看详情

客服E-mail:kefu@iyunv.com 客服QQ:1061981298


QQ群⑦:运维网交流群⑦ QQ群⑧:运维网交流群⑧ k8s群:运维网kubernetes交流群


提醒:禁止发布任何违反国家法律、法规的言论与图片等内容;本站内容均来自个人观点与网络等信息,非本站认同之观点.


本站大部分资源是网友从网上搜集分享而来,其版权均归原作者及其网站所有,我们尊重他人的合法权益,如有内容侵犯您的合法权益,请及时与我们联系进行核实删除!



合作伙伴: 青云cloud

快速回复 返回顶部 返回列表