Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place! |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
11-12-2009, 04:31 AM
|
#1
|
Member
Registered: Apr 2009
Location: Bengaluru, India
Distribution: RHEL 5.4, 6.0, Ubuntu 10.04
Posts: 707
Rep:
|
host hostname not working ?
Hi all....
I have setup a dns in vinay.linux.com server
I am able to ping Rohit.linux.com and vinay.linux.com from both the servers...
but from vinay.linux.com its recognizing the host
Code:
[root@TEG named]# host Rohit.linux.com
Rohit.linux.com has address 172.17.65.206
works fine
but from Rohit.linux.com
Code:
[root@localhost mail]# host Rohit.linux.com
;; connection timed out; no servers could be reached
why is this..?
can anyone please help me....
Thanks in advance...
|
|
|
11-12-2009, 05:55 AM
|
#2
|
Senior Member
Registered: May 2009
Location: london
Distribution: centos5
Posts: 1,137
Rep:
|
Quote:
Originally Posted by vinaytp
Hi all....
I have setup a dns in vinay.linux.com server
I am able to ping Rohit.linux.com and vinay.linux.com from both the servers...
but from vinay.linux.com its recognizing the host
Code:
[root@TEG named]# host Rohit.linux.com
Rohit.linux.com has address 172.17.65.206
works fine
but from Rohit.linux.com
Code:
[root@localhost mail]# host Rohit.linux.com
;; connection timed out; no servers could be reached
why is this..?
can anyone please help me....
Thanks in advance...
|
use host -v or dig to see which dns server, if any each machine is querying.
|
|
|
11-12-2009, 07:45 AM
|
#3
|
Member
Registered: Apr 2009
Location: Bengaluru, India
Distribution: RHEL 5.4, 6.0, Ubuntu 10.04
Posts: 707
Original Poster
Rep:
|
Quote:
Originally Posted by centosboy
use host -v or dig to see which dns server, if any each machine is querying.
|
Thanks centosboy...
host -v or dig all returning same error...But i am able to ping to vinay.linux.com and Rohit.linux.com
also
telnet Rohit.linux.com 80 connects fine..
Anyone please..?
|
|
|
11-12-2009, 07:51 AM
|
#4
|
LQ 5k Club
Registered: May 2001
Location: Belgium
Distribution: Arch
Posts: 8,529
|
Quote:
telnet Rohit.linux.com 80 connects fine..
|
DNS uses port 53
|
|
|
11-12-2009, 08:00 AM
|
#5
|
Member
Registered: Apr 2009
Location: Bengaluru, India
Distribution: RHEL 5.4, 6.0, Ubuntu 10.04
Posts: 707
Original Poster
Rep:
|
Quote:
Originally Posted by repo
DNS uses port 53
|
Even
Code:
telnet Rohit.linux.com 53
is working
But
Code:
host Rohit.linux.com
is returning error message..That is my question ?
Last edited by vinaytp; 11-12-2009 at 08:01 AM.
|
|
|
11-12-2009, 08:05 AM
|
#6
|
LQ 5k Club
Registered: May 2001
Location: Belgium
Distribution: Arch
Posts: 8,529
|
What is the output from
Code:
cat /etc/resolv.conf
nslookup Rohit.linux.com
at [root@localhost mail]#
|
|
|
11-12-2009, 08:31 AM
|
#7
|
Senior Member
Registered: May 2009
Location: london
Distribution: centos5
Posts: 1,137
Rep:
|
Quote:
Originally Posted by vinaytp
Thanks centosboy...
host -v or dig all returning same error...But i am able to ping to vinay.linux.com and Rohit.linux.com
also
telnet Rohit.linux.com 80 connects fine..
Anyone please..?
|
dig rohit.linux.com - with this command the dns server used in the query is noted right down near the bottom of the command output.
dig @vinay.linux.com rohit.linux.com - with this commmand you are actually specifying the server to do the dnslookup.
yes, we also need to know what is in your /etc/resolv.conf and your /etc/hosts files
|
|
|
11-12-2009, 08:32 AM
|
#8
|
Member
Registered: Apr 2009
Location: Bengaluru, India
Distribution: RHEL 5.4, 6.0, Ubuntu 10.04
Posts: 707
Original Poster
Rep:
|
Quote:
Originally Posted by repo
What is the output from
Code:
cat /etc/resolv.conf
nslookup Rohit.linux.com
at [root@localhost mail]#
|
Thanks for your reply repo..
Code:
[root@localhost mail]# cat /etc/resolv.conf
# generated by NetworkManager, do not edit!
nameserver 172.17.70.143
nameserver 172.17.64.78
nameserver 172.17.9.25
Here first name server is ip of my dns...
Code:
[root@localhost mail]# nslookup Rohit.linux.com
;; Got recursion not available from 172.17.70.143, trying next server
;; Got SERVFAIL reply from 172.17.64.78, trying next server
;; Got recursion not available from 172.17.70.143, trying next server
;; connection timed out; no servers could be reached
But I am able to ping to Rohit.linux.com
also
Code:
[root@localhost mail]# telnet Rohit.linux.com 25
Trying 172.17.65.206...
Connected to Rohit.linux.com.
Escape character is '^]'.
220 Rohit.linux.com ESMTP Sendmail 8.14.2/8.14.2; Thu, 12 Nov 2009 18:58:04 +0530
cat /etc/hosts
Code:
172.17.70.143 vinay.linux.com localhost.localdomain localhost vinay
127.0.0.1 localhost.localdomain localhost
172.17.65.206 Rohit.linux.com Rohit
Please help me...
Last edited by vinaytp; 11-12-2009 at 08:35 AM.
|
|
|
11-12-2009, 11:29 AM
|
#9
|
Senior Member
Registered: Nov 2005
Location: Belgium
Distribution: Red Hat, Fedora
Posts: 1,515
Rep:
|
It seems like a problem with your DNS configuration. It works fine for Rohit and vinay hostnames, because they're "translated" to IP addresses through your /etc/hosts file. If you were to comment out the 1st and 3rd line of /etc/hosts, then they too would fail.
Quote:
;; Got recursion not available from 172.17.70.143, trying next server
|
You'll need to solve this issue in your DNS.
If you administer the DNS system, you can try enabling recursion (even if only for your computer).
Have a look for instance at
http://<br />
http://forums.opensuse...kup.html<br />
|
|
|
11-12-2009, 11:37 AM
|
#10
|
Senior Member
Registered: May 2009
Location: london
Distribution: centos5
Posts: 1,137
Rep:
|
Quote:
Originally Posted by vinaytp
Thanks for your reply repo..
Code:
[root@localhost mail]# cat /etc/resolv.conf
# generated by NetworkManager, do not edit!
nameserver 172.17.70.143
nameserver 172.17.64.78
nameserver 172.17.9.25
Here first name server is ip of my dns...
Code:
[root@localhost mail]# nslookup Rohit.linux.com
;; Got recursion not available from 172.17.70.143, trying next server
;; Got SERVFAIL reply from 172.17.64.78, trying next server
;; Got recursion not available from 172.17.70.143, trying next server
;; connection timed out; no servers could be reached
But I am able to ping to Rohit.linux.com
also
Code:
[root@localhost mail]# telnet Rohit.linux.com 25
Trying 172.17.65.206...
Connected to Rohit.linux.com.
Escape character is '^]'.
220 Rohit.linux.com ESMTP Sendmail 8.14.2/8.14.2; Thu, 12 Nov 2009 18:58:04 +0530
cat /etc/hosts
Code:
172.17.70.143 vinay.linux.com localhost.localdomain localhost vinay
127.0.0.1 localhost.localdomain localhost
172.17.65.206 Rohit.linux.com Rohit
Please help me...
|
post your /etc/named.conf pls
|
|
|
11-12-2009, 10:39 PM
|
#11
|
Member
Registered: Apr 2009
Location: Bengaluru, India
Distribution: RHEL 5.4, 6.0, Ubuntu 10.04
Posts: 707
Original Poster
Rep:
|
Quote:
Originally Posted by centosboy
post your /etc/named.conf pls
|
Thanks to all...Still struggling
named.conf file
Code:
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";
// allow-query { localhost; };
// recursion yes;
};
controls {
inet 127.0.0.1 allow { localhost; } keys { rndckey; };
};
zone "." IN {
type hint;
file "named.ca";
};
zone "linux.com" IN {
type master;
file "vinay.linux.com";
allow-update { none; };
};
include "/etc/rndc.key";
My vinay.linux.com file
Code:
;zone file for 'fedorabook.com'
; Default TTL is 1 hour
$TTL 1H
; start of authority
@ SOA ns1 localhost (
2007201706 ; serial number
3D ; refresh
1H ; retry
3D ; expire
1H ) ; minimum
; Nameservers
IN NS vinay
; IN NS darkday
; Addresses of hosts
vinay IN A 172.17.70.143
Rohit IN A 172.17.65.206
;darkday IN A 216.183.93.225
; Mail exchangers
@ IN MX 10 vinay
@ IN MX 20 Rohit
; Nicknames/aliases
;mail IN CNAME bluesky
;www IN CNAME bluesky
;ww IN CNAME bluesky
;wwww IN CNAME bluesky
Even if i comment entries of Rohit and vinay in /etc/resolve.conf file ping works fine with both vinay.linux.com and Rohit.linux.com
Last edited by vinaytp; 11-12-2009 at 10:50 PM.
|
|
|
11-13-2009, 02:38 AM
|
#12
|
Senior Member
Registered: Nov 2005
Location: Belgium
Distribution: Red Hat, Fedora
Posts: 1,515
Rep:
|
Uncommenting the line
would eliminate the error message. But make sure to read up on DNS configuration to check
the impact before you actually make the change!
I'm not a DNS expert, so I can't tell if it opens up a Pandora box.
|
|
|
11-13-2009, 03:47 AM
|
#13
|
Senior Member
Registered: May 2009
Location: london
Distribution: centos5
Posts: 1,137
Rep:
|
Quote:
Originally Posted by timmeke
Uncommenting the line
would eliminate the error message. But make sure to read up on DNS configuration to check
the impact before you actually make the change!
I'm not a DNS expert, so I can't tell if it opens up a Pandora box.
|
not only the above...i can see a number of issues with your conf file.
1. it is supposed to be listening on port 53...uncomment that line.......and not only on localhost
2. allow query...uncomment that line and enter all the hosts/ips that are allowed to query this dns
basically it should look more like this
Code:
options {
listen-on port 53 { 127.0.0.1; 192.168.x.x; };
// 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";
allow-query { localhost; 192.168.x.x; 192.x.x.x };
recursion yes;
};
controls {
inet 127.0.0.1 allow { localhost; } keys { rndckey; };
};
zone "." IN {
type hint;
file "named.ca";
};
zone "linux.com" IN {
type master;
file "vinay.linux.com";
allow-update { none; };
};
include "/etc/rndc.key";
restart named after making changes
you are simply allowing nothing to access this dns server..
please read the bind documentation to get you going....it is what the rest of us do
Code:
http://tldp.org/HOWTO/DNS-HOWTO-1.html
Im afraid you cant just get this all going smoothly without first reading *some* kind of documentation.
|
|
|
11-13-2009, 06:28 AM
|
#14
|
Member
Registered: Apr 2009
Location: Bengaluru, India
Distribution: RHEL 5.4, 6.0, Ubuntu 10.04
Posts: 707
Original Poster
Rep:
|
Thanks a loooot timmeke and centosboy....
It worked...
Thanks again...
|
|
|
All times are GMT -5. The time now is 04:29 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|