단일 호스트의 “가짜”DNS bind9 dns 서버를

내 홈 네트워크에서 bind9 dns 서버를 실행 중이며 로컬 / 192.168.xx 도메인의 모든 내부 서버에 서비스를 제공합니다. 그 중 하나 인 extweb.local 192.168.1.33도 인터넷에서 home.sickel.net ( 글쎄, 정확히는 아니지만 아이디어를 얻습니다.)

내부 DNS를 설정하여 home.sickel.net을 192.168.1.33으로 해석 할 수 있습니까? sickel.net의 다른 모든 호스트는 외부에서 실행되므로 내부 DNS로 해결해서는 안됩니다.

(이 모든 것은 주로 가족의 나머지 사람들이 더 쉽게 할 수 있도록하기 때문에 집에 있거나 www를 통해 액세스하더라도 서버를 항상 home.sickel.net으로 참조 할 수 있습니다)

내 홈 네트워크의 모든 서버는 데비안을 실행합니다. 이들은 모두 동일한 서브넷에 있으며 단일 게이트웨이를 통해 인터넷에 연결됩니다.



답변

물론 할 수 있습니다. 여기를보십시오 : https://help.ubuntu.com/community/BIND9ServerHowto#Primary_Master_Server_configuration

red@ubuntu:/etc/bind$ cat named.conf.local
zone "home.sickel.net." {
             type master;
             file "/etc/bind/db.sickel.net";
        };

red@ubuntu:/etc/bind$ cat db.sickel.net
$TTL    604800
@       IN      SOA     localhost. root.localhost. (
                              2         ; Serial
                         604800         ; Refresh
                          86400         ; Retry
                        2419200         ; Expire
                         604800 )       ; Negative Cache TTL
;
@       IN      NS      localhost.
home.sickel.net. IN     A       192.168.1.33
red@ubuntu:/etc/bind$ sudo service bind9 restart
 * Stopping domain name service... bind9 [ OK ]
 * Starting domain name service... bind9 [ OK ]
red@ubuntu:/etc/bind$ dig +short home.sickel.net @localhost
192.168.1.33
red@ubuntu:/etc/bind$ dig +short sickel.net @localhost
85.19.71.164

이제 127.0.0.1을 기본 이름 서버로 사용하도록 /etc/resolv.conf를 변경하십시오.