Re: [Dnsmasq-discuss] setting up dynamic DNS?

2007-09-10 Thread Adam Hardy

Simon Kelley on 09/09/07 16:02, wrote:

Adam Hardy wrote:

Hi DNSmasq List

I have a small network with a slightly different setup for the 
internet broadband from usual. I'm having problems working out how to 
set up a DHCP service with dnsmasq to provide workstations with 
permanent host names.


Instead of the usual router providing DHCP and DNS services, I just 
have a simple DSL modem attached to eth2 on my gateway server 
(isengard). Using dhclient3, isengard grabs itself a public ip for 
eth2 via DHCP on the modem.


isengard also runs dnsmasq on eth1 for the internal network, and I run 
iptables as my firewall to protect it. I gave eth1 the IP 192.168.0.2


I have 2 more linux boxes, a windows machine and a mac, and the 
potential for other random laptops to come and go. What I want to do 
is set it up so that I can refer to boxes by their hostname at least 
in linux wherever I am on the network, since I do alot of ftp'ing and 
ssh'ing and I want to set up a samba share for backups and cups for 
printing.


I've reached the point where dnsmasq tells every client to use 
192.168.0.2 as the nameserver. These clients run dhclient3 (and 
windows and the mac are happy too)


But this naive approach obviously doesn't cut the mustard. Can I 
instruct dnsmasq to be nameserver of all my hosts for each other?


Thanks and regards
Adam Hardy


PS this is the hosts and resolv.conf from one client:

adam@gondor:~$ cat /etc/hosts
127.0.0.1   localhost gondor.localdomain.net gondor
adam@gondor:~$ cat /etc/resolv.conf
search localdomain.net
nameserver 192.168.0.2


and /etc/dhcp3/dhclient.conf:

send dhcp-lease-time 3600;
supersede domain-name "localdomain.net";
request subnet-mask, broadcast-address, time-offset, routers,
 domain-name, domain-name-servers, host-name,
 netbios-name-servers, netbios-scope, interface-mtu;
send fqdn.fqdn "gondor.localdomain.net";
send fqdn.encoded on;
send fqdn.server-update off;


isengard /etc/dnsmasq.conf:

domain-needed
bogus-priv
filterwin2k
dhcp-range=192.168.0.3,192.168.0.254,12h



All your hosts are using dnsmasq as their nameserver, so once it knows 
the hostnames associated with particular DHCP leases, everything will 
just work.


Broadly, there's two ways to do this. The first is to add names to the 
dnsmasq configuration, associating MAC addresses with names using 
dhcp-host configuration directives or in /etc/ethers. The second, and 
more common, is for the host to know its hostname, and send it to the 
DHCP server when it requests a lease: Windows (and, I'm fairly certain, 
Macs) do this always. dhclient3 needs to be told to do it with something 
like


send host-name "myname"

in /etc/dhcp3/dhclient.conf. Some distros are clever and configure this 
automatically: most (still) don't. Sigh.


STOP PRESS. Looking again, I see you're ahead of me, and sending the 
fqdn instead of the hostname. That should be fine, but you need to tell 
dnsmasq that "localdomain.net" is a valid network for it to accept for 
local hosts. Adding


domain=localdomain.net

to /etc/dnsmasq.conf will do the trick.


Thanks for the responses, I've just tried again, but didn't succeed. I get 'name 
or service unknown' response from ssh, ping etc.


I put in the "send host-name" option, as well as explicitly defining the 
defaults for dhcp-option 1, 3 and 6.


Presumably if dnsmasq is meant to resolve/name-serve my clients, it will put 
their hostnames in isengard's /etc/resolv.conf?


I am probably totally wide of the mark here, but isn't dhclient3 constantly 
rewriting /etc/resolv.conf on isengard (gateway / dnsmasq server) to set up eth2 
on the internet?


I am using the example dnsmasq.conf that came with the package, but I just 
parsed out the comments. And unlike Jan, I'm not using pppoe so I'm not sure 
what approach to take.


Thanks and regards
Adam



Re: [Dnsmasq-discuss] setting up dynamic DNS?

2007-09-10 Thread Jan 'RedBully' Seiffert
Adam Hardy wrote:
[snip]
> 
> Thanks for the responses, I've just tried again, but didn't succeed. I
> get 'name or service unknown' response from ssh, ping etc.
> 
Hmmm, on which machine? Isengard?

> I put in the "send host-name" option, as well as explicitly defining the
> defaults for dhcp-option 1, 3 and 6.
> 
Ok.
And on your clients?
Do they get an IP over dhcp?
Is their DNS-Server set to isengard? (view in /etc/resolv.conf)
Is their default gateway set to isengard? (route -n should say so)

What's printed to isengards system logs when a client gets an IP?

> Presumably if dnsmasq is meant to resolve/name-serve my clients, it will
> put their hostnames in isengard's /etc/resolv.conf?
> 
No, hosts name <-> IP associations are generally not saved in
/etc/resolv.conf, the IP addresses of the machines DNS servers are
stored there (in your case, your ISP DNS server).
Dnsmasq saves dynamically generated associations in its lease file
(/var/lib/misc/dnsmasq.leases).
You can have static associations in /etc/hosts.

dnsmasq will read all three files unless otherwise configured:
/etc/resolv.conf - to get the upstream DNS server
/etc/hosts - to serve static host name <-> IP assignments you made
the lease file - to serve entries generated from leases after a restart

> I am probably totally wide of the mark here, but isn't dhclient3
> constantly rewriting /etc/resolv.conf on isengard (gateway / dnsmasq
> server) to set up eth2 on the internet?
> 
If you are not using pppoe (or something similar) and are getting your
Internet-address by simply doing dhcp on the interface connected to the
modem, then yes. (normally scripts like adsl-connect also rewrite your
/etc/resolv.conf, as i said, i patched mine to stop this...)
But thats ok, this way /etc/resolv.conf will always contain "fresh"
entries of the upstream DNS servers.
Normally dnmasq will poll /etc/resolv.conf for changes, so it doesn't
miss when the upstream DNS server change.

This configuration is fine, but then you will not be able to query
dnsmasq from the machine isengard itself (or not easily), because the
system also uses /etc/resolv.conf to decide who to ask for hostname <->
IP, and your ISP servers will know nothing about your mappings.

The machines inside your LAN, if proper configured (look at their
/etc/resolv.conf, should be isengards IP), will query dnsmasq and should
work.

To fix this on isengard, instruct dhcp-client not to overwrite
/etc/resolv.conf but instead to dump the resolv-info it gathered from
your ISP to another file.
Now you say dnsmasq to use this other file as resolv-file, and in the
system /etc/resolv.conf, you put 127.0.0.1 (on which dnsmasq should also
listen to...).
If this is possible with dhcp-client, i don't know, but it looks like
its very configurable.


> I am using the example dnsmasq.conf that came with the package, but I
> just parsed out the comments. And unlike Jan, I'm not using pppoe so I'm
> not sure what approach to take.
> 
> Thanks and regards
> Adam
> 
Greetings
Jan

-- 
Have you ever noticed that the Klingons are all speaking unix?
"Grep ls awk chmod."   "Mknod ksh tar imap."
"Wall fsck yacc!" (that last is obviously a curse of some sort)
-- Gandalf  Parker



Re: [Dnsmasq-discuss] setting up dynamic DNS?

2007-09-10 Thread xerces8
From: Jan 'RedBully' Seiffert 
Date: Sun, 09 Sep 2007 17:10:49 +0200

> Adam Hardy wrote:
> > Hi DNSmasq List
> > 
> > I have a small network with a slightly different setup for the internet
> > broadband from usual. I'm having problems working out how to set up a
> > DHCP service with dnsmasq to provide workstations with permanent host
> > names.

> Thats IMHO a typical setup, i also just use a dsl modem and a full-blown
> linux box as router, because the config capabilities of those
> router-in-a-box won't cut my needs (multihomed router, fancy traffic
> shaping, some servers, etc.).

Funny, my router-in-a-box does all that ;-)


> Second, to assign some hosts a permanent IP-address, even if recieved by
> dhcp, you need some dchp-host lines
> dhcp-host=mac-address,name,ip,leasetime
> ex:
> dhcp-host=01:23:45:67:89:AB,gondor,192.168.0.3,infinite

I use and recommend a much simpler way :

dhcp-host=hostname,ip
eg:
dhcp-host=nitro,192.168.200.21 # actual config I use


Adam, I use dnsmasq exactly for the same purpose as you want.
And works nice. I recoomed you use a Windows client for testing, as
it work for sure. Then when you fix the server, you can try linux clients.

It would be good to know you dnsmasq.conf file and other relevant configuration 
you did.

Regards,
David





Re: [Dnsmasq-discuss] setting up dynamic DNS?

2007-09-10 Thread Carlos Carvalho
xerces8 (xerc...@butn.net) wrote on 10 September 2007 18:14:
 >It would be good to know you dnsmasq.conf file and other relevant 
 >configuration you did.

It could also be useful to ask for full logging. Put this in
dnsmasq.conf

log-queries
log-dhcp
log-async=100



Re: [Dnsmasq-discuss] setting up dynamic DNS?

2007-09-10 Thread Adam Hardy

Thanks again for the help. Config files appended at bottom for reference.

Jan 'RedBully' Seiffert on 10/09/07 16:45, wrote:

Adam Hardy wrote:

Thanks for the responses, I've just tried again, but didn't succeed. I
get 'name or service unknown' response from ssh, ping etc.


Hmmm, on which machine? Isengard?


on all machines, except when doing "ping isengard"


I put in the "send host-name" option, as well as explicitly defining the
defaults for dhcp-option 1, 3 and 6.


Ok.
And on your clients? Do they get an IP over dhcp?


Yes


Is their DNS-Server set to isengard? (view in /etc/resolv.conf)

adam@gondor:~$ cat /etc/hosts
127.0.0.1   localhost gondor.localdomain.net gondor

# The following lines are desirable for IPv6 capable hosts
::1 ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts
adam@gondor:~$ cat /etc/resolv.conf
search localdomain.net
nameserver 192.168.0.2
adam@gondor:~$ cat /etc/dhcp3/dhclient.conf |grep -v ^#

send host-name "gondor.localdomain.net";
send dhcp-lease-time 3600;
supersede domain-name "localdomain.net";
request subnet-mask, broadcast-address, time-offset, routers,
domain-name, domain-name-servers, host-name,
netbios-name-servers, netbios-scope, interface-mtu;
send fqdn.fqdn "gondor.localdomain.net";
send fqdn.encoded on;
send fqdn.server-update off;

adam@gondor:~$ cat /etc/resolv.conf
search localdomain.net
nameserver 192.168.0.2


Is their default gateway set to isengard? (route -n should say so)


Yes


What's printed to isengards system logs when a client gets an IP?


isengard dnsmasq[26803]: reading /etc/resolv.conf
isengard dnsmasq[26803]: using nameserver 194.74.65.69#53
isengard dnsmasq[26803]: ignoring nameserver 127.0.0.1 - local interface
isengard dnsmasq[26803]: Ignoring DHCP host name arnor.localdomain because it 
has an illegal domain part

isengard dnsmasq[26803]: DHCPDISCOVER(eth1) 192.168.0.24 00:a0:cc:52:5d:fe
isengard dnsmasq[26803]: DHCPOFFER(eth1) 192.168.0.24 00:a0:cc:52:5d:fe
isengard dnsmasq[26803]: Ignoring DHCP host name arnor.localdomain because it 
has an illegal domain part

isengard dnsmasq[26803]: DHCPREQUEST(eth1) 192.168.0.24 00:a0:cc:52:5d:fe
isengard dnsmasq[26803]: DHCPACK(eth1) 192.168.0.24 00:a0:cc:52:5d:fe
isengard dnsmasq[26803]: query[SOA] arnor.localdomain.net from 192.168.0.24
isengard dnsmasq[26803]: config arnor.localdomain.net is 
isengard dnsmasq[26803]: query[SOA] localdomain.net from 192.168.0.24
isengard dnsmasq[26803]: config localdomain.net is 
isengard dnsmasq[26803]: query[SOA] net from 192.168.0.24
isengard dnsmasq[26803]: config net is 
isengard dnsmasq[26803]: query[SOA] . from 192.168.0.24
isengard dnsmasq[26803]: config . is 


It also did this when I tried "ping arnor" from gondor:

isengard dnsmasq[26803]: query[A] arnor.localdomain.net from 192.168.0.234
isengard dnsmasq[26803]: forwarded arnor.localdomain.net to 194.74.65.69
isengard dnsmasq[26803]: forwarded arnor.localdomain.net to 194.74.65.69
isengard dnsmasq[26803]: query[A] arnor.localdomain.net from 192.168.0.234
isengard dnsmasq[26803]: forwarded arnor.localdomain.net to 194.74.65.69


/var/lib/misc/dnsmasq.leases has no hostnames in it.

Hmmm. Doesn't look good does it? :(  What do you think could be wrong with it? 
There seems to be something wrong with the hostname I'm sending it ('illegal 
domain name part') and it also seems to be forwarding the query for 
arnor.localdomain.net up to the internet nameserver.



Adam

PS here are the files for reference if they help:

isengard:~# cat /etc/hosts
127.0.0.1   localhost
192.168.0.2 isengard.localdomain.net isengard
# The following lines are desirable for IPv6 capable hosts
::1 ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts

isengard:~# cat /etc/resolv.conf
search localdomain.net
nameserver 127.0.0.1
nameserver 194.74.65.69

isengard:~# cat /etc/dnsmasq.conf |grep -v ^# |grep -e ^[[:alnum:]]
domain-needed
bogus-priv
filterwin2k
domain=localdomain.net
dhcp-range=192.168.0.3,192.168.0.254,12h
dhcp-option=1,255.255.255.0
dhcp-option=3,192.168.0.2
dhcp-option=6,192.168.0.2
log-queries



adam@gondor:~$ cat /etc/hosts
127.0.0.1   localhost gondor.localdomain.net gondor
# The following lines are desirable for IPv6 capable hosts
::1 ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts

adam@gondor:~$ cat /etc/resolv.conf
search localdomain.net
nameserver 192.168.0.2

adam@gondor:~$ cat /etc/dhcp3/dhclient.conf |grep -v ^#
send host-name "gondor.localdomain.net";
send dhcp-lease-time 3600;
supersede domain-name "localdomain.net";
request subnet-mask, broadcast-address, time-offset, routers,
domain-name, domain-name-servers, host-name,
netbios-name-servers, netbios-scope, interface-mtu;
send fqdn.fqd

Re: [Dnsmasq-discuss] setting up dynamic DNS?

2007-09-10 Thread Simon Kelley

Adam Hardy wrote:


What's printed to isengards system logs when a client gets an IP?



isengard dnsmasq[26803]: reading /etc/resolv.conf
isengard dnsmasq[26803]: using nameserver 194.74.65.69#53
isengard dnsmasq[26803]: ignoring nameserver 127.0.0.1 - local interface
isengard dnsmasq[26803]: Ignoring DHCP host name arnor.localdomain because it 
has an illegal domain part

isengard dnsmasq[26803]: DHCPDISCOVER(eth1) 192.168.0.24 00:a0:cc:52:5d:fe
isengard dnsmasq[26803]: DHCPOFFER(eth1) 192.168.0.24 00:a0:cc:52:5d:fe
isengard dnsmasq[26803]: Ignoring DHCP host name arnor.localdomain because it 

--


has an illegal domain part
isengard dnsmasq[26803]: DHCPREQUEST(eth1) 192.168.0.24 00:a0:cc:52:5d:fe
isengard dnsmasq[26803]: DHCPACK(eth1) 192.168.0.24 00:a0:cc:52:5d:fe
isengard dnsmasq[26803]: query[SOA] arnor.localdomain.net from 192.168.0.24
isengard dnsmasq[26803]: config arnor.localdomain.net is 
isengard dnsmasq[26803]: query[SOA] localdomain.net from 192.168.0.24
isengard dnsmasq[26803]: config localdomain.net is 
isengard dnsmasq[26803]: query[SOA] net from 192.168.0.24
isengard dnsmasq[26803]: config net is 
isengard dnsmasq[26803]: query[SOA] . from 192.168.0.24
isengard dnsmasq[26803]: config . is 



This client seems to think it's arnor.localdomain and not
arnor.localdomain.net. Typo in dhclient3.conf on the client?

Cheers,

Simon.





Re: [Dnsmasq-discuss] setting up dynamic DNS?

2007-09-10 Thread Jan 'RedBully' Seiffert
Adam Hardy wrote:
> Thanks again for the help. Config files appended at bottom for reference.
> 
> Jan 'RedBully' Seiffert on 10/09/07 16:45, wrote:
>> Adam Hardy wrote:
> adam@gondor:~$ cat /etc/resolv.conf
> search localdomain.net
> nameserver 192.168.0.2

Ok, looks good.


>> Is their default gateway set to isengard? (route -n should say so)
> 
> Yes
> 

Ok, so this works.

>> What's printed to isengards system logs when a client gets an IP?
> 
> isengard dnsmasq[26803]: reading /etc/resolv.conf
> isengard dnsmasq[26803]: using nameserver 194.74.65.69#53
> isengard dnsmasq[26803]: ignoring nameserver 127.0.0.1 - local interface
> isengard dnsmasq[26803]: Ignoring DHCP host name arnor.localdomain
> because it has an illegal domain part

^^^

here is the problem

[snip]
> /var/lib/misc/dnsmasq.leases has no hostnames in it.
> 
> Hmmm. Doesn't look good does it? :(

No no, all working within it's spec IMHO ;)

> What do you think could be wrong
> with it? There seems to be something wrong with the hostname I'm sending
> it ('illegal domain name part')

dnsmasq is basicaly fine with the hostname, it does not like the domain
you're client is sending.
It tries to protect you from forgery.
If a client would record itself as www.google.com, and dnsmasq would
believe this, it would forward all your LAN machines for www.google.com
to this machine.

Somehow the "domain=localdomain.net" doesn't do the trick.

But when looking again, arnor (and maybe the other machines) is sending
"$HOSTNAME.localdomain" as hostname?

the final ".net" seems to get eaten...

May you can remove all the references to your domain from your
dhclient.conf, for a test.

> adam@gondor:~$ cat /etc/dhcp3/dhclient.conf |grep -v ^#
>
> send host-name "gondor.localdomain.net";

This should be the hostname only, or?

> send dhcp-lease-time 3600;
> supersede domain-name "localdomain.net";

drop this, dnsmasq should give out the right domain

> request subnet-mask, broadcast-address, time-offset, routers,
> domain-name, domain-name-servers, host-name,
> netbios-name-servers, netbios-scope, interface-mtu;

> send fqdn.fqdn "gondor.localdomain.net";
> send fqdn.encoded on;
> send fqdn.server-update off;
>

drop all this fqdn stuff for a test

Which version of dnsmasq is this?

> and it also seems to be forwarding the
> query for arnor.localdomain.net up to the internet nameserver.
> 

Thats because dnsmasq could not find an entry in it's own db, and thinks
maybe the upstream server know something about it.

To tell dnsmasq that localdomain.net is local, and it should not ask
upstream about it, you may want to add:
local=/localdomain.net/
to your dnsmasq.conf


> 
> Adam
> 

Grettings
Jan

> PS here are the files for reference if they help:
> 
[snip]
> isengard:~# cat /etc/dnsmasq.conf |grep -v ^# |grep -e ^[[:alnum:]]
> domain-needed
> bogus-priv
> filterwin2k
> domain=localdomain.net
> dhcp-range=192.168.0.3,192.168.0.254,12h
> dhcp-option=1,255.255.255.0


> dhcp-option=3,192.168.0.2
> dhcp-option=6,192.168.0.2
normally you should be able to put 0.0.0.0 in here, so dnsmasq will
automatically fill in the right value for your interface

> log-queries

-- 
Fun things to slip into your budged:
Traffic shaping on the loopback interface



Re: [Dnsmasq-discuss] setting up dynamic DNS?

2007-09-10 Thread Adam Hardy
It's the fqdn.fqdn line that causes the problem! I took that out of the 
dhclient.conf on the clients and now have just


send host-name gondor;

which works (massive grin!) - thanks!

But there is one more niggle: it looks as though dnsmasq on isengard is asking 
the internet name-server where isengard is when another machine asks it to 
resolve its hostname.


isengard dnsmasq[2716]: query[] isengard.localdomain.net from 192.168.0.234
isengard dnsmasq[2716]: forwarded isengard.localdomain.net to 194.74.65.69
isengard dnsmasq[2716]: forwarded isengard.localdomain.net to 194.74.65.69
isengard dnsmasq[2716]: query[] isengard.localdomain.net from 192.168.0.234
isengard dnsmasq[2716]: forwarded isengard.localdomain.net to 194.74.65.69
isengard dnsmasq[2716]: query[A] isengard.localdomain.net from 192.168.0.234
isengard dnsmasq[2716]: /etc/hosts isengard.localdomain.net is 192.168.0.2
isengard dnsmasq[2716]: query[A] isengard.localdomain.net from 192.168.0.234
isengard dnsmasq[2716]: /etc/hosts isengard.localdomain.net is 192.168.0.2
isengard dnsmasq[2716]: query[PTR] 2.0.168.192.in-addr.arpa from 192.168.0.234
isengard dnsmasq[2716]: /etc/hosts 192.168.0.2 is isengard.localdomain.net
isengard dnsmasq[2716]: query[A] isengard.localdomain.net from 192.168.0.234
isengard dnsmasq[2716]: /etc/hosts isengard.localdomain.net is 192.168.0.2
isengard dnsmasq[2716]: query[PTR] 2.0.168.192.in-addr.arpa from 192.168.0.234
isengard dnsmasq[2716]: /etc/hosts 192.168.0.2 is isengard.localdomain.net
isengard dnsmasq[2716]: query[PTR] 234.0.168.192.in-addr.arpa from 127.0.0.1
isengard dnsmasq[2716]: DHCP 192.168.0.234 is gondor.localdomain.net
isengard dnsmasq[2716]: query[A] gondor.localdomain.net from 127.0.0.1
isengard dnsmasq[2716]: DHCP gondor.localdomain.net is 192.168.0.234



Jan 'RedBully' Seiffert on 10/09/07 21:54, wrote:

Adam Hardy wrote:

Thanks again for the help. Config files appended at bottom for reference.

Jan 'RedBully' Seiffert on 10/09/07 16:45, wrote:

Adam Hardy wrote:

adam@gondor:~$ cat /etc/resolv.conf
search localdomain.net
nameserver 192.168.0.2


Ok, looks good.



Is their default gateway set to isengard? (route -n should say so)

Yes



Ok, so this works.


What's printed to isengards system logs when a client gets an IP?

isengard dnsmasq[26803]: reading /etc/resolv.conf
isengard dnsmasq[26803]: using nameserver 194.74.65.69#53
isengard dnsmasq[26803]: ignoring nameserver 127.0.0.1 - local interface
isengard dnsmasq[26803]: Ignoring DHCP host name arnor.localdomain
because it has an illegal domain part


^^^

here is the problem

[snip]

/var/lib/misc/dnsmasq.leases has no hostnames in it.

Hmmm. Doesn't look good does it? :(


No no, all working within it's spec IMHO ;)


What do you think could be wrong
with it? There seems to be something wrong with the hostname I'm sending
it ('illegal domain name part')


dnsmasq is basicaly fine with the hostname, it does not like the domain
you're client is sending.
It tries to protect you from forgery.
If a client would record itself as www.google.com, and dnsmasq would
believe this, it would forward all your LAN machines for www.google.com
to this machine.

Somehow the "domain=localdomain.net" doesn't do the trick.

But when looking again, arnor (and maybe the other machines) is sending
"$HOSTNAME.localdomain" as hostname?

the final ".net" seems to get eaten...

May you can remove all the references to your domain from your
dhclient.conf, for a test.


adam@gondor:~$ cat /etc/dhcp3/dhclient.conf |grep -v ^#

send host-name "gondor.localdomain.net";


This should be the hostname only, or?


send dhcp-lease-time 3600;
supersede domain-name "localdomain.net";


drop this, dnsmasq should give out the right domain


request subnet-mask, broadcast-address, time-offset, routers,
domain-name, domain-name-servers, host-name,
netbios-name-servers, netbios-scope, interface-mtu;



send fqdn.fqdn "gondor.localdomain.net";
send fqdn.encoded on;
send fqdn.server-update off;



drop all this fqdn stuff for a test

Which version of dnsmasq is this?


and it also seems to be forwarding the
query for arnor.localdomain.net up to the internet nameserver.



Thats because dnsmasq could not find an entry in it's own db, and thinks
maybe the upstream server know something about it.

To tell dnsmasq that localdomain.net is local, and it should not ask
upstream about it, you may want to add:
local=/localdomain.net/
to your dnsmasq.conf



Adam



Grettings
Jan


PS here are the files for reference if they help:


[snip]

isengard:~# cat /etc/dnsmasq.conf |grep -v ^# |grep -e ^[[:alnum:]]
domain-needed
bogus-priv
filterwin2k
domain=localdomain.net
dhcp-range=192.168.0.3,192.168.0.254,12h
dhcp-option=1,255.255.255.0




dhcp-option=3,192.168.0.2
dhcp-option=6,192.168.0.2

normally you should be able to put 0.0.0.0 in here, so dnsmasq will
automatically fill in the right value for your interface


log-queries

Re: [Dnsmasq-discuss] setting up dynamic DNS?

2007-09-10 Thread Jan 'RedBully' Seiffert
Adam Hardy wrote:
> It's the fqdn.fqdn line that causes the problem! I took that out of the
> dhclient.conf on the clients and now have just
> 
> send host-name gondor;
> 
> which works (massive grin!) - thanks!
> 

fine ^-^

> But there is one more niggle: it looks as though dnsmasq on isengard is
> asking the internet name-server where isengard is when another machine
> asks it to resolve its hostname.
> 
> isengard dnsmasq[2716]: query[] isengard.localdomain.net from
> 192.168.0.234
> isengard dnsmasq[2716]: forwarded isengard.localdomain.net to 194.74.65.69
> isengard dnsmasq[2716]: forwarded isengard.localdomain.net to 194.74.65.69
> isengard dnsmasq[2716]: query[] isengard.localdomain.net from
> 192.168.0.234
> isengard dnsmasq[2716]: forwarded isengard.localdomain.net to
> 194.74.65.69

The "problem" is, your client requests the  record, or in other
words the IPv6 address of isengard, which dnsmasq seems not to know (not
in /etc/hosts or somewhere else)
Because ...

> isengard dnsmasq[2716]: query[A] isengard.localdomain.net from
> 192.168.0.234
> isengard dnsmasq[2716]: /etc/hosts isengard.localdomain.net is 192.168.0.2

... when your client asks for the A record, the IPv4 address, it is
served directly from /etc/hosts

But as said in the last mail, if you want to stop dnsmasq for calling
upstream for things which are local, you may add
local=/localdomain.net/
to your dnsmasq.conf.

HTH

Greetings
Jan

[snip]

-- 
ACPI - Another Crap Proposal Intel