Project

General

Profile

Actions

Bug #1327

closed

RFC 2136 dynamic dns bug

Added by Isaac McDonald about 13 years ago. Updated almost 13 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

Also available in: Atom PDF