Project

General

Profile

Actions

Bug #1327

closed

RFC 2136 dynamic dns bug

Added by Isaac McDonald over 10 years ago. Updated over 10 years ago.

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

100%

Estimated time:
Plus Target Version:
Release Notes:
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

Actions #1

Updated by Jan Schneider over 10 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.

Actions #2

Updated by Isaac McDonald over 10 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.

Actions #3

Updated by Isaac McDonald over 10 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.

Actions #4

Updated by Ermal Luçi over 10 years ago

  • Status changed from New to Feedback
  • % Done changed from 0 to 100
Actions #5

Updated by Ermal Luçi over 10 years ago

Actions #6

Updated by Ermal Luçi over 10 years ago

  • Status changed from Feedback to Resolved
Actions

Also available in: Atom PDF