router/CentOS7

2つnicを持ったマシンでDNSを提供させてみる。

インストール

[root@gate ~]# yum install bind

設定

[root@gate ~]# cp -arp /etc/named.conf /etc/named.conf.orig
 
[root@gate ~]# diff -u /etc/named.conf.orig /etc/named.conf
--- /etc/named.conf.orig        2020-06-01 11:26:55.000000000 -0400
+++ /etc/named.conf     2020-06-28 17:54:29.264363374 -0400
@@ -10,7 +10,7 @@
 // configuration located in /usr/share/doc/bind-{version}/Bv9ARM.html
 
 options {
-       listen-on port 53 { 127.0.0.1; };
+//     listen-on port 53 { 127.0.0.1; };
        listen-on-v6 port 53 { ::1; };
        directory       "/var/named";
        dump-file       "/var/named/data/cache_dump.db";
@@ -18,7 +18,8 @@
        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     { localhost; };
+       allow-query     { localhost; 10.10.0.0/24; };
+       forwarders      { 192.168.0.1; };
 
        /*
         - If you are building an AUTHORITATIVE DNS server, do NOT enable recursion.
[root@date ~]#

トップ   編集 添付 複製 名前変更     ヘルプ   最終更新のRSS
Last-modified: 2020-06-29 (月) 07:15:14 (7d)