mirror of
https://github.com/pfsense/pfsense.git
synced 2025-10-26 11:38:35 +00:00
Add IPCOMP (IP Compression) support to IPSEC VPN's
This commit is contained in:
parent
6dfd800f50
commit
3da9a135d4
@ -1411,6 +1411,11 @@ EOD;
|
||||
$lan_subnet = $config['interfaces']['lan']['subnet'];
|
||||
$wan_ip = $config['interfaces']['wan']['ipaddr'];
|
||||
$internal_subnet = gen_subnet($lan_ip, $lan_subnet) . "/" . $config['interfaces']['lan']['subnet'];
|
||||
/* Is IP Compression enabled? */
|
||||
if(isset($config['ipsec']['ipcomp'])
|
||||
exec("/sbin/sysctl net.inet.ipcomp.ipcomp_enable=1");
|
||||
else
|
||||
exec("/sbin/sysctl net.inet.ipcomp.ipcomp_enable=0");
|
||||
if(is_array($config['ipsec']['tunnel'])) {
|
||||
foreach ($config['ipsec']['tunnel'] as $tunnel) {
|
||||
$remote_gateway = $tunnel['remote-gateway'];
|
||||
|
||||
@ -8,7 +8,7 @@
|
||||
originally part of m0n0wall (http://m0n0.ch/wall)
|
||||
Copyright (C) 2003-2004 Manuel Kasper <mk@neon1.net>.
|
||||
All rights reserved.
|
||||
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are met:
|
||||
|
||||
@ -41,6 +41,7 @@ $wancfg = &$config['interfaces']['wan'];
|
||||
|
||||
$pconfig['enable'] = isset($config['ipsec']['enable']);
|
||||
$pconfig['preferredoldsa'] = isset($config['ipsec']['preferredoldsa']);
|
||||
$pconfig['ipcomp'] = isset($config['ipsec']['ipcomp']);
|
||||
|
||||
if ($_POST) {
|
||||
|
||||
@ -58,6 +59,7 @@ if ($_POST) {
|
||||
|
||||
$config['ipsec']['enable'] = $_POST['enable'] ? true : false;
|
||||
$config['ipsec']['preferredoldsa'] = $_POST['preferredoldsa'] ? true : false;
|
||||
$config['ipsec']['ipcomp'] = $_POST['ipcomp'] ? true : false;
|
||||
|
||||
write_config();
|
||||
|
||||
@ -124,6 +126,11 @@ if ($_GET['act'] == "del") {
|
||||
<strong>Prefer newer SA's.<br>
|
||||
</strong></p>
|
||||
</td>
|
||||
<td class="vtable"><p><span class="vexpl"> </span>
|
||||
<input name="ipcomp" type="checkbox" id="ipcomp" value="yes" <?php if ($pconfig['ipcomp'] == "yes") echo "checked";?>>
|
||||
<strong>Enable VPN IP Compression<br>
|
||||
</strong></p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> <input name="submit" type="submit" class="formbtn" value="Save">
|
||||
|
||||
Loading…
Reference in New Issue
Block a user