summaryrefslogtreecommitdiffstats
path: root/etc
diff options
context:
space:
mode:
authorjim-p <jimp@pfsense.org>2013-07-02 16:42:21 -0400
committerjim-p <jimp@pfsense.org>2013-07-02 16:58:30 -0400
commitc8369c5908a41aec26cae6b924dafb75f7f525df (patch)
treedf236c64f45a7ad24709ef05cf9db741c401941e /etc
parent6c38268e6ea0a2bbf2ad4ee627fd0b7a9a41efc6 (diff)
downloadpfsense-c8369c5908a41aec26cae6b924dafb75f7f525df.zip
pfsense-c8369c5908a41aec26cae6b924dafb75f7f525df.tar.gz
Add option to RFC2136 to find/use the public IP if the interface IP is private. (Off by default)
Diffstat (limited to 'etc')
-rw-r--r--etc/inc/services.inc3
1 files changed, 3 insertions, 0 deletions
diff --git a/etc/inc/services.inc b/etc/inc/services.inc
index 25fad4f..0a3ccad 100644
--- a/etc/inc/services.inc
+++ b/etc/inc/services.inc
@@ -2018,6 +2018,9 @@ EOD;
/* Update IPv4 if we have it. */
if (is_ipaddrv4($wanip)) {
if (($wanip != $cachedipv4) || (($currentTime - $cacheTimev4) > $maxCacheAgeSecs) || $forced) {
+ if (isset($dnsupdate['usepublicip'])) {
+ $wanip = dyndnsCheckIP($dnsupdate['interface']);
+ }
$upinst .= "update delete {$dnsupdate['host']}. A\n";
$upinst .= "update add {$dnsupdate['host']}. {$dnsupdate['ttl']} A {$wanip}\n";
$notify_text .= sprintf(gettext("DynDNS updated IP Address (A) for {$dnsupdate['host']} on %s (%s) to %s"), convert_real_interface_to_friendly_descr($if), $if, $wanip) . "\n";
OpenPOWER on IntegriCloud