[TriLUG] Revisiting local dnsmasq DNS resolution

Seva Adari oddissyus at gmail.com
Fri Nov 2 16:46:01 EDT 2012


Hi Brian,

1. See if the following has any helpful pointers for your case:
https://bugs.launchpad.net/ubuntu/+source/dnsmasq/+bug/998712

2. You indicated that the /etc/resolv.conf is automatically setup
for you by the DHCP. Can you check and make sure if it is
adding the right nameserver ip address. If not, can you add
it manually and see if you are able to resolve the hostname.

3. Can you also check and see what you have listed for dns in
/etc/nsswitch.conf

__
Seva

On Fri, Nov 2, 2012 at 12:54 PM, Brian Henning <bhenning at pineinst.com> wrote:
> Hi Seva,
>
> dnsmasq is a DHCP and DNS server in one, so it is always able to resolve
> hostnames for the machines to which it assigns leases (assuming the client
> machine includes its hostname in the DHCPREQ packet, which seems to be the
> case for most devices on my network).  blueman has never had any entry in
> any /etc/hosts file; the "hostname entry" is in the dhcp leases file
> maintained by dnsmasq.
>
> Yes, I can do anything I want if I use the IP address directly; recall my
> original statement that using:
>
> $ ssh `dig +short blueman`
>
> (where the backtick operator provides the output of 'dig +short blueman' to
> ssh as a command-line argument)
>
> works just fine.
>
>
> Cheers,
> ~Brian
>
>
> -----Original Message-----
> From: trilug-bounces at trilug.org [mailto:trilug-bounces at trilug.org] On Behalf
> Of Seva Adari
> Sent: Thursday, November 01, 2012 1:23 PM
> To: Triangle Linux Users Group General Discussion
> Subject: Re: [TriLUG] Revisiting local dnsmasq DNS resolution
>
> If these machines are DHCP assigned then where is the hostname entry
> made?
>
> I have not used dnsmasq, but for 'blueman' to resolve to ip address you
> would have to either configure your dns system or make entry in /etc/hosts.
> The fact that dig is resolving 'blueman' shows that you had your dns system
> configured to resolve to '192.168.0.124'. Are you sure that your DHCP is
> actually assigning '192.168.0.124' to 'blueman'.
>
> Can you ping or ssh directly to '192.168.0.124'?
>
> On Thu, Nov 1, 2012 at 1:01 PM, Brian Henning <bhenning at pineinst.com> wrote:
>>> Did you check to see if you can resolve 'blueman' from other
>>> programs, may be starting with ping.
>>
>> It seems that everybody EXCEPT host and dig fails to resolve blueman.
>>
>>> Is blueman part of your lan or is part of the search domain?
>>
>> blueman is a machine on the local network, which is assigned DHCP by
>> dnsmasq.  There's no domain suffix.
>>
>> It basically looks something like this:
>>
>> [  blueman  ]
>> 192.168.0.124
>>      |
>>    [lan]---- [other internal hosts]
>>      |
>> [ mailwall ]
>> 192.168.0.80
>> <public_ip>
>>      |
>> {{internet}}
>>
>> This is ONLY a problem on mailwall itself (where dnsmasq resides).  All
> the
>> other hosts on the LAN can resolve local names just fine (they look to
>> mailwall for DNS).
>>
>> On mailwall itself, as I've said, host and dig will succeed, but nobody
> else
>> will.  I've tried ping, ssh, nmap, ftp, telnet... nobody knows who blueman
>> is!
>>
>> ~B
>>
>>> On 11/1/2012 11:15 AM, Seva Adari wrote:
>>>>
>>>> Looks like 'short' is resolved but not 'blueman'.
>>>> Do you know how 'short' is resolved? Via /etc/hosts or your dns?
>>>>
>>>> Try to use a fully qualified hostname and see if you are able
>>>> to resolve your host, if you do then it may be related to your
>>>> search domain.
>>>> What do you have for "search" entry listed in /etc/resolv.conf?
>>>>
>>>> On Thu, Nov 1, 2012 at 10:28 AM, Brian Henning <bhenning at pineinst.com>
>>>> wrote:
>>>>>
>>>>> Hi List,
>>>>>
>>>>> Not too long ago I started a short thread about the apparent failure of
>>>>> dnsmasq to resolve local hostnames (things it knows about from its own
>>>>> leases file) on the machine where it's actually running.  The main
> theme
>>>>> of
>>>>> responses seemed to be "make sure localhost is first in
>>>>> /etc/resolv.conf".
>>>>>
>>>>> I made that change, but it still seems not to work completely as
>>>>> expected.
>>>>> dig and host will resolve names, but whatever mechanism is used
>>>>> internally
>>>>> by programs won't.  What I'm trying to say is this:
>>>>>
>>>>> $ ssh blueman
>>>>> ssh: blueman: name or service not known
>>>>>
>>>>> $ ssh `dig +short blueman`
>>>>> brian at 192.168.0.124's password:
>>>>>
>>>>> Why would that be?  What do I need to change to make "ssh blueman"
> work?
>>>>> Do
>>>>> I just need to restart something?
>>>>>
>>>>> Many thanks for the advice and hand-holding.  I don't know why this is
>>>>> escaping me.
>>>>>
>>>>> Cheers,
>>>>> ~Brian
>>>>>
>>>>> ------------------------------------------------------
>>>>>            Brian Henning, Software Engineer
>>>>>
>>>>>      /\    Pine Research Instrumentation
>>>>>     //\\   2741 Campus Walk Ave, Bldg 100
>>>>>    ///\\\  Durham, NC 27705
>>>>>   ////\\\\ USA
>>>>>      ||
>>>>>      ||    phone: 919.782.8320
>>>>>            fax:   919.782.8323
>>>>>            email: bhenning at pineinst.com
>>>>> ------------------------------------------------------
>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> This message was sent to: oddissyus at gmail.com <oddissyus at gmail.com>
>>>>> To unsubscribe, send a blank message to trilug-leave at trilug.org from
>> that
>>>>> address.
>>>>> TriLUG mailing list : http://www.trilug.org/mailman/listinfo/trilug
>>>>> Unsubscribe or edit options on the web  :
>>>>> http://www.trilug.org/mailman/options/trilug/oddissyus%40gmail.com
>>>>> TriLUG FAQ          :
>>>>> http://www.trilug.org/wiki/Frequently_Asked_Questions
>>>
>>>
>>> --
>>> This message was sent to: oddissyus at gmail.com <oddissyus at gmail.com>
>>> To unsubscribe, send a blank message to trilug-leave at trilug.org from that
>>> address.
>>> TriLUG mailing list : http://www.trilug.org/mailman/listinfo/trilug
>>> Unsubscribe or edit options on the web  :
>>> http://www.trilug.org/mailman/options/trilug/oddissyus%40gmail.com
>>> TriLUG FAQ          :
>> http://www.trilug.org/wiki/Frequently_Asked_Questions
>> --
>> This message was sent to: Brian <bhenning at pineinst.com>
>> To unsubscribe, send a blank message to trilug-leave at trilug.org from that
>> address.
>> TriLUG mailing list : http://www.trilug.org/mailman/listinfo/trilug
>> Unsubscribe or edit options on the web  :
>> http://www.trilug.org/mailman/options/trilug/bhenning%40pineinst.com
>> TriLUG FAQ          :
> http://www.trilug.org/wiki/Frequently_Asked_Questions
>>
>> --
>> This message was sent to: oddissyus at gmail.com <oddissyus at gmail.com>
>> To unsubscribe, send a blank message to trilug-leave at trilug.org from that
> address.
>> TriLUG mailing list : http://www.trilug.org/mailman/listinfo/trilug
>> Unsubscribe or edit options on the web  :
> http://www.trilug.org/mailman/options/trilug/oddissyus%40gmail.com
>> TriLUG FAQ          :
> http://www.trilug.org/wiki/Frequently_Asked_Questions
> --
> This message was sent to: Brian <bhenning at pineinst.com>
> To unsubscribe, send a blank message to trilug-leave at trilug.org from that
> address.
> TriLUG mailing list : http://www.trilug.org/mailman/listinfo/trilug
> Unsubscribe or edit options on the web  :
> http://www.trilug.org/mailman/options/trilug/bhenning%40pineinst.com
> TriLUG FAQ          : http://www.trilug.org/wiki/Frequently_Asked_Questions
>
> --
> This message was sent to: oddissyus at gmail.com <oddissyus at gmail.com>
> To unsubscribe, send a blank message to trilug-leave at trilug.org from that address.
> TriLUG mailing list : http://www.trilug.org/mailman/listinfo/trilug
> Unsubscribe or edit options on the web  : http://www.trilug.org/mailman/options/trilug/oddissyus%40gmail.com
> TriLUG FAQ          : http://www.trilug.org/wiki/Frequently_Asked_Questions



More information about the TriLUG mailing list