summaryrefslogtreecommitdiffstats
path: root/etc
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2005-08-15 19:37:23 +0000
committerScott Ullrich <sullrich@pfsense.org>2005-08-15 19:37:23 +0000
commitbf27e41e96ed31bcb2a757366905f1962dd307b8 (patch)
treee76042a4953b2ae424e77114a71de40029304df0 /etc
parentf691bc2f0378818636de1f2261c8d8d45443a160 (diff)
downloadpfsense-bf27e41e96ed31bcb2a757366905f1962dd307b8.zip
pfsense-bf27e41e96ed31bcb2a757366905f1962dd307b8.tar.gz
Process dynamic dns entries correctly
Diffstat (limited to 'etc')
-rw-r--r--etc/inc/filter.inc5
1 files changed, 4 insertions, 1 deletions
diff --git a/etc/inc/filter.inc b/etc/inc/filter.inc
index e530115..fa807d1 100644
--- a/etc/inc/filter.inc
+++ b/etc/inc/filter.inc
@@ -2091,7 +2091,10 @@ EOD;
}
if(is_array($config['ipsec']['tunnel'])) {
foreach ($config['ipsec']['tunnel'] as $tunnel) {
- $remote_gateway = $tunnel['remote-gateway'];
+ /* is this a dynamic dns hostname? */
+ $remote_gateway = gethostbyname($tunnel['remote-gateway']);
+ if($remote_gateway == "")
+ $remote_gateway = $tunnel['remote-gateway'];
$local_subnet = return_vpn_subnet($tunnel['local-subnet']);
$ipfrules .= "pass quick on " . $wanif . " proto udp from " . $ipsec_ip . " to " . $remote_gateway . " port = 500 keep state label \"IPSEC: ". $tunnel['descr'] ." udp\"\n";
$ipfrules .= "pass quick on " . $wanif . " proto udp from " . $remote_gateway . " to " . $ipsec_ip . " port = 500 keep state label \"". $tunnel['descr'] ." udp\"\n";
OpenPOWER on IntegriCloud