DHCP + Hostname + DDNS Problem



  • I had nothing found about this Topic.

    I have two client blackboard. Both send Client as hostname.
    I have configured 2 DHCP fixed entries with two different IPs.
    Both client use the fixed IPs, no Problem

    But the firewall send two DDNS update with Client to the nameserver with client.domain.com
    I need to overwrite the DDNS update with the Hostname configured in the DHCP setup.
    I had setup 2 fixed IP with 2 different Hostnames, but no success.

    Any ideas?
    Thanks

    Version used 2.3.3


  • Banned

    No. Either fix the hostnames on the clients, or stop doing dynamic DNS with such broken things and set up static IPs for them.



  • I found the option ddns-hostname for DHCP , would it work in pfsense ?


  • Banned

    Never tried, no idea. Not using any of these dynamic registrations since either the DNS/DHCP is Active Directory, or to avoid restarting Unbound over and over again.



  • It can be done, all you have to do is enter "deny client-updates" as a scope declaration in dhcpd.conf. Unfortunately pfsense doesn't expose this option in gui for the DHCPV4 server. What puzzles me is that option is present in gui  for the DHCPv6 server.

    Here is the description :

    "DDNS Client Updates -How Forward entries are handled when client indicates they wish to update DNS. Allow prevents DHCP from updating Forward entries, Deny indicates that DHCP will do the updates and the client should not, Ignore specifies that DHCP will do the update and the client can also attempt the update usually using a different domain name."



  • I had checked
    ddns-hostname would work, but there is no gui to add the parameter.
    And the dhcpd.conf is rewrite at every startup per gui.

    deny client-updates don´t work for me, but same problem like ddns-hostname and startup.

    It there a possibility to add custom data when dhcpd.conf is written and save the data in the conf.xml ?



  • I'm not sure about the custom data saved in the config.xml. My solution was to modify /etc/inc/services.inc as follows :

    /* write dhcpd.conf */
    if (!@file_put_contents("{$g['dhcpd_chroot_path']}/etc/dhcpd.conf.auto", $dhcpdconf)).

    After that at every boot pfsense rewrites dhcpd.conf.auto not dhcpd.conf. Manually modify dhcpd.conf as you wish, it should be persistent between reboots or service restarts.

    The above solution is a hack, i do not recommend using it for production systems and it could completely break your pfsense install.


Log in to reply