LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices

Reply
 
Search this Thread
Old 02-25-2010, 04:00 AM   #1
Umanga
Member
 
Registered: Aug 2004
Location: Sri Lanka
Distribution: Debian Etch
Posts: 36

Rep: Reputation: 15
Question simple DNS server (dnsmasq) with Windows hosts?


Greetings friends,

I have installed 'dnsmasq' in my Debian server (192.168.2.10) and configured all host names in its '/etc/hosts' file as:

Code:
192.168.2.10 simba
192.168.2.12 mufasa
192.168.2.15 nala
192.168.2.18 kaira
192.168.2.21 sarab
I added a nameserver in all hosts (192.168.2.10).

I can ping from any linux workstation for a hostname,but when I ping for any of above host name from a Windows machine , it cannot resolve it.

How can I use 'dnsmasq' server to resolve names from a Window machine ?

thanks in advance.
 
Old 02-25-2010, 04:32 AM   #2
MS3FGX
Guru
 
Registered: Jan 2004
Location: NJ, USA
Distribution: Slackware, Debian
Posts: 5,852

Rep: Reputation: 351Reputation: 351Reputation: 351Reputation: 351
Are you using DHCP for the Windows clients? Have you checked that they are using your server as their primary DNS?

In the past I have noticed that Windows clients don't always pick up a dnsmasq DNS server with the default configuration, and they need to be forced by adding something like this to dnsmasq.conf:

Code:
# Set DNS server for Windows machines
dhcp-option=6,192.168.2.10
 
1 members found this post helpful.
Old 02-25-2010, 07:52 PM   #3
Umanga
Member
 
Registered: Aug 2004
Location: Sri Lanka
Distribution: Debian Etch
Posts: 36

Original Poster
Rep: Reputation: 15
Thanks alot MS3FGX,

I added the option you mentioned but still Windows machines doesnt resolve the names.

In the 'ipconfig/all' it shows:

Quote:
DHCP Server .......: 192.168.1.5
DNS Servers .......: 192.168.2.1
192.168.1.5
But it works fine when I added the server IP (192.168.1.5) in TCP/IP4 settings manually.





Quote:
Originally Posted by MS3FGX View Post
Are you using DHCP for the Windows clients? Have you checked that they are using your server as their primary DNS?

In the past I have noticed that Windows clients don't always pick up a dnsmasq DNS server with the default configuration, and they need to be forced by adding something like this to dnsmasq.conf:

Code:
# Set DNS server for Windows machines
dhcp-option=6,192.168.2.10
 
Old 07-29-2011, 08:17 AM   #4
gustavoc
LQ Newbie
 
Registered: Oct 2009
Location: Patagonia, Argentina
Distribution: Slackware 14.1
Posts: 17

Rep: Reputation: 0
I guess that by this time you have already solved this problem, but if not I think I have the answer (because I faced the same issue and finally got it working!). By using tcpdump to debug the name resolution of the windows client I have noticed that before asking for the domain name to resolve, it asks for the own name (reverse resolution) of the host that is running dnsmasq (the dns "server"). If the host running dnsmasq does not respond to this query, the win client discards it and asks the next dns server available (in my case i had 2 networks on the win machine). Solution, add a line to /etc/hosts containing the own dnsmasq box ip and name. Take notice that my dnsmasq box has several interfaces and there was only one line on /etc/hosts pointing to the ip of eth0, so I added the other interfaces there. This way the dnsmasq process will answer the initial query and everyone is happy!
Hope this will help you!

Gustavo.
 
  


Reply

Tags
dns, wins


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
Managed DNS server lists and dnsmasq DNS cache nitrousoxide82 Linux - Networking 1 02-21-2014 10:34 PM
[SOLVED] dnsmasq: how to prevent upstream queries for hosts in /etc/hosts? catkin Linux - Networking 2 02-18-2013 10:50 AM
[SOLVED] DNS server issue resolving localdomain hosts hazza96 Linux - Server 5 12-15-2009 02:54 PM
Can I use my /etc/hosts file as a person DNS server? trist007 Linux - Newbie 8 03-23-2009 04:58 PM
DNSMASQ Wont expand hosts Rooboy Linux - Networking 1 01-18-2005 10:02 AM


All times are GMT -5. The time now is 11:36 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration