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

2007-09-11 Thread Jan 'RedBully' Seiffert
Adam Hardy wrote:
[snip]
 Yes you did say that previously but I was unsure about the requirement
 of the slashes front and back, so I left it unchanged.
 
 So I changed the dnsmasq.conf again in this way and now the logging
 gives me the following:
 
 isengard dnsmasq[8120]: reading /etc/resolv.conf
 isengard dnsmasq[8120]: using nameserver 194.74.65.69#53
 isengard dnsmasq[8120]: ignoring nameserver 127.0.0.1 - local interface
 isengard dnsmasq[8120]: using local addresses only for domain
 localdomain.net
 isengard dnsmasq[8120]: query[] pop.1und1.com from 192.168.0.234
 isengard dnsmasq[8120]: forwarded pop.1und1.com to 194.74.65.69
 isengard dnsmasq[8120]: reply pop.1und1.com is NODATA-IPv6

client 192.168.0.234 asks for IPv6 1und1.com
dnsmasq asks upstream
Upstream answer no ipv6

 isengard dnsmasq[8120]: query[] pop.1und1.com.localdomain.net from
 192.168.0.234
 isengard dnsmasq[8120]: config pop.1und1.com.localdomain.net is
 NXDOMAIN-IPv6

client asks for IPv6 1und1.com.localdomain.net
dnsmasq sees from it's config - no

 isengard dnsmasq[8120]: query[A] pop.1und1.com from 192.168.0.234
 isengard dnsmasq[8120]: forwarded pop.1und1.com to 194.74.65.69
 isengard dnsmasq[8120]: reply pop.1und1.com is 212.227.15.177
 isengard dnsmasq[8120]: reply pop.1und1.com is 212.227.15.161
 

finally the client asks the right questions ;)

 On the eighth line: query[] pop.1und1.com.localdomain.net 
 
 Is this normal - or another misconfiguration?

I wouldn't call it normal, but it's no misconfiguration *AFAIK*.

 Why would dnsmasq think it might have the localdomain.net suffix?

No, the client, or its system resolver libraries.
Since it is an IPv6 enabled client, it tries IPv6 first.
The answer is negativ, so it tries what its /etc/resolv.conf says:
search localdomain.net

On the other hand this way the client makes from gondor -
gondor.localdomain.net.

Maybe you can change the order the client tries IPv6  IPv4.
OTOH, ISPs should see more IPv6 queries, so we may finally get IPv6 ;)

I would leave it this way, dnsmasq caching abilities and the fact that
these queries are made on a local link with almost no latency makes this
a don't worry.

 I can imagine it may be dnsmasq
 trying out the name with the local domain appended - just in case it may
 have been an actual simple local hostname without the localdomain.net
 suffix.
 
Hmmm, that comes into play with the expand-hosts option


 Thank you very much for the help by the way - everyone included.
 
 Regards
 Adam
 
 
Grettings
Jan

-- 
...by all means, do not use a hammer.
(from an IBM documentation ca. 1920)



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

2007-09-11 Thread xerces8
Adam Hardy adam@cyberspaceroad.com wrote :
 
 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

1.) .net is an official TLD. Do not make up nonregistered names in it.
Use names that were created for this purpose. See RFC 2606, quoting :

To safely satisfy these needs, four domain names are reserved as
   listed and described below.

   .test
.example
.invalid
  .localhost
-end quote-

2.) do not complicate things !
3.) do not complicate things ! ;-)

 domain=localdomain.net
as said, use a private address , like domain=test or domain=adam.test
do not forget to also change /etc/hosts and resolv.conf 

 dhcp-range=192.168.0.3,192.168.0.254,12h
Do you have a good reason to specify an own lease time (sorry if this was 
mentioned, I missed it) ?
What is wrong with default ? (remember : more options written, more mistakes)

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

dnsmasq does this by default. If you ever change the routers address, you will 
also have to remember
to change this lines. This is an unnecessary source of errors. Delete them

Again, I recommend using a Windows client for tests, because :
 - it works
 - it is simple
When it works, you can go and set up the other clients.

Regards,
David





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

2007-09-11 Thread Simon Kelley
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!


FQDN overrides hostname (this makes some sense since FQDN is a newer
facility, so one can assume that a FQDN is authoritative, with hostname
left only for servers which don't implement FQDN).


It would help me if you could just check that FQDN works with the
correct domain. The last logs you posted seemed to indicate that the
problem was just a mismatch between the domain part of the FQDN and the
domain configured in dnsmasq. If the FQDN was indeed correct, then there
might be a bug in FQDN handling in dnsmasq. If so, let me know and give
me the version of dnsmasq you're using and I'll take a look.


Cheers,

Simon.


 
 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, 

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 xerces8
From: Jan 'RedBully' Seiffert redbu...@cc.fh-luh.de
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 NODATA
isengard dnsmasq[26803]: query[SOA] localdomain.net from 192.168.0.24
isengard dnsmasq[26803]: config localdomain.net is NODATA
isengard dnsmasq[26803]: query[SOA] net from 192.168.0.24
isengard dnsmasq[26803]: config net is NODATA
isengard dnsmasq[26803]: query[SOA] . from 192.168.0.24
isengard dnsmasq[26803]: config . is NODATA


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 

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



[Dnsmasq-discuss] setting up dynamic DNS?

2007-09-09 Thread Adam Hardy

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