리눅스

 

 

 

 

 

[root@localhost /]# cat /etc/resolv.conf 
# Generated by NetworkManager
search localdomain
nameserver 192.168.111.2
[root@localhost /]# 


캐싱 전용 네임 서버

[root@localhost /]# vi /etc/named.conf


      1 //
      2 // named.conf
      3 //
      4 // Provided by Red Hat bind package to configure the ISC BIND named(8) D      
  NS
      5 // server as a caching only nameserver (as a localhost DNS resolver only      
  ).
      6 //
      7 // See /usr/share/doc/bind*/sample/ for example named configuration file      
  s.
      8 //
      9 // See the BIND Administrator's Reference Manual (ARM) for details about      
   the
     10 // configuration located in /usr/share/doc/bind-{version}/Bv9ARM.html
     11 
     12 options {
     13         listen-on port 53 {  any  ;};
     14         listen-on-v6 port 53 {none ; };
     15         directory       "/var/named";
     16         dump-file       "/var/named/data/cache_dump.db";
     17         statistics-file "/var/named/data/named_stats.txt";
     18         memstatistics-file "/var/named/data/named_mem_stats.txt"; 
     19         allow-query     {  any; };
:set number


=>
변경


재시작

[root@localhost /]# systemctl restart named


상태 확인


[root@localhost /]# systemctl status named

 

 

상시 가동

[root@localhost /]# systemctl enable named

 


방화벽 열기


[root@localhost /]# firewall-config 

 


dns 체크

 

 

작동이 되는 지 확인


[root@localhost /]# nslookup
> 192.168.111.2
Server:        192.168.111.2
Address:    192.168.111.2#53

** server can't find 2.111.168.192.in-addr.arpa.: NXDOMAIN
> www.daum.net.
Server:        192.168.111.2
Address:    192.168.111.2#53

Non-authoritative answer:
www.daum.net    canonical name = www.g.daum.net.
Name:    www.g.daum.net
Address: 27.0.236.36
Name:    www.g.daum.net
Address: 27.0.237.55


외부에서 네임서버가 잘 작동하는  접속 후 확인

[root@localhost ~]# cat /etc/resolv.conf  
# Generated by NetworkManager
search localdomain
nameserver 192.168.111.2


=> nameserver 192.168.111.100
변경

네임 서버 주소  inet 192.168.111.100  으로 변경


 

 

 

 

about author

PHRASE

Level 60  머나먼나라

그릇도 차면 넘치고, 사람도 차면 잃게 된다. -명심보감

댓글 ( 0)

댓글 남기기

작성
  •    
  •    
  •