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



Reply via email to