RFC 2136 dynamic dns bug and fix



  • 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



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


  • Rebel Alliance Developer Netgate

    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?



  • 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.



  • I submitted a bug report: Bug #1327



  • 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"


Locked