mirror of
https://github.com/pfsense/pfsense.git
synced 2025-10-26 11:38:35 +00:00
Merge remote branch 'mainline/master'
This commit is contained in:
commit
a94ee3fa30
@ -60,8 +60,8 @@ function setup_gateways_monitor() {
|
||||
# pfSense apinger configuration file. Automatically Generated!
|
||||
|
||||
## User and group the pinger should run as
|
||||
user "nobody"
|
||||
group "nobody"
|
||||
user "root"
|
||||
group "wheel"
|
||||
|
||||
## Mailer to use (default: "/usr/lib/sendmail -t")
|
||||
#mailer "/var/qmail/bin/qmail-inject"
|
||||
|
||||
@ -158,7 +158,9 @@ include("head.inc");
|
||||
<tr>
|
||||
<td colspan="4">
|
||||
<p><span class="vexpl"><span class="red"><strong>Note:<br>
|
||||
</strong></span>Depending on the way your WAN connection is setup, you may also need a <a href="firewall_virtual_ip.php">Virtual IP</a>.</span></p>
|
||||
</strong></span>Depending on the way your WAN connection is setup, you may also need a <a href="firewall_virtual_ip.php">Virtual IP</a>.<br/>
|
||||
If you add a 1:1 NAT entry for any of the interface IPs on this system, it will make this system inaccessible on that IP address. i.e. if
|
||||
you use your WAN IP address, any services on this system (IPsec, OpenVPN server, etc.) using the WAN IP address will no longer function.</span></p>
|
||||
</td>
|
||||
<tr>
|
||||
</table>
|
||||
|
||||
@ -100,12 +100,6 @@ if ($_POST) {
|
||||
$input_errors[] = "A valid internal subnet must be specified.";
|
||||
}
|
||||
|
||||
if (is_ipaddr($config['interfaces']['wan']['ipaddr'])) {
|
||||
if (check_subnets_overlap($_POST['external'], $_POST['subnet'],
|
||||
get_interface_ip("wan"), 32))
|
||||
$input_errors[] = "The WAN IP address may not be used in a 1:1 rule.";
|
||||
}
|
||||
|
||||
/* check for overlaps with other 1:1 */
|
||||
foreach ($a_1to1 as $natent) {
|
||||
if (isset($id) && ($a_1to1[$id]) && ($a_1to1[$id] === $natent))
|
||||
@ -120,17 +114,6 @@ if ($_POST) {
|
||||
}
|
||||
}
|
||||
|
||||
/* check for overlaps with advanced outbound NAT */
|
||||
if (is_array($config['nat']['advancedoutbound']['rule'])) {
|
||||
foreach ($config['nat']['advancedoutbound']['rule'] as $natent) {
|
||||
if ($natent['target'] &&
|
||||
check_subnets_overlap($_POST['external'], $_POST['subnet'], $natent['target'], 32)) {
|
||||
$input_errors[] = "An advanced outbound NAT entry overlaps with the specified external subnet.";
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!$input_errors) {
|
||||
$natent = array();
|
||||
|
||||
|
||||
@ -169,18 +169,6 @@ if ($_POST) {
|
||||
$ext = gen_subnet($_POST['destination'], $_POST['destination_subnet']) . "/" . $_POST['destination_subnet'];
|
||||
}
|
||||
|
||||
if ($_POST['target']) {
|
||||
/* check for clashes with 1:1 NAT (NAT Addresses is OK) */
|
||||
if (is_array($config['nat']['onetoone'])) {
|
||||
foreach ($config['nat']['onetoone'] as $natent) {
|
||||
if (check_subnets_overlap($_POST['target'], 32, $natent['external'], $natent['subnet'])) {
|
||||
$input_errors[] = "A 1:1 NAT mapping overlaps with the specified target IP address.";
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
foreach ($a_out as $natent) {
|
||||
if (isset($id) && ($a_out[$id]) && ($a_out[$id] === $natent)) {
|
||||
continue;
|
||||
|
||||
@ -327,7 +327,7 @@ echo "<script type=\"text/javascript\" language=\"javascript\" src=\"/javascript
|
||||
<table border="0" cellspacing="0" cellpadding="1">
|
||||
<tr>
|
||||
<td><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_left_d.gif" width="17" height="17" title="move selected rules before this rule"></td>
|
||||
<td><a href="interfaces.php#rfc1918"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_e.gif" title="edit rule" width="17" height="17" border="0"></a></td>
|
||||
<td><a href="interfaces.php?if=<?=$if?>#rfc1918"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_e.gif" title="edit rule" width="17" height="17" border="0"></a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center" valign="middle"></td>
|
||||
@ -355,7 +355,7 @@ echo "<script type=\"text/javascript\" language=\"javascript\" src=\"/javascript
|
||||
<table border="0" cellspacing="0" cellpadding="1">
|
||||
<tr>
|
||||
<td><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_left_d.gif" width="17" height="17" title="move selected rules before this rule"></td>
|
||||
<td><a href="interfaces.php#rfc1918"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_e.gif" title="edit rule" width="17" height="17" border="0"></a></td>
|
||||
<td><a href="interfaces.php?if=<?=$if?>#rfc1918"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_e.gif" title="edit rule" width="17" height="17" border="0"></a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center" valign="middle"></td>
|
||||
|
||||
@ -127,16 +127,6 @@ if ($_POST) {
|
||||
}
|
||||
}
|
||||
|
||||
/* check for overlaps with 1:1 NAT */
|
||||
if (is_array($config['nat']['onetoone'])) {
|
||||
foreach ($config['nat']['onetoone'] as $natent) {
|
||||
if (check_subnets_overlap($_POST['subnet'], 32, $natent['external'], $natent['subnet'])) {
|
||||
$input_errors[] = "A 1:1 NAT mapping overlaps with the specified IP address.";
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* make sure new ip is within the subnet of a valid ip
|
||||
* on one of our interfaces (wan, lan optX)
|
||||
*/
|
||||
|
||||
Loading…
Reference in New Issue
Block a user