Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    RFC 2136 dynamic dns bug and fix

    Scheduled Pinned Locked Moved 2.0-RC Snapshot Feedback and Problems - RETIRED
    6 Posts 3 Posters 3.0k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • imcdonaI Offline
      imcdona
      last edited by

      RFC 2136 dynamic DNS updates do not work in RC1. I did some searching and found the solution http://www.docunext.com/wiki/PfSense#TSIG_DNS_Updates.

      The GUI is missing a field for a domain name. The solution is to modify the /etc/inc/services.inc file to include your domain name and add a few extra lines.

      /* generate update instructions */
      $upinst = "";
      if (!empty($dnsupdate['server']))
      $upinst .= "server {$dnsupdate['server']}\n";
      $upinst .= "zone example.com\n";
      $upinst .= "key {$dnsupdate['keyname']} {$dnsupdate['keydata']}\n";
      $upinst .= "update add {$dnsupdate['host']} {$dnsupdate['ttl']} A {$wanip}\n";
      $upinst .= "send\n";
      $upinst .= "\n";        /* mind that trailing newline! */
      
      $fd = fopen("{$g['varetc_path']}/nsupdatecmds{$i}", "w");
      fwrite($fd, $upinst);
      fclose($fd);
      

      The unmodified version of /etc/inc/services.inc looks like this:

      /* generate update instructions */
      $upinst = "";
      if (!empty($dnsupdate['server']))
      $upinst .= "server {$dnsupdate['server']}\n";
      $upinst .= "update delete {$dnsupdate['host']} A\n";
      $upinst .= "update add {$dnsupdate['host']} {$dnsupdate['ttl']} A {$wanip}\n";
      $upinst .= "\n";	/* mind that trailing newline! */
      $fd = fopen("{$g['varetc_path']}/nsupdatecmds{$i}", "w");
      fwrite($fd, $upinst);
      fclose($fd);
      
      

      The "update delete" line is not needed to update an existing A record.

      The syntax I am using can be found here:

      https://www.dyndns.com/support/kb/ddns_updates_and_tsig.html

      1 Reply Last reply Reply Quote 0
      • imcdonaI Offline
        imcdona
        last edited by

        How do I go about opening a bug report on this?

        1 Reply Last reply Reply Quote 0
        • jimpJ Offline
          jimp Rebel Alliance Developer Netgate
          last edited by

          Login to
          http://redmine.pfsense.org/ and open a ticket there. A patch made with diff -ub between the original file and the modified file would help.

          We'll really need more people with RFC2136 setup to confirm that this isn't working for them, as what you are seeing could be a configuration issue as well. It may be that the code needs fixed to offer your way as an option, but offer the current method as well.

          Did you ever try the RFC2136 updates on pfSense 1.2.3? Did it work there?

          Remember: Upvote with the 👍 button for any user/post you find to be helpful, informative, or deserving of recognition!

          Need help fast? Netgate Global Support!

          Do not Chat/PM for help!

          1 Reply Last reply Reply Quote 0
          • T Offline
            timberwolf
            last edited by

            Just found this thread.
            Just to confirm this report:

            1.) "zone" indeed is a required field in an update.
            2.) delete isn't required
            3.) key names ending on a dot are correct, the gui however declines those

            @imcdona
            You didn't open a bug report by now, did you?
            I can confirm this bug, bur I am for now not involved in pfsense development.

            1 Reply Last reply Reply Quote 0
            • imcdonaI Offline
              imcdona
              last edited by

              I submitted a bug report: Bug #1327

              1 Reply Last reply Reply Quote 0
              • imcdonaI Offline
                imcdona
                last edited by

                I got RFC 2136 updates to work by putting in the complete FQDN of the hostname to be updated in the "host" field. I updated the ticket requesting a change to the GUI. The field SHOULD read, "fully qualified hostname to be updated"

                1 Reply Last reply Reply Quote 0
                • First post
                  Last post
                Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.