dnsmasq setup Fedora Core 7

Written by James McDonald

June 17, 2007

http://www.thekelleys.org.uk/dnsmasq/doc.html

I do the following.

Normally the local machine queries /etc/resolv.conf for DNS servers. dnsmasq in turn queries resolv.conf for it’s dns servers and can serve clients on the LAN their DNS/DHCP requests

I want the machine running dnsmasq also to be a client of the local dnsmasq server to give it the ability to ping by name any IP address served by it’s DHCP. So I change the setup as follows.

mv /etc/resolv.conf /etc/resolv.conf-dnsmasq

edit /etc/dnsmasq.conf so that it uses the /etc/resolv.conf-dnsmasq for it’s upstream servers

make the local machine query itself which means it will serve the IP Addresses of the DHCP clients

echo nameserver 127.0.0.1 > /etc/resolv.conf

run system-config-network and turn off the ADSL connection from getting it’s DNS servers via DHCP (so it doesn’t overwrite my custom /etc/resolv.conf)

contents of /etc/dnsmasq.conf

resolv-file=/etc/resolv.conf-dnsmasq
local=/localnet/
local=/jmcd.local/
interface=eth0
expand-hosts
domain=jmcd.local
dhcp-range=10.X.X.X,10.X.X.Y,255.255.255.0,12h
dhcp-option=3,10.X.X.X
conf-dir=/etc/dnsmasq.d

0 Comments

Submit a Comment

Your email address will not be published. Required fields are marked *

You May Also Like…

Docker on Fedora 32

Docker on Fedora 32

Commands to run to get moby-engine running on Fedora 32 # as root or sudo'd dnf install grubby grubby...

PDF Poster

PDF Poster

Start with a wide long image. This is just a screen shot of my desktop. widescreen.png Convert it to postscript using...