diff --git a/etc/inc/ipsec.inc b/etc/inc/ipsec.inc index 48abf56079..a2bf219fd5 100644 --- a/etc/inc/ipsec.inc +++ b/etc/inc/ipsec.inc @@ -126,7 +126,7 @@ function ipsec_get_phase1_src(& $ph1ent) { if ($ph1ent['interface']) { if (!is_ipaddr($ph1ent['interface'])) { - $if = $ph1ent['interface']; + $if = get_failover_interface($ph1ent['interface']); if($ph1ent['protocol'] == "inet6") { $interfaceip = get_interface_ipv6($if); } else { diff --git a/usr/local/www/system_gateway_groups_edit.php b/usr/local/www/system_gateway_groups_edit.php index 85e6e9181d..9677edda8e 100755 --- a/usr/local/www/system_gateway_groups_edit.php +++ b/usr/local/www/system_gateway_groups_edit.php @@ -40,6 +40,8 @@ ##|-PRIV require("guiconfig.inc"); +require_once("ipsec.inc"); +require_once("vpn.inc"); if (!is_array($config['gateways']['gateway_group'])) $config['gateways']['gateway_group'] = array(); @@ -137,6 +139,9 @@ if ($_POST) { services_dnsupdate_process(); /* signal dyndns update */ services_dyndns_configure(); + /* update IPsec too */ + vpn_ipsec_refresh_policies(); + vpn_ipsec_configure(); write_config(); diff --git a/usr/local/www/vpn_ipsec.php b/usr/local/www/vpn_ipsec.php index 4864e6641a..c6d6be80ae 100755 --- a/usr/local/www/vpn_ipsec.php +++ b/usr/local/www/vpn_ipsec.php @@ -189,12 +189,23 @@ include("head.inc"); $carpip) $iflabels[$cif] = $carpip." (".get_vip_descr($carpip).")"; + $aliaslist = get_configured_ip_aliases_list(); foreach ($aliaslist as $aliasip => $aliasif) $iflabels[$aliasip] = $aliasip." (".get_vip_descr($aliasip).")"; + + $grouplist = return_gateway_groups_array(); + foreach ($grouplist as $name => $group) { + if($group[0]['vip'] <> "") + $vipif = $group[0]['vip']; + else + $vipif = $group[0]['int']; + $iflabels[$name] = "GW Group {$name}"; + } $if = htmlspecialchars($iflabels[$ph1ent['interface']]); } else diff --git a/usr/local/www/vpn_ipsec_phase1.php b/usr/local/www/vpn_ipsec_phase1.php index 83d1d620b3..ae62a477c7 100644 --- a/usr/local/www/vpn_ipsec_phase1.php +++ b/usr/local/www/vpn_ipsec_phase1.php @@ -540,12 +540,25 @@ function dpdchkbox_change() {