mirror of
https://github.com/vincentmli/bpfire.git
synced 2026-04-26 10:52:57 +02:00
Merge branch 'fifteen' of ssh://git.ipfire.org/pub/git/ipfire-2.x into fifteen
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
$subservices->{'10.ipsec'} = {
|
||||
'caption' => 'IPSec',
|
||||
'caption' => $Lang::tr{'ipsec'},
|
||||
'uri' => '/cgi-bin/vpnmain.cgi',
|
||||
'title' => "$Lang::tr{'virtual private networking'}",
|
||||
'enabled' => 1,
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
'enabled' => 1,
|
||||
};
|
||||
$subfirewall->{'40.p2p'} = {
|
||||
'caption' => 'P2P-Block',
|
||||
'caption' => $Lang::tr{'p2p block'},
|
||||
'uri' => '/cgi-bin/p2p-block.cgi',
|
||||
'title' => "P2P-Block",
|
||||
'enabled' => 1,
|
||||
|
||||
1
config/rootfiles/core/fifteen/filelists/php
Symbolic link
1
config/rootfiles/core/fifteen/filelists/php
Symbolic link
@@ -0,0 +1 @@
|
||||
../../../common/php
|
||||
24
html/cgi-bin/firewall.cgi
Executable file → Normal file
24
html/cgi-bin/firewall.cgi
Executable file → Normal file
@@ -1050,7 +1050,7 @@ END
|
||||
if (! -z $configgrp || $optionsfw{'SHOWDROPDOWN'} eq 'on'){
|
||||
print"<tr><td valign='top'><input type='radio' name='$grp' id='cust_grp_$srctgt' value='cust_grp_$srctgt' $checked{$grp}{'cust_grp_'.$srctgt}></td><td >$Lang::tr{'fwhost cust grp'}</td><td align='right'><select name='cust_grp_$srctgt' style='width:200px;'>";
|
||||
foreach my $key (sort { ncmp($customgrp{$a}[0],$customgrp{$b}[0]) } keys %customgrp) {
|
||||
if($helper ne $customgrp{$key}[0]){
|
||||
if($helper ne $customgrp{$key}[0] && $customgrp{$key}[2] ne 'none'){
|
||||
print"<option ";
|
||||
print "selected='selected' " if ($fwdfwsettings{$fwdfwsettings{$grp}} eq $customgrp{$key}[0]);
|
||||
print ">$customgrp{$key}[0]</option>";
|
||||
@@ -1824,7 +1824,7 @@ END
|
||||
&General::readhasharray("$configsrvgrp", \%customservicegrp);
|
||||
my $helper;
|
||||
foreach my $key (sort { ncmp($customservicegrp{$a}[0],$customservicegrp{$b}[0]) } keys %customservicegrp){
|
||||
if ($helper ne $customservicegrp{$key}[0]){
|
||||
if ($helper ne $customservicegrp{$key}[0] && $customservicegrp{$key}[2] ne 'none'){
|
||||
print"<option ";
|
||||
print"selected='selected'" if ($fwdfwsettings{$fwdfwsettings{'grp3'}} eq $customservicegrp{$key}[0]);
|
||||
print">$customservicegrp{$key}[0]</option>";
|
||||
@@ -1847,7 +1847,7 @@ END
|
||||
print <<END;
|
||||
<br>
|
||||
<center>
|
||||
<table width="80%" border="0">
|
||||
<table width="80%" class='tbl'>
|
||||
<tr>
|
||||
<td width="33%" align="center" bgcolor="$color{'color17'}">
|
||||
<br>
|
||||
@@ -1884,7 +1884,6 @@ END
|
||||
|
||||
<br>
|
||||
END
|
||||
|
||||
#---Activate/logging/remark-------------------------------------
|
||||
&Header::openbox('100%', 'left', $Lang::tr{'fwdfw additional'});
|
||||
print<<END;
|
||||
@@ -2298,6 +2297,8 @@ sub viewtablenew
|
||||
&General::readhasharray("$config", $hash);
|
||||
&General::readhasharray("$configccdnet", \%ccdnet);
|
||||
&General::readhasharray("$configccdhost", \%ccdhost);
|
||||
&General::readhasharray("$configgrp", \%customgrp);
|
||||
&General::readhasharray("$configsrvgrp", \%customservicegrp);
|
||||
|
||||
&Header::openbox('100%', 'left', $title);
|
||||
print "<table width='100%' cellspacing='0' class='tbl'>";
|
||||
@@ -2401,6 +2402,21 @@ END
|
||||
}
|
||||
}
|
||||
}
|
||||
#check if networkgroups or servicegroups are empty
|
||||
foreach my $netgroup (sort keys %customgrp){
|
||||
if(($$hash{$key}[4] eq $customgrp{$netgroup}[0] || $$hash{$key}[6] eq $customgrp{$netgroup}[0]) && $customgrp{$netgroup}[2] eq 'none'){
|
||||
$coloryellow='on';
|
||||
&disable_rule($key);
|
||||
$$hash{$key}[2]='';
|
||||
}
|
||||
}
|
||||
foreach my $srvgroup (sort keys %customservicegrp){
|
||||
if($$hash{$key}[15] eq $customservicegrp{$srvgroup}[0] && $customservicegrp{$srvgroup}[2] eq 'none'){
|
||||
$coloryellow='on';
|
||||
&disable_rule($key);
|
||||
$$hash{$key}[2]='';
|
||||
}
|
||||
}
|
||||
$$hash{'ACTIVE'}=$$hash{$key}[2];
|
||||
$count++;
|
||||
if($coloryellow eq 'on'){
|
||||
|
||||
@@ -780,7 +780,7 @@ if ($fwhostsettings{'ACTION'} eq 'saveservicegrp')
|
||||
}
|
||||
#on update, we have to delete the dummy entry
|
||||
foreach my $key (keys %customservicegrp){
|
||||
if ($customservicegrp{$key}[2] eq 'none'){
|
||||
if ($customservicegrp{$key}[2] eq 'none' && $customservicegrp{$key}[0] eq $fwhostsettings{'SRVGRP_NAME'}){
|
||||
delete $customservicegrp{$key};
|
||||
last;
|
||||
}
|
||||
@@ -893,33 +893,22 @@ if ($fwhostsettings{'ACTION'} eq 'deletegrphost')
|
||||
&General::readhasharray("$configgrp", \%customgrp);
|
||||
foreach my $key (keys %customgrp){
|
||||
if($customgrp{$key}[0].",".$customgrp{$key}[1].",".$customgrp{$key}[2].",".$customgrp{$key}[3] eq $fwhostsettings{'delhost'}){
|
||||
#decrease count from source host/net
|
||||
if ($customgrp{$key}[3] eq 'Custom Network'){
|
||||
&General::readhasharray("$confignet", \%customnetwork);
|
||||
foreach my $key1 (keys %customnetwork){
|
||||
if ($customnetwork{$key1}[0] eq $customgrp{$key}[2]){
|
||||
$customnetwork{$key1}[4] = $customnetwork{$key1}[4]-1;
|
||||
last;
|
||||
}
|
||||
}
|
||||
&General::writehasharray("$confignet", \%customnetwork);
|
||||
}
|
||||
if ($customgrp{$key}[3] eq 'Custom Host'){
|
||||
&General::readhasharray("$confighost", \%customhost);
|
||||
foreach my $key1 (keys %customhost){
|
||||
if ($customhost{$key1}[0] eq $customgrp{$key}[2]){
|
||||
$customhost{$key1}[4] = $customhost{$key1}[4]-1;
|
||||
last;
|
||||
}
|
||||
}
|
||||
&General::writehasharray("$confighost", \%customhost);
|
||||
}
|
||||
$grpname=$customgrp{$key}[0];
|
||||
$grpremark=$customgrp{$key}[1];
|
||||
delete $customgrp{$key};
|
||||
#check if we delete the last entry, then generate dummy
|
||||
if ($fwhostsettings{'last'} eq 'on'){
|
||||
$customgrp{$key}[1] = '';
|
||||
$customgrp{$key}[2] = 'none';
|
||||
$customgrp{$key}[3] = '';
|
||||
$fwhostsettings{'last'}='';
|
||||
last;
|
||||
}else{
|
||||
delete $customgrp{$key};
|
||||
}
|
||||
}
|
||||
}
|
||||
&General::writehasharray("$configgrp", \%customgrp);
|
||||
&General::firewall_config_changed();
|
||||
if ($fwhostsettings{'grpcnt'} > 0){
|
||||
&General::firewall_config_changed();
|
||||
}
|
||||
@@ -982,23 +971,20 @@ if ($fwhostsettings{'ACTION'} eq 'delgrpservice')
|
||||
my $grpname;
|
||||
my $grpremark;
|
||||
&General::readhasharray("$configsrvgrp", \%customservicegrp);
|
||||
&General::readhasharray("$configsrv", \%customservice);
|
||||
foreach my $key (keys %customservicegrp){
|
||||
if($customservicegrp{$key}[0].",".$customservicegrp{$key}[1].",".$customservicegrp{$key}[2] eq $fwhostsettings{'delsrvfromgrp'})
|
||||
{
|
||||
#decrease count from source service
|
||||
foreach my $key1 (sort keys %customservice){
|
||||
if($customservice{$key1}[0] eq $customservicegrp{$key}[2]){
|
||||
$customservice{$key1}[4]--;
|
||||
last;
|
||||
}
|
||||
}
|
||||
$grpname=$customservicegrp{$key}[0];
|
||||
$grpremark=$customservicegrp{$key}[1];
|
||||
delete $customservicegrp{$key};
|
||||
if($fwhostsettings{'last'} eq 'on'){
|
||||
$customservicegrp{$key}[2] = 'none';
|
||||
$fwhostsettings{'last'} = '';
|
||||
last;
|
||||
}else{
|
||||
delete $customservicegrp{$key};
|
||||
}
|
||||
}
|
||||
}
|
||||
&General::writehasharray("$configsrv", \%customservice);
|
||||
&General::writehasharray("$configsrvgrp", \%customservicegrp);
|
||||
&General::firewall_config_changed();
|
||||
if ($fwhostsettings{'updatesrvgrp'} eq 'on'){
|
||||
@@ -1007,7 +993,6 @@ if ($fwhostsettings{'ACTION'} eq 'delgrpservice')
|
||||
}
|
||||
&addservicegrp;
|
||||
&viewtableservicegrp;
|
||||
|
||||
}
|
||||
if ($fwhostsettings{'ACTION'} eq $Lang::tr{'fwhost newnet'})
|
||||
{
|
||||
@@ -1497,11 +1482,11 @@ END
|
||||
}elsif ($count % 2)
|
||||
{
|
||||
$col="bgcolor='$color{'color20'}'";
|
||||
print" <tr>";# bgcolor='$color{'color20'}'>";
|
||||
print" <tr>";
|
||||
}else
|
||||
{
|
||||
$col="bgcolor='$color{'color22'}'";
|
||||
print" <tr>";# bgcolor='$color{'color22'}'>";
|
||||
print" <tr>";
|
||||
}
|
||||
my $colnet="$customnetwork{$key}[1]/".&General::subtocidr($customnetwork{$key}[2]);
|
||||
my $netcount=&getnetcount($customnetwork{$key}[0]);
|
||||
@@ -1655,10 +1640,19 @@ sub viewtablegrp
|
||||
my $remark;
|
||||
my $number;
|
||||
my $delflag;
|
||||
my @counter;
|
||||
my %hash;
|
||||
if (!keys %customgrp)
|
||||
{
|
||||
print "<center><b>$Lang::tr{'fwhost err emptytable'}</b>";
|
||||
}else{
|
||||
#get all groups in a hash
|
||||
foreach my $key (sort { ncmp($customgrp{$a}[0],$customgrp{$b}[0]) } sort { ncmp($customgrp{$a}[2],$customgrp{$b}[2]) } keys %customgrp){
|
||||
push (@counter,$customgrp{$key}[0]);
|
||||
}
|
||||
foreach my $key1 (@counter) {
|
||||
$hash{$key1}++ ;
|
||||
}
|
||||
foreach my $key (sort { ncmp($customgrp{$a}[0],$customgrp{$b}[0]) } sort { ncmp($customgrp{$a}[2],$customgrp{$b}[2]) } keys %customgrp){
|
||||
$count++;
|
||||
if ($helper ne $customgrp{$key}[0]){
|
||||
@@ -1676,7 +1670,7 @@ sub viewtablegrp
|
||||
if ($customgrp{$key}[2] eq "none"){$customgrp{$key}[2]=$Lang::tr{'fwhost err emptytable'};}
|
||||
$grpname=$customgrp{$key}[0];
|
||||
$remark="$customgrp{$key}[1]";
|
||||
if($count gt 1){ print"</table>";}
|
||||
if($count gt 1){ print"</table>";$count=1;}
|
||||
print "<br><b><u>$grpname</u></b> ";
|
||||
print " <b>$Lang::tr{'remark'}:</b>  $remark   " if ($remark ne '');
|
||||
my $netgrpcount=&getnetcount($grpname);
|
||||
@@ -1694,10 +1688,10 @@ sub viewtablegrp
|
||||
$col="bgcolor='${Header::colouryellow}'";
|
||||
}elsif ($count %2 == 0){
|
||||
print"<tr>";
|
||||
$col="bgcolor='$color{'color22'}'";
|
||||
$col="bgcolor='$color{'color20'}'";
|
||||
}else{
|
||||
print"<tr>";
|
||||
$col="bgcolor='$color{'color20'}'";
|
||||
$col="bgcolor='$color{'color22'}'";
|
||||
}
|
||||
my $ip=&getipforgroup($customgrp{$key}[2],$customgrp{$key}[3]);
|
||||
if ($ip eq ''){
|
||||
@@ -1717,8 +1711,14 @@ sub viewtablegrp
|
||||
$ip="$colip/".&General::subtocidr($colsub) if ($colsub);
|
||||
print"<td align='center' $col ".&getcolor($colip).">".&Header::colorize($ip)."</td><td align='center' $col>$customgrp{$key}[3]</td><td width='1%' $col><form method='post'>";
|
||||
}
|
||||
if ($delflag > 1 && $ip ne ''){
|
||||
if ($delflag > 0 && $ip ne ''){
|
||||
print"<input type='image' src='/images/delete.gif' align='middle' alt=$Lang::tr{'delete'} title=$Lang::tr{'delete'} />";
|
||||
#check if this group has only one entry
|
||||
foreach my $key2 (keys %hash) {
|
||||
if ($hash{$key2}<2 && $key2 eq $customgrp{$key}[0]){
|
||||
print "<input type='hidden' name='last' value='on'>" ;
|
||||
}
|
||||
}
|
||||
}
|
||||
print"<input type='hidden' name='ACTION' value='deletegrphost'><input type='hidden' name='grpcnt' value='$customgrp{$key}[4]'><input type='hidden' name='update' value='$fwhostsettings{'update'}'><input type='hidden' name='delhost' value='$grpname,$remark,$customgrp{$key}[2],$customgrp{$key}[3]'></form></td></tr>";
|
||||
|
||||
@@ -1793,11 +1793,15 @@ sub viewtableservicegrp
|
||||
my $grpname;
|
||||
my $remark;
|
||||
my $helper;
|
||||
my $helper1;
|
||||
my $port;
|
||||
my $protocol;
|
||||
my $delflag;
|
||||
my $grpcount=0;
|
||||
my $col='';
|
||||
my $lastentry=0;
|
||||
my @counter;
|
||||
my %hash;
|
||||
if (! -z $configsrvgrp){
|
||||
&Header::openbox('100%', 'left', $Lang::tr{'fwhost cust srvgrp'});
|
||||
&General::readhasharray("$configsrvgrp", \%customservicegrp);
|
||||
@@ -1806,6 +1810,12 @@ sub viewtableservicegrp
|
||||
&General::readhasharray("$fwconfiginp", \%fwinp);
|
||||
&General::readhasharray("$fwconfigout", \%fwout);
|
||||
my $number= keys %customservicegrp;
|
||||
foreach my $key (sort { ncmp($customservicegrp{$a}[0],$customservicegrp{$b}[0]) } sort { ncmp($customservicegrp{$a}[2],$customservicegrp{$b}[2]) }keys %customservicegrp){
|
||||
push (@counter,$customservicegrp{$key}[0]);
|
||||
}
|
||||
foreach my $key1 (@counter) {
|
||||
$hash{$key1}++ ;
|
||||
}
|
||||
foreach my $key (sort { ncmp($customservicegrp{$a}[0],$customservicegrp{$b}[0]) } sort { ncmp($customservicegrp{$a}[2],$customservicegrp{$b}[2]) }keys %customservicegrp){
|
||||
$count++;
|
||||
if ($helper ne $customservicegrp{$key}[0]){
|
||||
@@ -1823,12 +1833,12 @@ sub viewtableservicegrp
|
||||
}
|
||||
$grpname=$customservicegrp{$key}[0];
|
||||
if ($customservicegrp{$key}[2] eq "none"){
|
||||
$customservicegrp{$key}[2]=$Lang::tr{'fwhost empty'};
|
||||
$customservicegrp{$key}[2]=$Lang::tr{'fwhost err emptytable'};
|
||||
$port='';
|
||||
$protocol='';
|
||||
}
|
||||
$remark="$customservicegrp{$key}[1]";
|
||||
if($count >=2){print"</table>";}
|
||||
if($count >0){print"</table>";$count=1;}
|
||||
print "<br><b><u>$grpname</u></b> ";
|
||||
print "<b>$Lang::tr{'remark'}:</b> $remark " if ($remark ne '');
|
||||
print " <b>$Lang::tr{'used'}:</b> $grpcount x";
|
||||
@@ -1849,6 +1859,11 @@ sub viewtableservicegrp
|
||||
print"<tr>";
|
||||
$col="bgcolor='$color{'color22'}'";
|
||||
}
|
||||
#make lines yellow if it is a dummy entry
|
||||
if ($customservicegrp{$key}[2] eq $Lang::tr{'fwhost err emptytable'}){
|
||||
print"<tr>";
|
||||
$col="bgcolor='${Header::colouryellow}'";
|
||||
}
|
||||
#Set fields if we use protocols in servicegroups
|
||||
if ($customservicegrp{$key}[2] ne 'TCP' || $customservicegrp{$key}[2] ne 'UDP' || $customservicegrp{$key}[2] ne 'ICMP'){
|
||||
$port='-';
|
||||
@@ -1868,8 +1883,16 @@ sub viewtableservicegrp
|
||||
}
|
||||
}
|
||||
print"<td align='center' $col>$port</td><td align='center' $col>$protocol</td><td width='1%' $col><form method='post'>";
|
||||
if ($delflag gt '1'){
|
||||
print"<input type='image' src='/images/delete.gif' align='middle' alt=$Lang::tr{'delete'} title=$Lang::tr{'delete'} />";
|
||||
if ($delflag gt '0'){
|
||||
if ($customservicegrp{$key}[2] ne $Lang::tr{'fwhost err emptytable'}){
|
||||
print"<input type='image' src='/images/delete.gif' align='middle' alt=$Lang::tr{'delete'} title=$Lang::tr{'delete'} />";
|
||||
}
|
||||
#check if this group has only one entry
|
||||
foreach my $key2 (keys %hash) {
|
||||
if ($hash{$key2}<2 && $key2 eq $customservicegrp{$key}[0]){
|
||||
print "<input type='hidden' name='last' value='on'>" ;
|
||||
}
|
||||
}
|
||||
}
|
||||
print"<input type='hidden' name='ACTION' value='delgrpservice'><input type='hidden' name='updatesrvgrp' value='$fwhostsettings{'updatesrvgrp'}'>";
|
||||
if($protocol eq 'TCP' || $protocol eq 'UDP' || $protocol eq 'ICMP'){
|
||||
|
||||
@@ -286,7 +286,7 @@ if ( `cat /var/ipfire/vpn/settings | grep ^ENABLED=on` ||
|
||||
$haveipsec=1;
|
||||
my $ipsecip = `cat /var/ipfire/vpn/settings | grep ^VPN_IP= | cut -c 8-`;
|
||||
print<<END;
|
||||
<tr><td align='center' bgcolor='$Header::colourvpn' width='25%'><a href="/cgi-bin/vpnmain.cgi"><font size='2' color='white'><b>$Lang::tr{'vpn'}</b></font></a><br>
|
||||
<tr><td align='center' bgcolor='$Header::colourvpn' width='25%'><a href="/cgi-bin/vpnmain.cgi"><font size='2' color='white'><b>$Lang::tr{'ipsec'}</b></font></a><br>
|
||||
<td width='30%' align='center'>$ipsecip
|
||||
<td width='45%' align='center'><font color=$Header::colourgreen>Online</font>
|
||||
END
|
||||
|
||||
@@ -1163,6 +1163,12 @@ if ($cgiparams{'ACTION'} eq $Lang::tr{'save'} && $cgiparams{'TYPE'} eq '' && $cg
|
||||
$errormessage = $Lang::tr{'invalid port'};
|
||||
goto SETTINGS_ERROR;
|
||||
}
|
||||
|
||||
if ($cgiparams{'DDEST_PORT'} <= 1023) {
|
||||
$errormessage = $Lang::tr{'ovpn port in root range'};
|
||||
goto SETTINGS_ERROR;
|
||||
}
|
||||
|
||||
$vpnsettings{'ENABLED_BLUE'} = $cgiparams{'ENABLED_BLUE'};
|
||||
$vpnsettings{'ENABLED_ORANGE'} =$cgiparams{'ENABLED_ORANGE'};
|
||||
$vpnsettings{'ENABLED'} = $cgiparams{'ENABLED'};
|
||||
@@ -3534,10 +3540,24 @@ if ($cgiparams{'TYPE'} eq 'net') {
|
||||
unlink ("${General::swroot}/ovpn/n2nconf/$cgiparams{'NAME'}/$cgiparams{'NAME'}.conf") or die "Removing Configfile fail: $!";
|
||||
rmdir ("${General::swroot}/ovpn/n2nconf/$cgiparams{'NAME'}") || die "Removing Directory fail: $!";
|
||||
goto VPNCONF_ERROR;
|
||||
}
|
||||
}
|
||||
|
||||
if ($cgiparams{'DEST_PORT'} <= 1023) {
|
||||
$errormessage = $Lang::tr{'ovpn port in root range'};
|
||||
unlink ("${General::swroot}/ovpn/n2nconf/$cgiparams{'NAME'}/$cgiparams{'NAME'}.conf") or die "Removing Configfile fail: $!";
|
||||
rmdir ("${General::swroot}/ovpn/n2nconf/$cgiparams{'NAME'}") || die "Removing Directory fail: $!";
|
||||
goto VPNCONF_ERROR;
|
||||
}
|
||||
|
||||
if ($cgiparams{'OVPN_MGMT'} eq '') {
|
||||
$cgiparams{'OVPN_MGMT'} = $cgiparams{'DEST_PORT'};
|
||||
if ($cgiparams{'OVPN_MGMT'} eq '') {
|
||||
$cgiparams{'OVPN_MGMT'} = $cgiparams{'DEST_PORT'};
|
||||
}
|
||||
|
||||
if ($cgiparams{'OVPN_MGMT'} <= 1023) {
|
||||
$errormessage = $Lang::tr{'ovpn mgmt in root range'};
|
||||
unlink ("${General::swroot}/ovpn/n2nconf/$cgiparams{'NAME'}/$cgiparams{'NAME'}.conf") or die "Removing Configfile fail: $!";
|
||||
rmdir ("${General::swroot}/ovpn/n2nconf/$cgiparams{'NAME'}") || die "Removing Directory fail: $!";
|
||||
goto VPNCONF_ERROR;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
0
html/cgi-bin/p2p-block.cgi
Executable file → Normal file
0
html/cgi-bin/p2p-block.cgi
Executable file → Normal file
0
html/cgi-bin/shutdown.cgi
Executable file → Normal file
0
html/cgi-bin/shutdown.cgi
Executable file → Normal file
0
html/cgi-bin/tor.cgi
Executable file → Normal file
0
html/cgi-bin/tor.cgi
Executable file → Normal file
@@ -511,7 +511,7 @@ if ($cgiparams{'ACTION'} eq $Lang::tr{'save'} && $cgiparams{'TYPE'} eq '' && $cg
|
||||
###
|
||||
} elsif ($cgiparams{'ACTION'} eq $Lang::tr{'remove x509'}) {
|
||||
&Header::showhttpheaders();
|
||||
&Header::openpage($Lang::tr{'vpn configuration main'}, 1, '');
|
||||
&Header::openpage($Lang::tr{'ipsec'}, 1, '');
|
||||
&Header::openbigbox('100%', 'left', '', '');
|
||||
&Header::openbox('100%', 'left', $Lang::tr{'are you sure'});
|
||||
print <<END
|
||||
@@ -607,7 +607,7 @@ END
|
||||
|
||||
if ( -f "${General::swroot}/ca/$cahash{$cgiparams{'KEY'}}[0]cert.pem") {
|
||||
&Header::showhttpheaders();
|
||||
&Header::openpage($Lang::tr{'vpn configuration main'}, 1, '');
|
||||
&Header::openpage($Lang::tr{'ipsec'}, 1, '');
|
||||
&Header::openbigbox('100%', 'left', '', '');
|
||||
&Header::openbox('100%', 'left', "$Lang::tr{'ca certificate'}:");
|
||||
my $output = `/usr/bin/openssl x509 -text -in ${General::swroot}/ca/$cahash{$cgiparams{'KEY'}}[0]cert.pem`;
|
||||
@@ -683,7 +683,7 @@ END
|
||||
}
|
||||
if ($assignedcerts) {
|
||||
&Header::showhttpheaders();
|
||||
&Header::openpage($Lang::tr{'vpn configuration main'}, 1, '');
|
||||
&Header::openpage($Lang::tr{'ipsec'}, 1, '');
|
||||
&Header::openbigbox('100%', 'left', '', '');
|
||||
&Header::openbox('100%', 'left', $Lang::tr{'are you sure'});
|
||||
print <<END
|
||||
@@ -728,7 +728,7 @@ END
|
||||
$cgiparams{'ACTION'} eq $Lang::tr{'show host certificate'}) {
|
||||
my $output;
|
||||
&Header::showhttpheaders();
|
||||
&Header::openpage($Lang::tr{'vpn configuration main'}, 1, '');
|
||||
&Header::openpage($Lang::tr{'ipsec'}, 1, '');
|
||||
&Header::openbigbox('100%', 'left', '', '');
|
||||
if ($cgiparams{'ACTION'} eq $Lang::tr{'show root certificate'}) {
|
||||
&Header::openbox('100%', 'left', "$Lang::tr{'root certificate'}:");
|
||||
@@ -1054,7 +1054,7 @@ END
|
||||
|
||||
ROOTCERT_ERROR:
|
||||
&Header::showhttpheaders();
|
||||
&Header::openpage($Lang::tr{'vpn configuration main'}, 1, '');
|
||||
&Header::openpage($Lang::tr{'ipsec'}, 1, '');
|
||||
&Header::openbigbox('100%', 'left', '', $errormessage);
|
||||
if ($errormessage) {
|
||||
&Header::openbox('100%', 'left', $Lang::tr{'error messages'});
|
||||
@@ -1141,7 +1141,7 @@ END
|
||||
|
||||
if ( -f "${General::swroot}/certs/$confighash{$cgiparams{'KEY'}}[1]cert.pem") {
|
||||
&Header::showhttpheaders();
|
||||
&Header::openpage($Lang::tr{'vpn configuration main'}, 1, '');
|
||||
&Header::openpage($Lang::tr{'ipsec'}, 1, '');
|
||||
&Header::openbigbox('100%', 'left', '', '');
|
||||
&Header::openbox('100%', 'left', "$Lang::tr{'cert'}:");
|
||||
my $output = `/usr/bin/openssl x509 -text -in ${General::swroot}/certs/$confighash{$cgiparams{'KEY'}}[1]cert.pem`;
|
||||
@@ -1231,7 +1231,7 @@ END
|
||||
###
|
||||
} elsif ($cgiparams{'ACTION'} eq $Lang::tr{'add'} && $cgiparams{'TYPE'} eq '') {
|
||||
&Header::showhttpheaders();
|
||||
&Header::openpage($Lang::tr{'vpn configuration main'}, 1, '');
|
||||
&Header::openpage($Lang::tr{'ipsec'}, 1, '');
|
||||
&Header::openbigbox('100%', 'left', '', '');
|
||||
&Header::openbox('100%', 'left', $Lang::tr{'connection type'});
|
||||
print <<END
|
||||
@@ -1911,7 +1911,7 @@ END
|
||||
$checked{'AUTH'}{$cgiparams{'AUTH'}} = "checked='checked'";
|
||||
|
||||
&Header::showhttpheaders();
|
||||
&Header::openpage($Lang::tr{'vpn configuration main'}, 1, '');
|
||||
&Header::openpage($Lang::tr{'ipsec'}, 1, '');
|
||||
&Header::openbigbox('100%', 'left', '', $errormessage);
|
||||
if ($errormessage) {
|
||||
&Header::openbox('100%', 'left', $Lang::tr{'error messages'});
|
||||
@@ -2353,7 +2353,7 @@ if(($cgiparams{'ACTION'} eq $Lang::tr{'advanced'}) ||
|
||||
$selected{'DPD_ACTION'}{$cgiparams{'DPD_ACTION'}} = "selected='selected'";
|
||||
|
||||
&Header::showhttpheaders();
|
||||
&Header::openpage($Lang::tr{'vpn configuration main'}, 1, '');
|
||||
&Header::openpage($Lang::tr{'ipsec'}, 1, '');
|
||||
&Header::openbigbox('100%', 'left', '', $errormessage);
|
||||
|
||||
if ($errormessage) {
|
||||
@@ -2602,7 +2602,7 @@ EOF
|
||||
$checked{'ENABLED'} = $cgiparams{'ENABLED'} eq 'on' ? "checked='checked'" : '';
|
||||
|
||||
&Header::showhttpheaders();
|
||||
&Header::openpage($Lang::tr{'vpn configuration main'}, 1, '');
|
||||
&Header::openpage($Lang::tr{'ipsec'}, 1, '');
|
||||
&Header::openbigbox('100%', 'left', '', $errormessage);
|
||||
|
||||
if ($errormessage) {
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
/* This controls the width of the fixed width layouts */
|
||||
|
||||
.fixed {
|
||||
width: 910px !important;
|
||||
width: 960px !important;
|
||||
}
|
||||
|
||||
/* Basic Stuff */
|
||||
@@ -16,64 +16,6 @@ html {
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
/* This decorates all tables with class="tbl" */
|
||||
|
||||
table {
|
||||
*border-collapse: collapse; /* IE7 and lower */
|
||||
border-spacing: 0;
|
||||
}
|
||||
|
||||
.tbl th {
|
||||
color: #000000;
|
||||
border-top: 1px solid grey;
|
||||
border-bottom: 1px solid grey;
|
||||
background: #cccccc;
|
||||
}
|
||||
|
||||
.tbl th:first-child {
|
||||
border-left: 1px solid grey;
|
||||
border-top: 1px solid grey;
|
||||
border-bottom: 1px solid grey;
|
||||
}
|
||||
|
||||
.tbl th:last-child {
|
||||
border-right: 1px solid grey;
|
||||
border-top: 1px solid grey;
|
||||
border-bottom: 1px solid grey;
|
||||
}
|
||||
|
||||
.tbl th:only-child {
|
||||
border: 1px solid grey;
|
||||
}
|
||||
|
||||
.tbl tr td:first-child {
|
||||
border-left: 1px solid grey;
|
||||
}
|
||||
|
||||
.tbl tr td:last-child {
|
||||
border-right: 1px solid grey;
|
||||
}
|
||||
|
||||
.tbl tr:first-child td:only-child {
|
||||
border-top: 1px solid grey;
|
||||
}
|
||||
|
||||
.tbl tr:last-child td:only-child {
|
||||
border-bottom: 1px solid grey;
|
||||
}
|
||||
|
||||
.tbl tr:last-child td:first-child {
|
||||
border-bottom: 1px solid grey;
|
||||
}
|
||||
|
||||
.tbl tr:last-child td:last-child {
|
||||
border-bottom: 1px solid grey;
|
||||
}
|
||||
|
||||
.tbl tr:last-child td {
|
||||
border-bottom: 1px solid grey;
|
||||
}
|
||||
|
||||
body {
|
||||
/* SVG as background image (IE9/Chrome/Safari/Opera) */
|
||||
background-image: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIHZpZXdCb3g9IjAgMCAxIDEiIHByZXNlcnZlQXNwZWN0UmF0aW89Im5vbmUiPgo8bGluZWFyR3JhZGllbnQgaWQ9Imc2ODQiIGdyYWRpZW50VW5pdHM9InVzZXJTcGFjZU9uVXNlIiB4MT0iMTAwJSIgeTE9IjEwMCUiIHgyPSIxMDAlIiB5Mj0iMCUiPgo8c3RvcCBzdG9wLWNvbG9yPSIjMDAwMDAwIiBvZmZzZXQ9IjAiLz48c3RvcCBzdG9wLWNvbG9yPSIjODgwNDAwIiBvZmZzZXQ9IjU3JSIvPgo8L2xpbmVhckdyYWRpZW50Pgo8cmVjdCB4PSIwIiB5PSIwIiB3aWR0aD0iMSIgaGVpZ2h0PSIxIiBmaWxsPSJ1cmwoI2c2ODQpIiAvPgo8L3N2Zz4=);
|
||||
@@ -113,7 +55,7 @@ body {
|
||||
background-attachment: fixed;
|
||||
|
||||
font-size: 9pt;
|
||||
font-family: "trebuchet ms", helvetica, sans-serif;
|
||||
font-family: "DejaVu Sans", Helvetica, sans-serif;
|
||||
}
|
||||
|
||||
|
||||
@@ -124,7 +66,7 @@ h1, h2, h3, h4, h5, h6 {
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
h2, h3, h4, h5, h6 {
|
||||
h1 {
|
||||
color: #66000F;
|
||||
}
|
||||
|
||||
@@ -180,6 +122,7 @@ iframe {
|
||||
color: #fff;
|
||||
font-size: 3.6em;
|
||||
font-weight: bold;
|
||||
padding-top: 0.2em;
|
||||
padding-left: 1.7em;
|
||||
}
|
||||
|
||||
@@ -223,7 +166,7 @@ iframe {
|
||||
|
||||
#main_inner .post h2 {
|
||||
border-bottom: dotted 1px #e1e1e1;
|
||||
font-size: 0.8em;
|
||||
font-size: 1.6em;
|
||||
margin-bottom: 1em;
|
||||
}
|
||||
|
||||
@@ -318,3 +261,61 @@ input.text {
|
||||
#cssmenu .has-sub ul li:hover a {
|
||||
background: #dddddd;
|
||||
}
|
||||
|
||||
/* This decorates all tables with class="tbl" */
|
||||
|
||||
table {
|
||||
*border-collapse: collapse; /* IE7 and lower */
|
||||
border-spacing: 0;
|
||||
}
|
||||
|
||||
.tbl th {
|
||||
color: #000000;
|
||||
border-top: 1px solid lightgrey;
|
||||
border-bottom: 1px solid lightgrey;
|
||||
background: #cccccc;
|
||||
}
|
||||
|
||||
.tbl th:first-child {
|
||||
border-left: 1px solid lightgrey;
|
||||
border-top: 1px solid lightgrey;
|
||||
border-bottom: 1px solid lightgrey;
|
||||
}
|
||||
|
||||
.tbl th:last-child {
|
||||
border-right: 1px solid lightgrey;
|
||||
border-top: 1px solid lightgrey;
|
||||
border-bottom: 1px solid lightgrey;
|
||||
}
|
||||
|
||||
.tbl th:only-child {
|
||||
border: 1px solid lightgrey;
|
||||
}
|
||||
|
||||
.tbl tr td:first-child {
|
||||
border-left: 1px solid lightgrey;
|
||||
}
|
||||
|
||||
.tbl tr td:last-child {
|
||||
border-right: 1px solid lightgrey;
|
||||
}
|
||||
|
||||
.tbl tr:first-child td {
|
||||
border-top: 1px solid lightgrey;
|
||||
}
|
||||
|
||||
.tbl tr:last-child td:only-child {
|
||||
border-bottom: 1px solid lightgrey;
|
||||
}
|
||||
|
||||
.tbl tr:last-child td:first-child {
|
||||
border-bottom: 1px solid lightgrey;
|
||||
}
|
||||
|
||||
.tbl tr:last-child td:last-child {
|
||||
border-bottom: 1px solid lightgrey;
|
||||
}
|
||||
|
||||
.tbl tr:last-child td {
|
||||
border-bottom: 1px solid lightgrey;
|
||||
}
|
||||
|
||||
@@ -120,7 +120,7 @@ sub openpage {
|
||||
}
|
||||
|
||||
print <<END;
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>$headline - $title</title>
|
||||
|
||||
@@ -1269,9 +1269,10 @@
|
||||
'ipfire side is invalid' => 'IPFire Seite ist ungültig.',
|
||||
'ipfires hostname' => 'IPFire\'s Hostname',
|
||||
'ipinfo' => 'IP-Info',
|
||||
'ipsec network' => 'IPsec-Netzwerke',
|
||||
'iptable rules' => 'IPTable-Regeln',
|
||||
'iptmangles' => 'IPTable Mangles',
|
||||
'ipsec' => 'IPsec',
|
||||
'ipsec network' => 'IPsec-Netzwerke',
|
||||
'iptnats' => 'IPTable Network Address Translation',
|
||||
'ipts' => 'iptables',
|
||||
'isdn' => 'ISDN',
|
||||
@@ -1605,6 +1606,8 @@
|
||||
'ovpn on blue' => 'OpenVPN auf BLAU',
|
||||
'ovpn on orange' => 'OpenVPN auf ORANGE',
|
||||
'ovpn on red' => 'OpenVPN auf ROT',
|
||||
'ovpn mgmt in root range' => 'Ein Port von 1024 oder höher ist erforderlich.',
|
||||
'ovpn port in root range' => 'Ein Port von 1024 oder höher ist erforderlich.',
|
||||
'ovpn routes push' => 'Routen (eine pro Zeile) z.b. 192.168.10.0/255.255.255.0 192.168.20.0/24',
|
||||
'ovpn routes push options' => 'Route push Optionen',
|
||||
'ovpn server status' => 'OpenVPN-Server-Status',
|
||||
@@ -1627,7 +1630,7 @@
|
||||
'ovpn_processprioVH' => 'Sehr Hoch',
|
||||
'ovpnstatus log' => 'OVPN-Status-Log',
|
||||
'ovpnsys log' => 'OVPN-System-Log',
|
||||
'p2p block' => 'P2P-Block',
|
||||
'p2p block' => 'P2P-Netzwerke',
|
||||
'p2p block save notice' => 'Bitte lesen Sie die Firewallregeln neu ein, damit die Änderungen aktiv werden.',
|
||||
'package failed to install' => 'Programmpaket konnte nicht installiert werden.',
|
||||
'pagerefresh' => 'Seite wird aktualisiert. Bitte warten.',
|
||||
|
||||
@@ -1298,6 +1298,7 @@
|
||||
'ipfire side is invalid' => 'IPFire side is invalid.',
|
||||
'ipfires hostname' => 'IPFire\'s Hostname',
|
||||
'ipinfo' => 'IP info',
|
||||
'ipsec' => 'IPsec',
|
||||
'ipsec network' => 'IPsec network',
|
||||
'iptable rules' => 'IPTable rules',
|
||||
'iptmangles' => 'IPTable Mangles',
|
||||
@@ -1635,6 +1636,8 @@
|
||||
'ovpn on blue' => 'OpenVPN on BLUE',
|
||||
'ovpn on orange' => 'OpenVPN on ORANGE',
|
||||
'ovpn on red' => 'OpenVPN on RED',
|
||||
'ovpn mgmt in root range' => 'A port number of 1024 or higher is required.',
|
||||
'ovpn port in root range' => 'A port number of 1024 or higher is required.',
|
||||
'ovpn routes push' => 'Routes (one per line) e.g. 192.168.10.0/255.255.255.0 192.168.20.0/24',
|
||||
'ovpn routes push options' => 'Route push options',
|
||||
'ovpn server status' => 'Current OpenVPN server status:',
|
||||
@@ -1657,7 +1660,7 @@
|
||||
'ovpn_processprioVH' => 'Very high',
|
||||
'ovpnstatus log' => 'OVPN-Status-Log',
|
||||
'ovpnsys log' => 'OVPN-System-Log',
|
||||
'p2p block' => 'P2P block',
|
||||
'p2p block' => 'P2P networks',
|
||||
'p2p block save notice' => 'Please reload the firewall ruleset in order to apply your changes.',
|
||||
'package failed to install' => 'Package failed to install.',
|
||||
'pagerefresh' => 'Page is beeing refreshed, please wait.',
|
||||
|
||||
Reference in New Issue
Block a user