[Dnsmasq-discuss] dnsmasq for road warriors

2012-11-10 Thread /dev/rob0
Seems to me that dnsmasq is a better nscd replacement, and it has a
place in mobile computing.

# we use this dnsmasq as this system's own resolver
no-resolv
# I'm not sure if both of these are needed; we only want DNS and
# only on loopback; we serve only this machine.
no-dhcp-interface=lo
listen-address=127.0.0.1
user=dnsmasq
group=dnsmasq
# When connected to VPN, these names/addresses resolve. When not
# connected, they don't, but that's okay, because we can't get to
# them anyway.
server=/rob0.vpn/192.168.6.1
server=/6.168.192.in-addr.arpa/192.168.6.1
# upstream: Google Public DNS
server=8.8.4.4

The problem here is when you might not want to use 8.8.4.4, such as
when you're at a dnsmasq site where internal DNS is working. The 
solution, I guess, would be a hook in the DHCP client to write the 
DHCP-obtained nameserver[s] to a dnsmasq.d/file to include, and
signal or restart dnsmasq.

Problem with that solution: will dnsmasq.d get crufty, or do we just 
reuse the same file? Also, what if one of the mobile connections is 
not handled by DHCP, such as some cellular data connections?

Speaking of cruft, maybe that's not a bad thing? What will dnsmasq do 
with multiple upstream servers?

server=192.168.40.1
server=192.168.0.1
server=192.168.1.1
server=8.8.4.4

When we're at a site where one of those is our router, that should 
respond much faster than 8.8.4.4 can. OTOH, it could cause 
intermittent errors with local names; 8.8.4.4 is not going to know 
minipax.rob0.lan.

Can we priortise upstream servers? --all-servers implies that this 
can be done somehow, but I don't know how ... is it merely the order 
in which they are listed in the config (or on the command line)? When 
not using --all-servers, how does dnsmasq decide when to try a 
different one, and which one will be tried in that case? Random 
selection, rotating sequential, fixed top-down priority?

Ideally we'd want something which you set up one time and is mostly 
done; something that should work at regular sites you frequent, as 
well as most public hotspots.
--
  http://rob0.nodns4.us/ -- system administration and consulting
  Offlist GMX mail is seen only if /dev/rob0 is in the Subject:

___
Dnsmasq-discuss mailing list
Dnsmasq-discuss@lists.thekelleys.org.uk
http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss


[Dnsmasq-discuss] DNS mapping for a specific IP

2012-11-10 Thread Karina Goyal
 
I need to do following DNS mapping in my router for all requests coming from a 
specific computer/IP-
 
192.168.2.2amazonaws.com
 
This mapping should not be done for requests coming from other computers in my 
network.
 
Currently I have defined it in my router (DDWRT) using dnsmasq but it is 
applicable for all computers in my network.
 
The computer that I want to restrict this mapping for is a wireless photo 
frame. I don't have access to its /etc/hosts file. That's why I need to do it 
at the router level.
 
Is this possible in standard dnsmasq? If not, is it possible to do it with some 
small code change in dnsmasq?
 
Thanks,
Karina.___
Dnsmasq-discuss mailing list
Dnsmasq-discuss@lists.thekelleys.org.uk
http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss


Re: [Dnsmasq-discuss] DNS mapping for a specific IP

2012-11-10 Thread richardvo...@gmail.com
You could use iptables to redirect DNS queries from that photo frame to an
alternate dnsmasq instance, via port masquerade.


On Sat, Nov 10, 2012 at 9:58 AM, Karina Goyal karinago...@yahoo.com wrote:


 I need to do following DNS mapping in my router for all requests coming
 from a specific computer/IP-

 192.168.2.2amazonaws.com

 This mapping should not be done for requests coming from other computers
 in my network.

 Currently I have defined it in my router (DDWRT) using dnsmasq but it is
 applicable for all computers in my network.

 The computer that I want to restrict this mapping for is a wireless photo
 frame. I don't have access to its /etc/hosts file. That's why I need to do
 it at the router level.

 Is this possible in standard dnsmasq? If not, is it possible to do it with
 some small code change in dnsmasq?

 Thanks,
 Karina.


 ___
 Dnsmasq-discuss mailing list
 Dnsmasq-discuss@lists.thekelleys.org.uk
 http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss


___
Dnsmasq-discuss mailing list
Dnsmasq-discuss@lists.thekelleys.org.uk
http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss


[Dnsmasq-discuss] dnsmasq acts as the DHCP server for selected nodes overriding the existing DHCP server on the same LAN?

2012-11-10 Thread Zack Perry
I am trying to set up a small lab in my home.  Like many homes, I have a 
regular DSL service which comes with a 2Wire 3600HGV router, which acts also as 
a DHCP server. Since 

* I would like to PXE boot a few computers in my lab
* The 2Wire is flexible
* I have used dnsmasq at work

so I would like to use dnsmasq as the DHCP server for the few nodes in my lab 
if feasible.

Checking the man page at 
http://www.thekelleys.org.uk/dnsmasq/docs/dnsmasq-man.html, there is the 
following:

[...]
-K, --dhcp-authoritative
(IPv4 only) Should be set when dnsmasq is definitely the only DHCP server 
on a network. It changes the behaviour from strict RFC compliance so that DHCP 
requests on unknown leases from unknown hosts are not ignored. This allows new 
hosts to get a lease without a tedious timeout under all circumstances. It also 
allows dnsmasq to rebuild its lease database without each client needing to 
reacquire a lease, if the database is lost. 
[...]

As far as I know, the ISC DHCP server can use the following to do what I would 
like to accomplish:

authoritative; 
[...]
subnet 192.168.1.0 netmask 255.255.255.0 {
host nb0 {
# 'ping target_host', 'arp' shows MAC address
# only give DHCP information to this computer:
hardware ethernet e8:9a:8f:17:70:42;
# Basic DHCP info (see 'ifconfig', 'route', 'cat /etc/resolv.conf')
fixed-address 192.168.1.10;
option subnet-mask 255.255.255.0;
option routers 192.168.1.254;
option domain-name-servers 192.168.1.254;
# Non-essential DHCP options
filename /pxelinux.0;
}
[...]

But I much prefer dnsmasq's all-in-one-ness.  My question: do I have to 
couple the -K option with something else?  As shown in the example above, the 
ISC DHCP server requires the mac addresses of managed nodes to be explicitly 
specified. Does dnsmasq have something similar?

Regards,

-- Zack  

___
Dnsmasq-discuss mailing list
Dnsmasq-discuss@lists.thekelleys.org.uk
http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss