mirror of
https://github.com/vincentmli/bpfire.git
synced 2026-04-27 03:07:43 +02:00
Firewall: Renamed directory /var/ipfire/forward to /var/ipfire/firewall
This commit is contained in:
@@ -29,13 +29,13 @@ no warnings 'uninitialized';
|
||||
require '/var/ipfire/general-functions.pl';
|
||||
require "${General::swroot}/lang.pl";
|
||||
require "${General::swroot}/header.pl";
|
||||
require "${General::swroot}/forward/bin/firewall-lib.pl";
|
||||
require "${General::swroot}/firewall/bin/firewall-lib.pl";
|
||||
|
||||
unless (-d "${General::swroot}/forward") { system("mkdir ${General::swroot}/forward"); }
|
||||
unless (-e "${General::swroot}/forward/settings") { system("touch ${General::swroot}/forward/settings"); }
|
||||
unless (-e "${General::swroot}/forward/config") { system("touch ${General::swroot}/forward/config"); }
|
||||
unless (-e "${General::swroot}/forward/input") { system("touch ${General::swroot}/forward/input"); }
|
||||
unless (-e "${General::swroot}/forward/outgoing") { system("touch ${General::swroot}/forward/outgoing"); }
|
||||
unless (-d "${General::swroot}/firewall") { system("mkdir ${General::swroot}/firewall"); }
|
||||
unless (-e "${General::swroot}/firewall/settings") { system("touch ${General::swroot}/firewall/settings"); }
|
||||
unless (-e "${General::swroot}/firewall/config") { system("touch ${General::swroot}/firewall/config"); }
|
||||
unless (-e "${General::swroot}/firewall/input") { system("touch ${General::swroot}/firewall/input"); }
|
||||
unless (-e "${General::swroot}/firewall/outgoing") { system("touch ${General::swroot}/firewall/outgoing"); }
|
||||
|
||||
my %fwdfwsettings=();
|
||||
my %selected=() ;
|
||||
@@ -75,9 +75,9 @@ my $configccdnet = "${General::swroot}/ovpn/ccd.conf";
|
||||
my $configccdhost = "${General::swroot}/ovpn/ovpnconfig";
|
||||
my $configipsec = "${General::swroot}/vpn/config";
|
||||
my $configipsecrw = "${General::swroot}/vpn/settings";
|
||||
my $configfwdfw = "${General::swroot}/forward/config";
|
||||
my $configinput = "${General::swroot}/forward/input";
|
||||
my $configoutgoing = "${General::swroot}/forward/outgoing";
|
||||
my $configfwdfw = "${General::swroot}/firewall/config";
|
||||
my $configinput = "${General::swroot}/firewall/input";
|
||||
my $configoutgoing = "${General::swroot}/firewall/outgoing";
|
||||
my $configovpn = "${General::swroot}/ovpn/settings";
|
||||
my $fwoptions = "${General::swroot}/optionsfw/settings";
|
||||
my $ifacesettings = "${General::swroot}/ethernet/settings";
|
||||
@@ -87,7 +87,7 @@ my $ipgrp="${General::swroot}/outgoing/groups";
|
||||
my $tdcolor='';
|
||||
my $checkorange='';
|
||||
my @protocols;
|
||||
&General::readhash("${General::swroot}/forward/settings", \%fwdfwsettings);
|
||||
&General::readhash("${General::swroot}/firewall/settings", \%fwdfwsettings);
|
||||
&General::readhash("${General::swroot}/main/settings", \%mainsettings);
|
||||
&General::readhash("/srv/web/ipfire/html/themes/".$mainsettings{'THEME'}."/include/colors.txt", \%color);
|
||||
&General::readhash($fwoptions, \%optionsfw);
|
||||
@@ -2687,7 +2687,7 @@ END
|
||||
#SHOW FINAL RULE
|
||||
print "<table width='100%'rules='cols' border='1'>";
|
||||
my $col;
|
||||
if ($config eq '/var/ipfire/forward/config'){
|
||||
if ($config eq '/var/ipfire/firewall/config'){
|
||||
my $pol='fwdfw '.$fwdfwsettings{'POLICY'};
|
||||
if ($fwdfwsettings{'POLICY'} eq 'MODE1'){
|
||||
$col="bgcolor='darkred'";
|
||||
@@ -2695,7 +2695,7 @@ END
|
||||
$col="bgcolor='green'";
|
||||
}
|
||||
&show_defaultrules($col,$pol);
|
||||
}elsif ($config eq '/var/ipfire/forward/outgoing'){
|
||||
}elsif ($config eq '/var/ipfire/firewall/outgoing'){
|
||||
if ($fwdfwsettings{'POLICY1'} eq 'MODE1'){
|
||||
$col="bgcolor='darkred'";
|
||||
print"<tr><td $col width='20%' align='center'><font color='#FFFFFF'>$Lang::tr{'fwdfw final_rule'}</td><td $col align='center'><font color='#FFFFFF' >$Lang::tr{'fwdfw pol block'}</font></td></tr>";
|
||||
@@ -2715,7 +2715,7 @@ END
|
||||
print "<b>$title1</b><br>";
|
||||
print"<table width='100%' border='0' rules='none'><tr><td height='30' bgcolor=$color{'color22'} align='center'>$Lang::tr{'fwhost empty'}</td></tr></table>";
|
||||
my $col;
|
||||
if ($config eq '/var/ipfire/forward/config'){
|
||||
if ($config eq '/var/ipfire/firewall/config'){
|
||||
my $pol='fwdfw '.$fwdfwsettings{'POLICY'};
|
||||
if ($fwdfwsettings{'POLICY'} eq 'MODE1'){
|
||||
$col="bgcolor='darkred'";
|
||||
@@ -2723,7 +2723,7 @@ END
|
||||
$col="bgcolor='green'";
|
||||
}
|
||||
&show_defaultrules($col,$pol);
|
||||
}elsif ($config eq '/var/ipfire/forward/outgoing'){
|
||||
}elsif ($config eq '/var/ipfire/firewall/outgoing'){
|
||||
print "<table width='100%' rules='cols' border='1'>";
|
||||
my $pol='fwdfw '.$fwdfwsettings{'POLICY1'};
|
||||
if ($fwdfwsettings{'POLICY1'} eq 'MODE1'){
|
||||
|
||||
@@ -60,8 +60,8 @@ my $configccdhost = "${General::swroot}/ovpn/ovpnconfig";
|
||||
my $configipsec = "${General::swroot}/vpn/config";
|
||||
my $configsrv = "${General::swroot}/fwhosts/customservices";
|
||||
my $configsrvgrp = "${General::swroot}/fwhosts/customservicegrp";
|
||||
my $fwconfigfwd = "${General::swroot}/forward/config";
|
||||
my $fwconfiginp = "${General::swroot}/forward/input";
|
||||
my $fwconfigfwd = "${General::swroot}/firewall/config";
|
||||
my $fwconfiginp = "${General::swroot}/firewall/input";
|
||||
my $configovpn = "${General::swroot}/ovpn/settings";
|
||||
my $tdcolor='';
|
||||
my $configipsecrw = "${General::swroot}/vpn/settings";
|
||||
|
||||
@@ -26,13 +26,13 @@ my %fwdfwsettings=();
|
||||
my %configfwdfw=();
|
||||
my %configoutgoingfw=();
|
||||
|
||||
my $configfwdfw = "${General::swroot}/forward/config";
|
||||
my $configoutgoing = "${General::swroot}/forward/outgoing";
|
||||
my $configfwdfw = "${General::swroot}/firewall/config";
|
||||
my $configoutgoing = "${General::swroot}/firewall/outgoing";
|
||||
my $errormessage = '';
|
||||
my $warnmessage = '';
|
||||
my $filename = "${General::swroot}/optionsfw/settings";
|
||||
|
||||
&General::readhash("${General::swroot}/forward/settings", \%fwdfwsettings);
|
||||
&General::readhash("${General::swroot}/firewall/settings", \%fwdfwsettings);
|
||||
&Header::showhttpheaders();
|
||||
|
||||
#Get GUI values
|
||||
@@ -54,8 +54,8 @@ if ($settings{'ACTION'} eq $Lang::tr{'save'}) {
|
||||
%fwdfwsettings = ();
|
||||
$fwdfwsettings{'POLICY'} = "$MODE";
|
||||
$fwdfwsettings{'POLICY1'} = "$MODE1";
|
||||
&General::writehash("${General::swroot}/forward/settings", \%fwdfwsettings);
|
||||
&General::readhash("${General::swroot}/forward/settings", \%fwdfwsettings);
|
||||
&General::writehash("${General::swroot}/firewall/settings", \%fwdfwsettings);
|
||||
&General::readhash("${General::swroot}/firewall/settings", \%fwdfwsettings);
|
||||
system("/usr/local/bin/forwardfwctrl");
|
||||
}
|
||||
&General::readhash($filename, \%settings); # Load good settings
|
||||
|
||||
@@ -170,7 +170,7 @@ sub checkportfw {
|
||||
my $DPORT = shift;
|
||||
my $DPROT = shift;
|
||||
my %natconfig =();
|
||||
my $confignat = "${General::swroot}/forward/config";
|
||||
my $confignat = "${General::swroot}/firewall/config";
|
||||
$DPROT= uc ($DPROT);
|
||||
&General::readhasharray($confignat, \%natconfig);
|
||||
foreach my $key (sort keys %natconfig){
|
||||
|
||||
@@ -32,7 +32,7 @@ require "${General::swroot}/lang.pl";
|
||||
require "${General::swroot}/header.pl";
|
||||
|
||||
my $errormessage = '';
|
||||
my $p2pfile = "${General::swroot}/forward/p2protocols";
|
||||
my $p2pfile = "${General::swroot}/firewall/p2protocols";
|
||||
|
||||
my @p2ps = ();
|
||||
my %fwdfwsettings = ();
|
||||
|
||||
Reference in New Issue
Block a user