summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPiBa-NL <pba_2k3@yahoo.com>2012-11-18 00:37:12 +0100
committerPiBa-NL <pba_2k3@yahoo.com>2012-11-18 14:22:27 +0100
commita269fed636cd7ec4820744477f844bf581a389cc (patch)
treeb69e7540cecd6a53ee8e890eab165f7fa0b0da73
parentb4227df690fb7a989ead9b3928ebaaaa34b495eb (diff)
downloadpfsense-a269fed636cd7ec4820744477f844bf581a389cc.zip
pfsense-a269fed636cd7ec4820744477f844bf581a389cc.tar.gz
ipsec binat rule not possible if using a subnet together with a single ip so use nat
-rw-r--r--etc/inc/filter.inc6
1 files changed, 5 insertions, 1 deletions
diff --git a/etc/inc/filter.inc b/etc/inc/filter.inc
index 2555bb6..df6cb9c 100644
--- a/etc/inc/filter.inc
+++ b/etc/inc/filter.inc
@@ -1444,7 +1444,11 @@ function filter_nat_rules_generate() {
continue;
if ($remote_subnet == "0.0.0.0/0")
$remote_subnet = "any";
- $natrules .= "binat on enc0 from {$local_subnet} to {$remote_subnet} -> {$natlocal_subnet}\n";
+ if (is_ipaddr($natlocal_subnet) && !is_ipaddr($local_subnet) )
+ $nattype = "nat";
+ else
+ $nattype = "binat";
+ $natrules .= "{$nattype} on enc0 from {$local_subnet} to {$remote_subnet} -> {$natlocal_subnet}\n";
}
}
}
OpenPOWER on IntegriCloud