Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
O
OpnSense
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kulya
OpnSense
Commits
b07c29ad
Commit
b07c29ad
authored
Sep 03, 2015
by
Ad Schellevis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(legacy) whitespace vpn_ipsec_settings.php
parent
2f4bbf45
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
78 additions
and
78 deletions
+78
-78
vpn_ipsec_settings.php
src/www/vpn_ipsec_settings.php
+78
-78
No files found.
src/www/vpn_ipsec_settings.php
View file @
b07c29ad
<?php
<?php
/*
/*
Copyright (C) 2014-2015 Deciso B.V.
Copyright (C) 2014-2015 Deciso B.V.
Copyright (C) 2014 Electric Sheep Fencing, LLC
Copyright (C) 2014 Electric Sheep Fencing, LLC
All rights reserved.
All rights reserved.
Redistribution and use in source and binary forms, with or without
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice,
1. Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
documentation and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
POSSIBILITY OF SUCH DAMAGE.
*/
*/
require_once
(
"guiconfig.inc"
);
require_once
(
"guiconfig.inc"
);
...
@@ -35,7 +35,7 @@ require_once("pfsense-utils.inc");
...
@@ -35,7 +35,7 @@ require_once("pfsense-utils.inc");
require_once
(
"interfaces.inc"
);
require_once
(
"interfaces.inc"
);
if
(
!
isset
(
$config
[
'ipsec'
])
||
!
is_array
(
$config
[
'ipsec'
]))
{
if
(
!
isset
(
$config
[
'ipsec'
])
||
!
is_array
(
$config
[
'ipsec'
]))
{
$config
[
'ipsec'
]
=
array
();
$config
[
'ipsec'
]
=
array
();
}
}
if
(
$_SERVER
[
'REQUEST_METHOD'
]
===
'GET'
)
{
if
(
$_SERVER
[
'REQUEST_METHOD'
]
===
'GET'
)
{
...
@@ -59,7 +59,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'GET') {
...
@@ -59,7 +59,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'GET') {
if
(
isset
(
$pconfig
[
'noinstalllanspd'
])
&&
$pconfig
[
'noinstalllanspd'
]
==
"yes"
)
{
if
(
isset
(
$pconfig
[
'noinstalllanspd'
])
&&
$pconfig
[
'noinstalllanspd'
]
==
"yes"
)
{
$config
[
'system'
][
'noinstalllanspd'
]
=
true
;
$config
[
'system'
][
'noinstalllanspd'
]
=
true
;
}
elseif
(
isset
(
$config
[
'system'
][
'noinstalllanspd'
]))
{
}
elseif
(
isset
(
$config
[
'system'
][
'noinstalllanspd'
]))
{
unset
(
$config
[
'system'
][
'noinstalllanspd'
]);
unset
(
$config
[
'system'
][
'noinstalllanspd'
]);
}
}
if
(
isset
(
$pconfig
[
'preferoldsa_enable'
])
&&
$pconfig
[
'preferoldsa_enable'
]
==
"yes"
)
{
if
(
isset
(
$pconfig
[
'preferoldsa_enable'
])
&&
$pconfig
[
'preferoldsa_enable'
]
==
"yes"
)
{
$config
[
'ipsec'
][
'preferoldsa'
]
=
true
;
$config
[
'ipsec'
][
'preferoldsa'
]
=
true
;
...
@@ -123,7 +123,7 @@ $( document ).ready(function() {
...
@@ -123,7 +123,7 @@ $( document ).ready(function() {
});
});
function
maxmss_checked
(
obj
)
{
function
maxmss_checked
(
obj
)
{
if
(
$
(
'
#maxmss_enable
'
).
is
(
"
:checked
"
))
{
if
(
$
(
'
#maxmss_enable
'
).
is
(
"
:checked
"
))
{
$
(
'
#maxmss
'
).
attr
(
'
disabled
'
,
false
);
$
(
'
#maxmss
'
).
attr
(
'
disabled
'
,
false
);
$
(
"
#maxmss
"
).
addClass
(
'
show
'
);
$
(
"
#maxmss
"
).
addClass
(
'
show
'
);
$
(
"
#maxmss
"
).
removeClass
(
'
hidden
'
);
$
(
"
#maxmss
"
).
removeClass
(
'
hidden
'
);
...
@@ -137,9 +137,9 @@ function maxmss_checked(obj) {
...
@@ -137,9 +137,9 @@ function maxmss_checked(obj) {
//]]>
//]]>
</script>
</script>
<section
class=
"page-content-main"
>
<section
class=
"page-content-main"
>
<div
class=
"container-fluid"
>
<div
class=
"container-fluid"
>
<div
class=
"row"
>
<div
class=
"row"
>
<?php
<?php
if
(
isset
(
$savemsg
))
{
if
(
isset
(
$savemsg
))
{
...
@@ -150,22 +150,22 @@ function maxmss_checked(obj) {
...
@@ -150,22 +150,22 @@ function maxmss_checked(obj) {
}
}
?>
?>
<section
class=
"col-xs-12"
>
<section
class=
"col-xs-12"
>
<?
$active_tab
=
"/vpn_ipsec_settings.php"
;
<?
$active_tab
=
"/vpn_ipsec_settings.php"
;
include
(
'vpn_ipsec_tabs.inc'
);
?>
include
(
'vpn_ipsec_tabs.inc'
);
?>
<div
class=
"tab-content content-box col-xs-12"
>
<div
class=
"tab-content content-box col-xs-12"
>
<form
action=
"vpn_ipsec_settings.php"
method=
"post"
name=
"iform"
id=
"iform"
>
<form
action=
"vpn_ipsec_settings.php"
method=
"post"
name=
"iform"
id=
"iform"
>
<div
class=
"table-responsive"
>
<div
class=
"table-responsive"
>
<table
class=
"table table-striped"
>
<table
class=
"table table-striped"
>
<tr>
<tr>
<td
><strong>
<?=
gettext
(
"IPSec Advanced Settings"
);
?>
</strong></td>
<td
><strong>
<?=
gettext
(
"IPSec Advanced Settings"
);
?>
</strong></td>
<td
align=
"right"
>
<td
align=
"right"
>
<small>
<?=
gettext
(
"full help"
);
?>
</small>
<small>
<?=
gettext
(
"full help"
);
?>
</small>
<i
class=
"fa fa-toggle-off text-danger"
style=
"cursor: pointer;"
id=
"show_all_help_page"
type=
"button"
></i></a>
<i
class=
"fa fa-toggle-off text-danger"
style=
"cursor: pointer;"
id=
"show_all_help_page"
type=
"button"
></i></a>
</td>
</td>
</tr>
</tr>
<tr>
<tr>
<td><a
id=
"help_for_noinstalllanspd"
href=
"#"
class=
"showhelp"
><i
class=
"fa fa-info-circle"
></i></a>
<?=
gettext
(
"LAN security associsations"
);
?>
</td>
<td><a
id=
"help_for_noinstalllanspd"
href=
"#"
class=
"showhelp"
><i
class=
"fa fa-info-circle"
></i></a>
<?=
gettext
(
"LAN security associsations"
);
?>
</td>
<td>
<td>
<input
name=
"noinstalllanspd"
type=
"checkbox"
id=
"noinstalllanspd"
value=
"yes"
<?=
!
empty
(
$pconfig
[
'noinstalllanspd'
])
?
"checked=
\"
checked
\"
"
:
""
;
?>
/>
<input
name=
"noinstalllanspd"
type=
"checkbox"
id=
"noinstalllanspd"
value=
"yes"
<?=
!
empty
(
$pconfig
[
'noinstalllanspd'
])
?
"checked=
\"
checked
\"
"
:
""
;
?>
/>
<strong>
<?=
gettext
(
"Do not install LAN SPD"
);
?>
</strong>
<strong>
<?=
gettext
(
"Do not install LAN SPD"
);
?>
</strong>
<div
class=
"hidden"
for=
"help_for_noinstalllanspd"
>
<div
class=
"hidden"
for=
"help_for_noinstalllanspd"
>
...
@@ -173,10 +173,10 @@ function maxmss_checked(obj) {
...
@@ -173,10 +173,10 @@ function maxmss_checked(obj) {
"This behaviour can be changed by enabling this setting which will prevent installing these SPDs."
);
?>
"This behaviour can be changed by enabling this setting which will prevent installing these SPDs."
);
?>
</div>
</div>
</td>
</td>
</tr>
</tr>
<tr>
<tr>
<td><a
id=
"help_for_preferoldsa_enable"
href=
"#"
class=
"showhelp"
><i
class=
"fa fa-info-circle"
></i></a>
<?=
gettext
(
"Security Associations"
);
?>
</td>
<td><a
id=
"help_for_preferoldsa_enable"
href=
"#"
class=
"showhelp"
><i
class=
"fa fa-info-circle"
></i></a>
<?=
gettext
(
"Security Associations"
);
?>
</td>
<td
width=
"78%"
class=
"vtable"
>
<td
width=
"78%"
class=
"vtable"
>
<input
name=
"preferoldsa_enable"
type=
"checkbox"
id=
"preferoldsa_enable"
value=
"yes"
<?=
!
empty
(
$pconfig
[
'preferoldsa_enable'
])
?
"checked=
\"
checked
\"
"
:
""
;
?>
/>
<input
name=
"preferoldsa_enable"
type=
"checkbox"
id=
"preferoldsa_enable"
value=
"yes"
<?=
!
empty
(
$pconfig
[
'preferoldsa_enable'
])
?
"checked=
\"
checked
\"
"
:
""
;
?>
/>
<strong>
<?=
gettext
(
"Prefer older IPsec SAs"
);
?>
</strong>
<strong>
<?=
gettext
(
"Prefer older IPsec SAs"
);
?>
</strong>
<div
class=
"hidden"
for=
"help_for_preferoldsa_enable"
>
<div
class=
"hidden"
for=
"help_for_preferoldsa_enable"
>
...
@@ -184,13 +184,13 @@ function maxmss_checked(obj) {
...
@@ -184,13 +184,13 @@ function maxmss_checked(obj) {
"preferred if it's at least 30 seconds old. Select this "
.
"preferred if it's at least 30 seconds old. Select this "
.
"option to always prefer old SAs over new ones."
);
?>
"option to always prefer old SAs over new ones."
);
?>
</div>
</div>
</td>
</td>
</tr>
</tr>
<tr>
<tr>
<td><a
id=
"help_for_ipsec_debug"
href=
"#"
class=
"showhelp"
><i
class=
"fa fa-info-circle"
></i></a>
<?=
gettext
(
"IPsec Debug"
);
?>
</td>
<td><a
id=
"help_for_ipsec_debug"
href=
"#"
class=
"showhelp"
><i
class=
"fa fa-info-circle"
></i></a>
<?=
gettext
(
"IPsec Debug"
);
?>
</td>
<td>
<td>
<div
class=
"hidden"
for=
"help_for_ipsec_debug"
>
<div
class=
"hidden"
for=
"help_for_ipsec_debug"
>
<strong>
<?=
gettext
(
"Start IPSec in debug mode based on sections selected"
);
?>
</strong>
<br/>
<strong>
<?=
gettext
(
"Start IPSec in debug mode based on sections selected"
);
?>
</strong>
<br/>
</div>
</div>
<?php
foreach
(
$ipsec_loglevels
as
$lkey
=>
$ldescr
)
:
<?php
foreach
(
$ipsec_loglevels
as
$lkey
=>
$ldescr
)
:
?>
?>
...
@@ -203,18 +203,18 @@ function maxmss_checked(obj) {
...
@@ -203,18 +203,18 @@ function maxmss_checked(obj) {
</option>
</option>
<?php
<?php
endforeach
;
?>
endforeach
;
?>
</select>
</select>
<?php
<?php
endforeach
;
?>
endforeach
;
?>
<div
class=
"hidden"
for=
"help_for_ipsec_debug"
>
<div
class=
"hidden"
for=
"help_for_ipsec_debug"
>
<?=
gettext
(
"Launches IPSec in debug mode so that more verbose logs "
.
<?=
gettext
(
"Launches IPSec in debug mode so that more verbose logs "
.
"will be generated to aid in troubleshooting."
);
?>
"will be generated to aid in troubleshooting."
);
?>
</div>
</div>
</td>
</td>
</tr>
</tr>
<tr>
<tr>
<td><a
id=
"help_for_failoverforcereloadg"
href=
"#"
class=
"showhelp"
><i
class=
"fa fa-info-circle"
></i></a>
<?=
gettext
(
"IPsec Reload on Failover"
);
?>
</td>
<td><a
id=
"help_for_failoverforcereloadg"
href=
"#"
class=
"showhelp"
><i
class=
"fa fa-info-circle"
></i></a>
<?=
gettext
(
"IPsec Reload on Failover"
);
?>
</td>
<td>
<td>
<input
name=
"failoverforcereload"
type=
"checkbox"
id=
"failoverforcereload"
value=
"yes"
<?=
!
empty
(
$pconfig
[
'failoverforcereload'
])
?
"checked=
\"
checked
\"
"
:
""
;
?>
/>
<input
name=
"failoverforcereload"
type=
"checkbox"
id=
"failoverforcereload"
value=
"yes"
<?=
!
empty
(
$pconfig
[
'failoverforcereload'
])
?
"checked=
\"
checked
\"
"
:
""
;
?>
/>
<strong>
<?=
gettext
(
"Force IPsec Reload on Failover"
);
?>
</strong>
<strong>
<?=
gettext
(
"Force IPsec Reload on Failover"
);
?>
</strong>
<div
class=
"hidden"
for=
"help_for_failoverforcereloadg"
>
<div
class=
"hidden"
for=
"help_for_failoverforcereloadg"
>
...
@@ -223,32 +223,32 @@ function maxmss_checked(obj) {
...
@@ -223,32 +223,32 @@ function maxmss_checked(obj) {
"when a failover occurs. Because this will disrupt all IPsec tunnels, this behavior"
.
"when a failover occurs. Because this will disrupt all IPsec tunnels, this behavior"
.
" is disabled by default. Check this box to force IPsec to fully reload on failover."
);
?>
" is disabled by default. Check this box to force IPsec to fully reload on failover."
);
?>
</div>
</div>
</td>
</td>
</tr>
</tr>
<tr>
<tr>
<td><a
id=
"help_for_maxmss_enable"
href=
"#"
class=
"showhelp"
><i
class=
"fa fa-info-circle"
></i></a>
<?=
gettext
(
"Maximum MSS"
);
?>
</td>
<td><a
id=
"help_for_maxmss_enable"
href=
"#"
class=
"showhelp"
><i
class=
"fa fa-info-circle"
></i></a>
<?=
gettext
(
"Maximum MSS"
);
?>
</td>
<td>
<td>
<input
name=
"maxmss_enable"
type=
"checkbox"
id=
"maxmss_enable"
value=
"yes"
<?=
!
empty
(
$pconfig
[
'maxmss_enable'
])
?
"checked=
\"
checked
\"
"
:
""
;
?>
onclick=
"maxmss_checked()"
/>
<input
name=
"maxmss_enable"
type=
"checkbox"
id=
"maxmss_enable"
value=
"yes"
<?=
!
empty
(
$pconfig
[
'maxmss_enable'
])
?
"checked=
\"
checked
\"
"
:
""
;
?>
onclick=
"maxmss_checked()"
/>
<strong>
<?=
gettext
(
"Enable MSS clamping on VPN traffic"
);
?>
</strong>
<strong>
<?=
gettext
(
"Enable MSS clamping on VPN traffic"
);
?>
</strong>
<input
name=
"maxmss"
id=
"maxmss"
type=
"text"
value=
"
<?=
!
empty
(
$pconfig
[
'maxmss'
])
?
$pconfig
[
'maxmss'
]
:
"1400"
;
?>
"
<?=
!
empty
(
$pconfig
[
'maxmss_enable'
])
?
"disabled=
\"
disabled
\"
"
:
""
;
?>
/>
<input
name=
"maxmss"
id=
"maxmss"
type=
"text"
value=
"
<?=
!
empty
(
$pconfig
[
'maxmss'
])
?
$pconfig
[
'maxmss'
]
:
"1400"
;
?>
"
<?=
!
empty
(
$pconfig
[
'maxmss_enable'
])
?
"disabled=
\"
disabled
\"
"
:
""
;
?>
/>
<div
class=
"hidden"
for=
"help_for_maxmss_enable"
>
<div
class=
"hidden"
for=
"help_for_maxmss_enable"
>
<?=
gettext
(
"Enable MSS clamping on TCP flows over VPN. "
.
<?=
gettext
(
"Enable MSS clamping on TCP flows over VPN. "
.
"This helps overcome problems with PMTUD on IPsec VPN links. If left blank, the default value is 1400 bytes. "
);
?>
"This helps overcome problems with PMTUD on IPsec VPN links. If left blank, the default value is 1400 bytes. "
);
?>
</div>
</div>
</td>
</td>
</tr>
</tr>
<tr>
<tr>
<td>
</td>
<td>
</td>
<td>
<td>
<input
name=
"submit"
type=
"submit"
class=
"btn btn-primary"
value=
"
<?=
gettext
(
"Save"
);
?>
"
/>
<input
name=
"submit"
type=
"submit"
class=
"btn btn-primary"
value=
"
<?=
gettext
(
"Save"
);
?>
"
/>
</td>
</td>
</tr>
</tr>
</table>
</table>
</div>
</div>
</form>
</form>
</div>
</div>
</section>
</section>
</div>
</div>
</div>
</div>
</section>
</section>
<?php
include
(
"foot.inc"
);
<?php
include
(
"foot.inc"
);
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment