LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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


Reply
  Search this Thread
Old 01-10-2013, 10:38 AM   #1
marklamers
LQ Newbie
 
Registered: Jan 2013
Posts: 2

Rep: Reputation: Disabled
unable to nslookup the local machine


unable to resolve mailserver or mailserver.local doing an "nslookup"
server name is "mailserver" server ip 10.10.1.20 Cisco RV180 router ip is 10.10.1.254

[root@mailserver etc]# nslookup
>
> mailserver
Server: 10.10.1.254
Address: 10.10.1.254#53

** server can't find mailserver: NXDOMAIN
>
> mailserver.local
Server: 10.10.1.254
Address: 10.10.1.254#53

** server can't find mailserver.local: NXDOMAIN
>
> mailserver.blowenfuse.com
Server: 10.10.1.254
Address: 10.10.1.254#53

Non-authoritative answer:
Name: mailserver.blowenfuse.com
Address: 67.53.95.94
>


nano /etc/hosts

127.0.0.1 localhost.localdomain localhost.localdomain localhost4 localhost4.localdomain4 localhost
10.10.1.20 mailserver.blowenfuse.com mailserver.local mailserver
::1 localhost.localdomain localhost.localdomain localhost6 localhost6.localdomain6 localhost

i CAN resolve my laptop that is on the same network form mailserver.
[root@mailserver etc]# nslookup
> compaqlaptop
Server: 10.10.1.254
Address: 10.10.1.254#53

Name: compaqlaptop
Address: 10.10.1.111
>


Thank you for any help in advance.
Mark

Last edited by marklamers; 01-10-2013 at 11:58 AM.
 
Old 01-10-2013, 11:40 AM   #2
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 11,709

Rep: Reputation: 1583Reputation: 1583Reputation: 1583Reputation: 1583Reputation: 1583Reputation: 1583Reputation: 1583Reputation: 1583Reputation: 1583Reputation: 1583Reputation: 1583
Hi,

You didn't mention what exactly is your problem, but if you expect to resolve hosts that exist only in /etc/hosts, then you're wrong.
The nslookup utility uses a dns server to resolve hostnames and not /etc/hosts. So if a record for mailserver.local does not exist in the zonefile of the .local zone, you cannot resolve it.

Regards
 
Old 01-10-2013, 12:52 PM   #3
marklamers
LQ Newbie
 
Registered: Jan 2013
Posts: 2

Original Poster
Rep: Reputation: Disabled
unable to resolve mailserver or mailserver.local doing an "nslookup"


i CAN resolve my laptop that is on the same network form mailserver.
[root@mailserver etc]# nslookup
> compaqlaptop
Server: 10.10.1.254
Address: 10.10.1.254#53

Name: compaqlaptop
Address: 10.10.1.111
>

where would i find the "zonefile" to edit it. i'm unable to find it by searching.

Thank you
Mark
 
Old 01-10-2013, 04:37 PM   #4
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 11,709

Rep: Reputation: 1583Reputation: 1583Reputation: 1583Reputation: 1583Reputation: 1583Reputation: 1583Reputation: 1583Reputation: 1583Reputation: 1583Reputation: 1583Reputation: 1583
The router is also your dns server, so I guess you have to do your configuration there.
If you want to be able to resolve hosts without using their FQDN, you can use either a "domain local" or "search local" in /etc/resolv.conf
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
unable to configure keberos on a local machine u_Muhammad Linux - Server 10 06-08-2010 05:45 AM
unable to configure krberos on a local machine u_Muhammad Linux - Networking 2 06-03-2010 02:29 PM
Setup local machine to allow lan machines to retrieve its local user mail. Brian1 Linux - Networking 3 03-30-2006 05:04 AM
nslookup returns local ip when resolving another servers fqdn on same subnet nodrogx Linux - Networking 3 10-28-2003 02:12 PM


All times are GMT -5. The time now is 07:58 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration