1

I need to setup a dynamic dns on the raspberry pi. For this I have installed the dnsmasq service. I have created a file with name home.dns and below are its contents:

domain-needed
bogus-priv
dhcp-range=192.168.1.5,48h
dhcp-option=3,192.168.1.1
domain=home.com

dhcp-host=00:28:f8:32:44:a7,pi1
dhcp-host=b8:27:eb:5a:9f:7c,pi2

As I want this to work with dynamic ip address so I have not used any static ips. After restarting the service, it failed and showed error in line dhcp-range=192.168.1.5,48h with this message dnsmasq: bad dhcp-range at line 3 of /etc/dnsmasq.d/home.dns. How can I resolve this issue.

I want to setup a local dns on raspberry pi so that regardless of Ip address I can easily reach all the pi's/devices by their domain names in the network, like pi1.home.com. Also, if it works, do I need to disable DHCP from my router. If is there any other option available to setup a dns, please point me to correct link/instructions.

Thanks

1

1 Answer 1

3

You haven't actually specified a range.

You should choose your own range end, but 50 could be a good start, e.g.

dhcp-range=192.168.1.5,192.168.1.50,48h

See https://wiki.debian.org/HowTo/dnsmasq

Regards, Geoff

1
  • @s-andrew, would you like to Select my Answer?
    – Geoff
    Commented Jul 21, 2020 at 6:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.