Sign up ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I have dnsmasq running as a dns server with a number of linux boxes using static ips that run several virtual hosts on subdomains.

I currently have the following address line in my dnsmasq.conf to map the subdomain of a boxes address to the boxes static ip:


e.g. > maps to devbox1 static ip, site1 virtual host > maps to devbox1 static ip, site2 virtual host > maps to devbox2 static ip, site3 virtual host

I was wondering if I can change the machines over to DHCP addresses (instead of static) and have dnsmasq use the dhcp ip instead of the static one?

Can I modify the address line to refer to the DHCP address (obviously, I cant hardcode the address)?

I know I could add mac address to ip allocation, but I want to avoid this if possible.

share|improve this question

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.