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-02 00:26:55.000000000 +0900
+++ /etc/named.conf     2020-07-18 13:38:44.691185358 +0900
@@ -10,15 +10,14 @@
 // configuration located in /usr/share/doc/bind-{version}/Bv9ARM.html
 
 options {
-       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";
        statistics-file "/var/named/data/named_stats.txt";
        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@gate ~]#

トップ   編集 添付 複製 名前変更     ヘルプ   最終更新のRSS
Last-modified: 2020-07-18 (土) 13:39:14 (132d)