Forums

Resolved
0 votes
In STFing, I only found one post that sort of asks this question but no answer was ever given as it was intertwined with a VPN issue. That post said to use another DHCP server but I can't imagine that the one ClearOS uses won't allow this. So...

I need a couple of my dynamic DHCP leases, (I.E. Alexa Echo), to use a specific DNS. Currently I am using pi-hole on my network as my DNS. Obviously I can assign that DNS IP in the DHCP setup/edit/config on the Web GUI, but there must be a way to edit a DHCP lease to tell that lease (via MAC maybe) to use a different DNS server.

Is this doable or do we need to abandon ClearOS's DHCP server and use something else?

Thanks!

John
Sunday, July 12 2020, 05:48 PM
Share this post:
Responses (4)
  • Accepted Answer

    Sunday, July 12 2020, 09:11 PM - #Permalink
    Resolved
    0 votes
    John Jarrett wrote:

    One last question... this is very doable! But in what file should I place this info:

    /etc.dnsmasq.d/dhcp.conf

    or elsewhere?
    Create your own. There is a line "conf-dir=/etc/dnsmasq.d" in /etc/dnsmasq.conf which calls up any file in /etc/dnsmasq.d.
    The reply is currently minimized Show
  • Accepted Answer

    Sunday, July 12 2020, 08:29 PM - #Permalink
    Resolved
    0 votes
    One last question... this is very doable! But in what file should I place this info:

    /etc.dnsmasq.d/dhcp.conf

    or elsewhere?

    I 'think' I need to add it under /etc/dnsmasq.d/ and can give the file any name like customdns.conf or similar. Is that true?

    I would add:

    dhcp-host=00:15:99:27:f8:98,set:specialhosts,192.168.1.232
    dhcp-host=00:51:99:72:8f:89,set:specialhosts,192.168.1.236
    dhcp-option=tag:specialhosts,option:dns-server,208.67.222.222,208.67.220.220

    ..and then restart the dhcp server service which is, I believe, dnsmasq. Is that correct?

    John
    The reply is currently minimized Show
  • Accepted Answer

    Sunday, July 12 2020, 08:19 PM - #Permalink
    Resolved
    0 votes
    Hi Nick,

    It's a separate DNS server that I am pointing my clients to. I wish I was knowledgeable enough to get it integrated into ClearOS but I am not. Certainly wish such or similar could be added to ClearOS in an upcoming version!!

    I'll check out the link as that might be in my wheelhouse and be able to do...

    John

    PS. Nick, how do I buy you a beer??? (Or similar)?
    The reply is currently minimized Show
  • Accepted Answer

    Sunday, July 12 2020, 06:49 PM - #Permalink
    Resolved
    0 votes
    How are you using Pi-Hole? A separate DNS server or installed in ClearOS. If it is a separate server and you use ClearOS for DHCP then it looks like you need a custom config - https://serverfault.com/questions/509388/per-client-dns-servers-with-dnsmasq. If you do this, put it in a separate file in /etc/dnsmasq.d/.
    The reply is currently minimized Show
Your Reply