[Dnsmasq-discuss] hosts resolving to public addresses not private

Brent S. Elmer Ph.D. webe3vt at aim.com
Fri Feb 17 15:18:48 GMT 2012


I am using dnsmasq with dhcp turned on to make a wireless access point
on a computer.  The computer is connected with a cable to a
modem/router.

I have computer 1 connected to the modem/router, computer 2 connected to
the modem/router with a cable.  Computer 1 is using dnsmasq without dhcp
and it gets an ip address using dhcp from the modem/router.  Computer 2
gets an ip address using dhcp from the modem/router connected by cable.
Computer 2 has dnsmasq running with dhcp and also hostapd and a wireless
card.  Computer 2 becomes a wireless access point.  Computer 3 is a
laptop that can connect wireless to the modem/router or the computer 2
access point.  Everything works fine as far as connecting to the
internet.  Computer 1, 2, and 3 all resolve internet addresses.
Computer 3 works whether connected wireless to the modem/router or the
computer 3 wireless access point.  At any time, more computers can be
added.

The question I would like to resolve is about the computers all talking
to each other by name.  I can ping by name and fully qualified name any
of the computers from any of the other computers.  The problem is that
the ping returns the public ip address and not the private address.  As
a result of this, using ssh for example by host name does not work.  I
can ssh by using the private ip address.  I would like to be able to use
things like ssh, NX, ... using host names and have them work.  Is there
a way to have dnsmasq do this without having to statically fix hosts to
ip addresses?

What I would like to do is set up dnsmasq to resolve local/private hosts
to local/private addresses not public addresses.

Thanks,  

Brent




More information about the Dnsmasq-discuss mailing list