@@ -2734,22 +2914,6 @@ EOF
my @status = `/usr/local/bin/ipsecctrl I 2>/dev/null`;
- # suggest a default name for this side
- if ($cgiparams{'VPN_IP'} eq '' && -e "${General::swroot}/red/active") {
- if (open(IPADDR, "${General::swroot}/red/local-ipaddress")) {
- my $ipaddr = ;
- close IPADDR;
- chomp ($ipaddr);
- $cgiparams{'VPN_IP'} = (gethostbyaddr(pack("C4", split(/\./, $ipaddr)), 2))[0];
- if ($cgiparams{'VPN_IP'} eq '') {
- $cgiparams{'VPN_IP'} = $ipaddr;
- }
- }
- }
- # no IP found, use %defaultroute
- $cgiparams{'VPN_IP'} ='%defaultroute' if ($cgiparams{'VPN_IP'} eq '');
-
- $cgiparams{'VPN_DELAYED_START'} = 0 if (! defined ($cgiparams{'VPN_DELAYED_START'}));
$checked{'ENABLED'} = $cgiparams{'ENABLED'} eq 'on' ? "checked='checked'" : '';
&Header::showhttpheaders();
@@ -2777,35 +2941,21 @@ EOF
print <
-
-
$Lang::tr{'vpn red name'}:
-
-
$Lang::tr{'enabled'}
-
-END
-;
-print <
-
$Lang::tr{'vpn delayed start'}:
-
-
-
-
$Lang::tr{'host to net vpn'}:
-
-
-
-
-
-
-
-
-
$Lang::tr{'required field'}
-
-
-
-
$Lang::tr{'vpn delayed start help'}
-
-
+
+
+ $Lang::tr{'enabled'}
+
+
+
+
+
+
+
$Lang::tr{'host to net vpn'}:
+
+
+
+
+
END
;
@@ -2848,8 +2998,11 @@ END
}
print "
$confighash{$key}[25]
";
my $col1="bgcolor='${Header::colourred}'";
- # get real state
my $active = "$Lang::tr{'capsclosed'}";
+ if ($confighash{$key}[33] eq "add") {
+ $col1="bgcolor='${Header::colourorange}'";
+ $active = "$Lang::tr{'vpn wait'}";
+ }
foreach my $line (@status) {
if (($line =~ /\"$confighash{$key}[1]\".*IPsec SA established/) ||
($line =~ /$confighash{$key}[1]\{.*INSTALLED/)) {
@@ -3204,13 +3357,19 @@ sub make_algos($$$$$) {
return &array_unique(\@algos);
}
-sub make_subnets($) {
+sub make_subnets($$) {
+ my $direction = shift;
my $subnets = shift;
my @nets = split(/\|/, $subnets);
my @cidr_nets = ();
foreach my $net (@nets) {
my $cidr_net = &General::ipcidr($net);
+
+ # Skip 0.0.0.0/0 for remote because this renders the
+ # while system inaccessible
+ next if (($direction eq "right") && ($cidr_net eq "0.0.0.0/0"));
+
push(@cidr_nets, $cidr_net);
}