-3

System:centos 6.5 , bind version:bind-9.8.2-0.17.rc1.el6_4.6.x86_64
I must set up an internal dns , i am not geek new for network jobs so sorry for if it is an idiot question.
My centos system cannot reach internet, it is working on intranet.
I install bind with rpm and configure, changed /etc/named.conf

  listen-on port 53 { 127.0.0.1; }; -> listen-on port 53 {any;};  
  allow-query     { localhost; };  -> allow-query     { any; };  

and changed iptables configuration like that

#iptables -A INPUT -p tcp -m state --state NEW -m tcp --dport 53 -j ACCEPT  
#iptables -A INPUT -p udp -m state --state NEW -m udp --dport 53 -j ACCEPT  
#service iptables save  

and vi /etc/resolv.conf is in dns server also below

nameserver ip_of_dns_server

when i,

#nslookup 127.0.0.1 ip_of_dns_server

in dns server i get the below result;

Server:         ip_of_dns_server 
Address:        ip_of_dns_server#53

1.0.0.127.in-addr.arpa  name = localhost.

but if i write this nslookup command in another server in same network, server can't reach the dns server, but i can ping to dns server. In another server results like below, i just changed in this server /etc/resolve.conf with nameserver ip_of_dns_server:

 #ping ip_of_dns_server
 PING ip_of_dns_server (ip_of_dns_server) 56(84) bytes of data.
 64 bytes from ip_of_dns_server: icmp_seq=1 ttl=64 time=1.38 ms
 64 bytes from ip_of_dns_server: icmp_seq=2 ttl=64 time=0.169 ms
 .
 .
 .
 #nslookup 127.0.0.1 ip_of_dns_server  
  ;; connection timed out; trying next origin
  ;; connection timed out; no servers could be reached

What i need to configure more?

seylul
  • 1
  • 1
  • Did you *start* `named`? Also, your configuration will not be sufficient, you need to define zones for the DNS to be useful. – Sven Oct 20 '15 at 09:13
  • yes i started named with `#chkconfig named on` and then `#service named start` and it returns `Starting named: named: already running [ OK ]` – seylul Oct 20 '15 at 10:42
  • How must i define zones for DNS, i cannot decide this? Because its on intranet? – seylul Oct 20 '15 at 11:11
  • Spend some time here: http://www.zytrax.com/books/dns/ In particular, pay close attention to the "Master (Primary) DNS Server" example in chapter 6 ( http://www.zytrax.com/books/dns/ch6/index.html#master ) – Brandon Xavier Oct 20 '15 at 23:38

1 Answers1

0

what is the purpose of this DNS ? are you going to add some zone or DNS entry in it ? if not i'll suggest to go with dnsmasq instate of named it very simple to configure and will serve your purpose.

root
  • 39
  • 2
  • 8