LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   DNS configuration Problem (https://www.linuxquestions.org/questions/linux-newbie-8/dns-configuration-problem-4175429091/)

deep27ak 10-04-2012 02:12 AM

My mistake :o

I forgot the named service never started so you won't get any output.

uk.engr 10-04-2012 02:31 AM

Alhumdulillah!

So nice of you dear. After disabling selinux, named service started atlast!

Thanks a lot to both of you!

now I am going ahead in DNS configuration if I find difficult I will come back here.

bathory 10-04-2012 02:32 AM

@deep27ak

Quote:

Can you check the port no you are using for named.conf
It should be 53 instead of 953 as shown in the error
Please note that 953 is the port rndc is listening on, not the port that named is listening

@OP
Disable SELinux temporarily, to verify that it's the culprit
If you have used yum to install bind related stuff, you shouldn't have such problems

uk.engr 10-05-2012 08:00 AM

I have another query:

When I have two separately connected PCs with each other under domain example.com
Where PC1 192.168.1.91 is dns server and PC2 192.168.1.93 is its client, they can dig, nslookup each other with name and IP both.

But when I Put PC1 (DNS server) on our LAN then no any client able to dig via this dns server.

LAN snacerio:


DSL router: 192.168.1.1 (itself is a DNS server for internet provided by PTCL internet provider)
192.168.1.2 to onwards we have clients.

Now both PC1 and PC2 are on this local net. I have defined in client /etc/resolv.conf
search example.conf
nameserver 192.168.1.91 # DNS for local net
nameserver 192.168.1.1 # dns for internet

clients can ping www.google.com but can't dig or ping client1.example.com.

uk.engr 10-05-2012 09:24 AM

Quote:

Originally Posted by bathory (Post 4796763)
Disable SELinux temporarily, to verify that it's the culprit
If you have used yum to install bind related stuff, you shouldn't have such problems


Yes when I disable SELinux it works, when I enable SELinux it named service doesn't start.

Yes I have installed it via yum, but I faced that problem don't know why

bathory 10-05-2012 10:18 AM

Quote:

Yes when I disable SELinux it works, when I enable SELinux it named service doesn't start.

Yes I have installed it via yum, but I faced that problem don't know why
I'm not using SELinux, but from this doc, looks like that if you want to keep SELinux enabled (you should as it's a good security measure), you can either use:
Code:

named_disable_trans=1
to disable SELinux just for named, or use:
Code:

chcon -R system_u:object_r:named_cache_t /var/named/chroot/var/named/data
to relabel the directory in question

Regards

uk.engr 10-06-2012 03:06 AM

I have another query:

When I have two separately connected PCs with each other under domain example.com
Where PC1 192.168.1.91 is dns server and PC2 192.168.1.93 is its client, they can dig, nslookup each other with name and IP both.

But when I Put PC1 (DNS server) on our LAN then no any client able to dig via this dns server.

LAN snacerio:

DSL router: 192.168.1.1 (itself is a DNS server for internet provided by PTCL internet provider)
192.168.1.2 to onwards we have clients.

Now both PC1 and PC2 are on this local net. I have defined in client /etc/resolv.conf
search example.conf
nameserver 192.168.1.91 # DNS for local net
nameserver 192.168.1.1 # dns for internet

clients can ping www.google.com but can't dig or ping client1.example.com.

bathory 10-06-2012 03:36 AM

Quote:

When I have two separately connected PCs with each other under domain example.com
Where PC1 192.168.1.91 is dns server and PC2 192.168.1.93 is its client, they can dig, nslookup each other with name and IP both.

But when I Put PC1 (DNS server) on our LAN then no any client able to dig via this dns server.
I'm sure that I understand what you mean with the above. When can a client resolve a hostname and when it can't?

BTW, you have an error in /etc/resolv.conf. It should read:
Code:

search example.com

uk.engr 10-08-2012 05:42 AM

Quote:

Originally Posted by uk.engr (Post 4798629)
I have another query:

When I have two separately connected PCs with each other under domain example.com
Where PC1 192.168.1.91 is dns server and PC2 192.168.1.93 is its client, they can dig, nslookup each other with name and IP both.

But when I Put PC1 (DNS server) on our LAN then no any client able to dig via this dns server.

LAN snacerio:

DSL router: 192.168.1.1 (itself is a DNS server for internet provided by PTCL internet provider)
192.168.1.2 to onwards we have clients.

Now both PC1 and PC2 are on this local net. I have defined in client /etc/resolv.conf
search example.conf
nameserver 192.168.1.91 # DNS for local net
nameserver 192.168.1.1 # dns for internet

clients can ping www.google.com but can't dig or ping client1.example.com.

Above issue also resolved when I stopped iptables service on DNS server. Thanks

divya thambiraj 09-28-2013 02:30 AM

divya
 
HI friends,

* If you find error in named configuration file (master file not loaded, named.conf not found) make sure Did you create the named.conf in proper location. Actual location is "/var/named/chroot/etc/named.conf"

If you are not created in this location please move named.conf to this location, then try to start named service.

deep27ak 10-08-2013 03:24 AM

Quote:

Originally Posted by divya thambiraj (Post 5036264)
HI friends,

* If you find error in named configuration file (master file not loaded, named.conf not found) make sure Did you create the named.conf in proper location. Actual location is "/var/named/chroot/etc/named.conf"

If you are not created in this location please move named.conf to this location, then try to start named service.

This is when you have installed bind-chroot rpm

You need to make sure which bind rpm are you using for BIND configuration. Verify the logs properly as it would give more information about the error before taking any step.

divya thambiraj 10-09-2013 04:35 AM

HI
 
Ya i used to install bind* (bind-chroot) package

nanasupriatna0902 03-23-2016 10:49 PM

please tell me what worng with my configuration dns centos ?? huhu
 
Error in named configuration:
zone belogix.com/IN: loaded serial 2011071001
dns_rdata_fromtext: /var/named/reverse.belogix.com:8: near eol: unexpected end of input
zone 0.168.192.in-addr.arpa/IN: loading from master file /var/named/reverse.belogix.com failed: unexpected end of input
zone 0.168.192.in-addr.arpa/IN: not loaded due to errors.
_default/0.168.192.in-addr.arpa/IN: unexpected end of input
zone localhost.localdomain/IN: loaded serial 0
zone localhost/IN: loaded serial 0
zone 1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.ip6.arpa/IN: loaded serial 0
zone 1.0.0.127.in-addr.arpa/IN: loaded serial 0
zone 0.in-addr.arpa/IN: loaded serial 0
[FAILED]

bathory 03-24-2016 01:24 AM

@nanasupriatna0902

Please start you own thread giving more details about your problem.
Especially post the /var/named/reverse.belogix.com zonefile, as it's the one that has errors:
Quote:

dns_rdata_fromtext: /var/named/reverse.belogix.com:8: near eol: unexpected end of input
zone 0.168.192.in-addr.arpa/IN: loading from master file /var/named/reverse.belogix.com failed: unexpected end of input
zone 0.168.192.in-addr.arpa/IN: not loaded due to errors.
_default/0.168.192.in-addr.arpa/IN: unexpected end of input
Regards


All times are GMT -5. The time now is 12:57 AM.