Forward Firewall: changed some names and added subnets to dropdowns
authorAlexander Marx <amarx@ipfire.org>
Mon, 1 Jul 2013 14:38:14 +0000 (16:38 +0200)
committerMichael Tremer <michael.tremer@ipfire.org>
Fri, 9 Aug 2013 12:15:30 +0000 (14:15 +0200)
config/cfgroot/general-functions.pl
html/cgi-bin/forwardfw.cgi
html/cgi-bin/fwhosts.cgi
langs/de/cgi-bin/de.pl
langs/en/cgi-bin/en.pl

index 07bbab67a3f6722397fbcb1bf59dcfef0579a4d3..c57de1996e78818c3a0d980f32ebc319806fa1c6 100644 (file)
@@ -82,8 +82,8 @@ sub setup_default_networks
                        my ($ip,$sub) = split(/\//,$ovpnSettings{'DOVPN_SUBNET'});
                        $sub=&General::iporsubtocidr($sub);
                        my @tempovpnsubnet = split("\/", $ovpnSettings{'DOVPN_SUBNET'});
-                       $defaultNetworks->{'OpenVPN ' .$ip."/".$sub}{'ADR'} = $tempovpnsubnet[0];
-                       $defaultNetworks->{'OpenVPN ' .$ip."/".$sub}{'NAME'} = "OpenVPN-Dyn";
+                       $defaultNetworks->{'OpenVPN ' ."($ip/$sub)"}{'ADR'} = $tempovpnsubnet[0];
+                       $defaultNetworks->{'OpenVPN ' ."($ip/$sub)"}{'NAME'} = "OpenVPN-Dyn";
                }
        } # end OpenVPN
        # IPsec RW NET
index 716f5881089e53b60e8590549e33a65b73f3e696..57eff4dff28d825ee785ee685acfcd343b8dfc9c 100755 (executable)
@@ -994,9 +994,12 @@ END
                        print "<option value='$defaultNetworks{$network}{'NAME'}'";
                        print " selected='selected'" if ($fwdfwsettings{$fwdfwsettings{$grp}} eq $defaultNetworks{$network}{'NAME'});
                        my $defnet="$defaultNetworks{$network}{'NAME'}_NETADDRESS";
+                       my $defsub="$defaultNetworks{$network}{'NAME'}_NETMASK";
+                       my $defsub1=&General::subtocidr($ifaces{$defsub});
                        $ifaces{$defnet}='0.0.0.0' if ($defaultNetworks{$network}{'NAME'} eq 'RED');
+                       $defsub1 ='0' if ($defaultNetworks{$network}{'NAME'} eq 'RED');
                        if ($ifaces{$defnet}){
-                               print ">$network ($ifaces{$defnet})</option>";
+                               print ">$network ($ifaces{$defnet}/$defsub1)</option>";
                        }else{
                                print ">$network</option>";
                        }
@@ -1694,7 +1697,7 @@ END
                #---Activate/logging/remark-------------------------------------
                &Header::openbox('100%', 'left', $Lang::tr{'fwdfw additional'});
                print<<END;
-               <table width='100%' border='0'>
+               <table width='100%' border='1'>
                <tr><td nowrap>$Lang::tr{'fwdfw rule action'}</td><td><select name='RULE_ACTION'>
 END
                foreach ("ACCEPT","DROP","REJECT")
@@ -1716,7 +1719,7 @@ END
                        }
                }
                print"</select></td></tr>";     
-               print"<tr><td width='100%'>$Lang::tr{'remark'}:</td><td align='left'><input type='text' name='ruleremark' size='78' maxlength='255' value='$fwdfwsettings{'ruleremark'}'></td></tr>";
+               print"<tr><td width='12%'>$Lang::tr{'remark'}:</td><td width='88%' align='left'><input type='text' name='ruleremark' maxlength='255' value='$fwdfwsettings{'ruleremark'}' style='width:99%':></td></tr>";
                #print"<tr><td width='100%'>$Lang::tr{'remark'}:</td><td align='left'><textarea name='ruleremark' cols='70' rows='3' value='$fwdfwsettings{'ruleremark'}'></textarea></td></tr>";
                if($fwdfwsettings{'updatefwrule'} eq 'on' || $fwdfwsettings{'copyfwrule'} eq 'on'){
                        print "<tr><td width='12%'>$Lang::tr{'fwdfw rulepos'}:</td><td><select name='rulepos' >";
index ac0c0448983d7966abe3e2db955b850efdc3f581..9afc7c8796e624e0100ece0e53b3e2fffe587be9 100755 (executable)
@@ -1083,9 +1083,9 @@ sub addnet
        $fwhostsettings{'orgnetremark'}=$fwhostsettings{'NETREMARK'};
        print<<END;
        <table border='0' width='100%'><form method='post' style='display:inline'  >
-       <tr><td width='15%'>$Lang::tr{'name'}:</td><td><input type='TEXT' name='HOSTNAME' id='textbox1' value='$fwhostsettings{'HOSTNAME'}' $fwhostsettings{'BLK_HOST'} size='14'><script>document.getElementById('textbox1').focus()</script></td></tr>
-       <tr><td>$Lang::tr{'fwhost netaddress'}:</td><td><input type='TEXT' name='IP' value='$fwhostsettings{'IP'}' $fwhostsettings{'BLK_IP'} size='14' maxlength='15'></td></tr>
-       <tr><td>$Lang::tr{'netmask'}:</td><td><input type='TEXT' name='SUBNET' value='$fwhostsettings{'SUBNET'}' $fwhostsettings{'BLK_IP'} size='14' maxlength='15'></td></tr>
+       <tr><td width='15%'>$Lang::tr{'name'}:</td><td><input type='TEXT' name='HOSTNAME' id='textbox1' value='$fwhostsettings{'HOSTNAME'}' $fwhostsettings{'BLK_HOST'} size='20'><script>document.getElementById('textbox1').focus()</script></td></tr>
+       <tr><td>$Lang::tr{'fwhost netaddress'}:</td><td><input type='TEXT' name='IP' value='$fwhostsettings{'IP'}' $fwhostsettings{'BLK_IP'} size='20' maxlength='15'></td></tr>
+       <tr><td>$Lang::tr{'netmask'}:</td><td><input type='TEXT' name='SUBNET' value='$fwhostsettings{'SUBNET'}' $fwhostsettings{'BLK_IP'} size='20' maxlength='15'></td></tr>
        <tr><td>$Lang::tr{'remark'}:</td><td><input type='TEXT' name='NETREMARK' value='$fwhostsettings{'NETREMARK'}' style='width: 98.5%;'></td></tr>
        <tr><td colspan='6'><br><hr></hr></td></tr><tr>
 END
@@ -1107,8 +1107,8 @@ sub addhost
        $fwhostsettings{'orgremark'}=$fwhostsettings{'HOSTREMARK'};
        print<<END;
        <table border='0' width='100%'><form method='post' style='display:inline'>
-       <tr><td>$Lang::tr{'name'}:</td><td><input type='TEXT' name='HOSTNAME' id='textbox1' value='$fwhostsettings{'HOSTNAME'}' $fwhostsettings{'BLK_HOST'} size='14'><script>document.getElementById('textbox1').focus()</script></td></tr>
-       <tr><td>IP/MAC:</td><td><input type='TEXT' name='IP' value='$fwhostsettings{'IP'}' $fwhostsettings{'BLK_IP'} size='14' maxlength='17'></td></tr>
+       <tr><td>$Lang::tr{'name'}:</td><td><input type='TEXT' name='HOSTNAME' id='textbox1' value='$fwhostsettings{'HOSTNAME'}' $fwhostsettings{'BLK_HOST'} size='20'><script>document.getElementById('textbox1').focus()</script></td></tr>
+       <tr><td>IP/MAC:</td><td><input type='TEXT' name='IP' value='$fwhostsettings{'IP'}' $fwhostsettings{'BLK_IP'} size='20' maxlength='17'></td></tr>
        <tr><td width='10%'>$Lang::tr{'remark'}:</td><td><input type='TEXT' name='HOSTREMARK' value='$fwhostsettings{'HOSTREMARK'}' style='width:98%;'></td></tr>
        <tr><td colspan='5'><hr></hr></td></tr>
 END
@@ -1147,7 +1147,7 @@ sub addgrp
                if ($fwhostsettings{'update'} eq ''){   
                        print<<END;
                        <table width='100%' border='0'><form method='post'>
-                       <tr><td width='10%'>$Lang::tr{'fwhost addgrpname'}</td><td><input type='TEXT' name='grp_name' value='$fwhostsettings{'grp_name'}' size='14'></td></tr>
+                       <tr><td width='10%'>$Lang::tr{'fwhost addgrpname'}</td><td><input type='TEXT' name='grp_name' value='$fwhostsettings{'grp_name'}' size='20'></td></tr>
                        <tr><td width='10%'>$Lang::tr{'remark'}:</td><td ><input type='TEXT' name='remark' value='$fwhostsettings{'remark'}' style='width: 98%;'></td></tr>
                        <tr><td colspan='2'><br><hr></td></tr></table>
 END
@@ -1242,7 +1242,7 @@ sub addservice
 {
        &error;
        &showmenu;
-       &Header::openbox('100%', 'left', $Lang::tr{'fwhost newservice'});
+       &Header::openbox('100%', 'left', $Lang::tr{'fwhost addservice'});
        if ($fwhostsettings{'updatesrv'} eq 'on')
        {
                $fwhostsettings{'oldsrvname'} = $fwhostsettings{'SRV_NAME'};
@@ -1251,7 +1251,7 @@ sub addservice
        }
        print<<END;
        <table width='100%' border='0'><form method='post'>
-       <tr><td width='10%' nowrap='nowrap'>$Lang::tr{'fwhost srv_name'}:</td><td><input type='text' name='SRV_NAME' id='textbox1' value='$fwhostsettings{'SRV_NAME'}' size='14'><script>document.getElementById('textbox1').focus()</script></td></tr>
+       <tr><td width='10%' nowrap='nowrap'>$Lang::tr{'fwhost srv_name'}:</td><td><input type='text' name='SRV_NAME' id='textbox1' value='$fwhostsettings{'SRV_NAME'}' size='24'><script>document.getElementById('textbox1').focus()</script></td></tr>
        <tr><td width='10%' nowrap='nowrap'>$Lang::tr{'fwhost prot'}:</td><td><select name='PROT'>
 END
        foreach ("TCP","UDP","ICMP")
@@ -1275,7 +1275,7 @@ END
        
        print<<END;
        </select></td></tr>
-       <tr><td width='10%'>$Lang::tr{'fwhost port'}:</td><td><input type='text' name='SRV_PORT' value='$fwhostsettings{'SRV_PORT'}' maxlength='11' size='14'></td></tr>
+       <tr><td width='10%'>$Lang::tr{'fwhost port'}:</td><td><input type='text' name='SRV_PORT' value='$fwhostsettings{'SRV_PORT'}' maxlength='11' size='24'></td></tr>
        <tr><td colspan='6'><br><hr></td></tr>
        <tr><td colspan='6' align='right'>
 END
@@ -1306,12 +1306,12 @@ sub addservicegrp
        &hint;
        &error;
        &showmenu;
-       &Header::openbox('100%', 'left', $Lang::tr{'fwhost newservicegrp'});
+       &Header::openbox('100%', 'left', $Lang::tr{'fwhost addservicegrp'});
        $fwhostsettings{'oldsrvgrpremark'}=$fwhostsettings{'SRVGRP_REMARK'};
        if ($fwhostsettings{'updatesrvgrp'} eq ''){
                print<<END;
                <table width='100%' border='0'><form method='post'>
-               <tr><td width='10%'>$Lang::tr{'fwhost addgrpname'}</td><td><input type='text' name='SRVGRP_NAME' value='$fwhostsettings{'SRVGRP_NAME'}' size='14'></td></tr>
+               <tr><td width='10%'>$Lang::tr{'fwhost addgrpname'}</td><td><input type='text' name='SRVGRP_NAME' value='$fwhostsettings{'SRVGRP_NAME'}' size='24'></td></tr>
                <tr><td width='10%'>$Lang::tr{'remark'}:</td><td><input type='text' name='SRVGRP_REMARK' value='$fwhostsettings{'SRVGRP_REMARK'}' style='width: 98%;'></td></tr>
                <tr><td colspan='2'><br><hr></tr>
                </table>
index b205c85bc188913f4c68b1fc0ce5ab8a3a303e3f..5ff88f43d399f5eeee69367c006f5358019e793a 100644 (file)
 'fwdfw wd_sat'                 => 'Sa',
 'fwdfw wd_sun'                 => 'So',
 'fwdfw xt access'              => 'Input',
-'fwhost addgrp'                => 'Gruppe:',
+'fwhost addgrp'                => 'Gruppe hinzufügen:',
 'fwhost addgrpname'            => 'Gruppenname:',
-'fwhost addhost'               => 'Adresse:',
-'fwhost addnet'                => 'Netzwerk:',
+'fwhost addhost'               => 'Host hinzufügen:',
+'fwhost addnet'                => 'Netzwerk hinzufügen:',
 'fwhost addrule'               => 'Regel hinzufügen/ändern:',
+'fwhost addservice'            => 'Dienst hinzufügen:',
+'fwhost addservicegrp' => 'Dienstgruppe hinzufügen:',
 'fwhost any'                   => 'Alle',
 'fwhost attention'             => 'ACHTUNG',
 'fwhost back'                  => 'Zurück',
 'fwhost ccdnet'                        => 'OpenVPN Netzwerke:',
 'fwhost change'                        => 'Ändern',
 'fwhost changeremark'  => 'Es wurde nur die Bemerkung angepasst.',
-'fwhost cust addr'             => 'Adressen:',
+'fwhost cust addr'             => 'Hosts:',
 'fwhost cust grp'              => 'Gruppen:',
 'fwhost cust net'              => 'Netzwerke:',
 'fwhost cust service'  => 'Dienste:',
 'fwhost ipsec host'            => 'IPsec Clients:',
 'fwhost ipsec net'             => 'IPsec Netzwerke:',
 'fwhost netaddress'            => 'Netzwerk Adresse',
-'fwhost newnet'                => 'Netzeinstellungen',
-'fwhost newhost'               => 'Adresseinstellungen',
-'fwhost newgrp'                => 'Adressgruppierung',
-'fwhost newservice'            => 'Diensteinstellungen',
+'fwhost newnet'                => 'Netzwerke',
+'fwhost newhost'               => 'Hosts',
+'fwhost newgrp'                => 'Netzwerk-/ Hostgruppierung',
+'fwhost newservice'            => 'Dienst',
 'fwhost newservicegrp' => 'Dienstgruppierung',
 'fwhost menu'                  => 'Firewallgruppen',
 'fwhost orange'                        => 'Orange',
index 49a3c1ef89ebcb8dc3f047dc151a738eed21f764..c5073276534cd4229305094fac8997859111b54b 100644 (file)
 'fwdfw wd_sat'                 => 'Sat',
 'fwdfw wd_sun'                 => 'Sun',
 'fwdfw xt access'              => 'Access to firewall',
-'fwhost addgrp'                => 'Group:',
+'fwhost addgrp'                => 'Add Network / Host Group:',
 'fwhost addgrpname'            => 'Groupname:',
-'fwhost addhost'               => 'Address:',
-'fwhost addnet'                => 'Network:',
+'fwhost addhost'               => 'Add Host:',
+'fwhost addnet'                => 'Add Network:',
 'fwhost addrule'               => 'Add/Edit rule:',
+'fwhost addservice'            => 'Add Service:',
+'fwhost addservicegrp' => 'Add Service Group:',
 'fwhost any'                   => 'Any',
 'fwhost attention'             => 'ATTENTION',
-'fwhost back'                  => 'back',
+'fwhost back'                  => 'Back',
 'fwhost blue'                  => 'Blue',
 'fwhost ccdhost'               => 'OpenVPN clients:',
 'fwhost ccdnet'                        => 'OpenVPN networks:',
 'fwhost change'                        => 'Modify',
 'fwhost changeremark'  => 'You just modified the remark',
-'fwhost cust addr'             => 'Addresses:',
-'fwhost cust grp'              => 'Groups:',
+'fwhost cust addr'             => 'Hosts:',
+'fwhost cust grp'              => 'Network / Host Groups:',
 'fwhost cust net'              => 'Networks:',
 'fwhost cust service'  => 'Services:',
-'fwhost cust srvgrp'   => 'Servicegroups',
+'fwhost cust srvgrp'   => 'Service groups:',
 'fwhost deleted'               => 'Deleted',
 'fwhost empty'                 => 'No rules defined',
 'fwhost err addr'              => 'Invalid IP address or subnet',
 'fwhost ipsec host'            => 'IPsec clients:',
 'fwhost ipsec net'             => 'IPsec networks:',
 'fwhost netaddress'            => 'Network address',
-'fwhost newnet'                => 'Network',
-'fwhost newhost'               => 'Host',
-'fwhost newgrp'                => 'Address grouping',
-'fwhost newservice'            => 'Service',
-'fwhost newservicegrp' => 'Service grouping',
+'fwhost newnet'                => 'Networks',
+'fwhost newhost'               => 'Hosts',
+'fwhost newgrp'                => 'Network / Host Groups',
+'fwhost newservice'            => 'Services',
+'fwhost newservicegrp' => 'Service Groups',
 'fwhost menu'                  => 'Firewall Groups',
 'fwhost orange'                        => 'Orange',
 'fwhost ovpn_n2n'              => 'OpenVPN Net-to-Net',
 'fwhost prot'                  => 'Protocol',
 'fwhost reread'                        => 'Firewall rules need to be updated.',
 'fwhost reset'                 => 'Cancel',
-'fwhost services'              => 'Services',
+'fwhost services'              => 'Services:',
 'fwhost srv_name'              => 'Servicename',
 'fwhost stdnet'                        => 'Standard networks:',
 'fwhost type'                  => 'Type',