Project

General

Profile

Bug #1327

RFC 2136 dynamic dns bug

Added by Isaac McDonald over 8 years ago. Updated about 8 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
-
Category:
Dynamic DNS
Target version:
Start date:
03/06/2011
Due date:
% Done:

100%

Estimated time:
Affected Version:
2.0
Affected Architecture:

Description

Per this forum post: http://forum.pfsense.org/index.php/topic,33824.0/topicseen.html I am submitting a bug report:

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.

Code:
/* 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);

end code:

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

code:

/* 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);

end code:

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

Associated revisions

Revision b9eccc77 (diff)
Added by Ermal Luçi about 8 years ago

Fixes #1327. Put description that a full qualified hostname is required.

Revision 5ebe85e9 (diff)
Added by Ermal Luçi about 8 years ago

Fixes #1327. Trigger synching of vouchers to config through check_reload_status. Retire the saveinterval option since it is not useful anymore. Use the prune process of captiveportal to sync vouchers as well to fix issues as reported-by: http://forum.pfsense.org/index.php/topic,37636.0.html

History

#1 Updated by Jan Schneider over 8 years ago

I can confirm this bug, the zone information mus be supplied, otherwise the request won't be accepted by RFC2136 compliant DNS systems.

$upinst .= "zone example.com.\n";
In this example, the zone should be "example.com." note the dot at the end.
This needs to be configurable in the GUI.

$upinst .= "update delete {$dnsupdate['host']} A\n";
A delete isn't necessary, but doesn't do any harm.

Also the gui declines the use of usernames ending on a dot, this however is the correct and required notation of usernames and records in an update request.

Both need to be fixed in order to produce valid update requests.

#2 Updated by Isaac McDonald over 8 years ago

I was able to get updates to work by putting the complete FQDN into the hostname portion. ex. host.example.com rather that just "host". The gui needs to be updated to reflect this requirement.

#3 Updated by Isaac McDonald over 8 years ago

To further clarify, please update "host" field of the GUI for RFC 2136 updates to read "Fully qualified hostname of the host to be updated" or something to that effect.

#4 Updated by Ermal Luçi about 8 years ago

  • Status changed from New to Feedback
  • % Done changed from 0 to 100

#5 Updated by Ermal Luçi about 8 years ago

#6 Updated by Ermal Luçi about 8 years ago

  • Status changed from Feedback to Resolved

Also available in: Atom PDF