LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 06-16-2010, 06:49 PM   #1
Plaethos
LQ Newbie
 
Registered: Sep 2009
Posts: 9

Rep: Reputation: 0
How to query against a DNS server with Windows Client?


I'm trying to setup a linux box to act as just a DNS server. Its something I'd like to use just for WAN type requests and leave other domain related things to the Server running WIndows...

At this point on my Linux box, I can run queries and nslookups from it. I can not however, from a Windows box, run a NSLOOKUP command from the Linux box which is telling me to check the permissions from Linux to enable that for the clients. It's enabled.

From a C:\ I type in nslookup - *ip of Linux box* and it tells me -- Can't find server name for address...no Response.

and a little blurb from the named.conf

options {
listen-on port 53 { any; };
forward first;
forwarders {
10.0.2.2;
10.10.1.10;
4.2.2.2;
};
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;localnets; };
recursion yes;
 
Old 06-16-2010, 08:15 PM   #2
LVsFINEST
Member
 
Registered: Aug 2006
Posts: 99

Rep: Reputation: 21
What is the primary DNS server currently set to on the Windows device? I also don't understand exactly what/how you got a permission denied error...

By running command 'nslookup <IP of linux box>', all you're doing is attempting to identify the hostname of the Linux box itself, and Windows is going to query it's primary DNS server, whatever that is set to.

If you want run DNS queries from Windows against your Linux box, you either have to set it as the primary DNS server, or specifically tell nslookup to query it. Just type 'nslookup' on the cmd prompt, hit enter. Now type 'server <IP of linux box>' to set it as the DNS server to use. Then just type the IP or hostname of whatever it is you want to query. Here's a sanitized example in case that doesn't make sense:

C:\>nslookup
Default Server: <My primary DNS server hostname>
Address: xxx.xxx.xxx.xxx

> server 68.105.28.11
Default Server: cdns1.cox.net
Address: 68.105.28.11

> www.google.com
Server: cdns1.cox.net
Address: 68.105.29.12

DNS request timed out.
timeout was 2 seconds.
DNS request timed out.
timeout was 2 seconds.
*** Request to cdns1.cox.net timed-out
 
Old 06-17-2010, 10:31 AM   #3
Plaethos
LQ Newbie
 
Registered: Sep 2009
Posts: 9

Original Poster
Rep: Reputation: 0
Windows Query

LVsFinest - when you're in a Windows environment, you can query against a DNS server by issuing a command of nslookup - (notice the hyphen here) IP of DNS server. If they are configured to allow queries against them, such as your Public DNS servers, you're then able to do nslookups from said IP. Example:

C:\>nslookup - 10.10.3.100
*** Can't find server name for address 10.10.3.100: No response from server
Default Server: UnKnown
Address: 10.10.3.100

> google.com
Server: UnKnown
Address: 10.10.3.100

*** UnKnown can't find google.com: No response from server
> exit

C:\>nslookup - 4.2.2.2
Default Server: vnsc-bak.sys.gtei.net
Address: 4.2.2.2

> google.com
Server: vnsc-bak.sys.gtei.net
Address: 4.2.2.2

Non-authoritative answer:
Name: google.com
Address: 72.14.254.104

My curiosity here is how to enable permissions to query against. The oddest thing is I have a Linux box sitting at home and I've tried following it verbatum as I have *it* working fine and therefore must be overlooking something here.

Before I go on futher, this is Fedora 10.

What would control the "access" to query in a Linux box when dealing straight with DNS? Is it in the named.conf file or is it a combo of named.conf and perhaps a named.rfc... file? Would it be also caused by an improperly setup zone file?

I'm looking for Linux configuration guidance as I have resorted to online lookups/this site for answers/LinuxChinapub and Linuhomexnetworking.

Any additional help would be great. I appreciate you looking into this at this degree.

Regards.
 
Old 06-17-2010, 07:46 PM   #4
SuperJediWombat!
Member
 
Registered: Apr 2009
Location: Perth, Australia
Distribution: Ubuntu/CentOS
Posts: 208

Rep: Reputation: 51
On the windows box, run
Code:
ipconfig /all
and post the output. Have you set the DNS IP? Can you ping the DNS server?


Assuming all of that is fine, run these from the linux box.
Code:
ip address
ip route
sudo netstat -tulnp

Last edited by SuperJediWombat!; 06-17-2010 at 07:49 PM.
 
Old 06-17-2010, 09:39 PM   #5
LVsFINEST
Member
 
Registered: Aug 2006
Posts: 99

Rep: Reputation: 21
Ah, ok! So doing 'nslookup - <server IP>' sets the DNS server to use. I did see that dash there in your post too, I just thought it was a typo. Learn something new everyday! Thanks!

Have you tried anything else in the 'allow-query' field? The documentation on redhat's site says:

"allow-query — Specifies which hosts are allowed to query this nameserver. By default, all hosts are allowed to query. An access control list, or collection of IP addresses or networks may be used here to only allow particular hosts to query the nameserver."

Which makes it sound like the keywords 'localnets' and 'localhost' will not work. It seems they are reserved for acls, not allow-query statements. But maybe I am just misinterpreting it...

http://www.redhat.com/docs/manuals/l...namedconf.html
 
  


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
DHCP RH-linux-client, windows-server, DNS-registration not happening armadilloman Linux - Networking 5 01-12-2009 09:53 AM
cannot connect windows xp client to linux dns server njukks Linux - Server 4 01-11-2009 03:29 PM
Newbie DNS problem (client can't query server) s_rasmussen Linux - Server 5 11-26-2007 10:46 AM
Linux DNS Server & Windows XP Client Richtown Linux - Networking 1 04-23-2007 02:49 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 03:04 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
Open Source Consulting | Domain Registration