Projet

Général

Profil

« Précédent | Suivant » 

Révision 0d0c01ca

Ajouté par jim-p il y a presque 10 ans

Add (self) keyword for specifying "any IP address on this firewall" as a rule choice.

Voir les différences:

etc/inc/filter.inc
2136 2136
						$lansn = $FilterIflist['lan']['snv6'];
2137 2137
						$src = "{$lansa}/{$lansn}";
2138 2138
						break;
2139
					case '(self)':
2140
						$src = "(self)";
2141
						break;
2139 2142
					case 'pptp':
2140 2143
						$pptpsav6 = gen_subnetv6($FilterIflist['pptp']['sav6'], $FilterIflist['pptp']['snv6']);
2141 2144
						$pptpsnv6 = $FilterIflist['pptp']['snv6'];
......
2172 2175
						$lansn = $FilterIflist['lan']['sn'];
2173 2176
						$src = "{$lansa}/{$lansn}";
2174 2177
						break;
2178
					case '(self)':
2179
						$src = "(self)";
2180
						break;
2175 2181
					case 'pptp':
2176 2182
						if (isset($config['pptpd']['n_pptp_units']) && is_numeric($config['pptpd']['n_pptp_units']))
2177 2183
							$pptp_subnets = ip_range_to_subnet_array($config['pptpd']['remoteip'], long2ip32(ip2long($config['pptpd']['remoteip'])+($config['pptpd']['n_pptp_units']-1)));
usr/local/www/firewall_rules_edit.php
91 91
	);
92 92
}
93 93

  
94
$specialsrcdst = explode(" ", "any pptp pppoe l2tp openvpn");
94
$specialsrcdst = explode(" ", "any (self) pptp pppoe l2tp openvpn");
95 95
$ifdisp = get_configured_interface_with_descr();
96 96
foreach ($ifdisp as $kif => $kdescr) {
97 97
	$specialsrcdst[] = "{$kif}";
......
1048 1048
						?>
1049 1049
								> <?=gettext("Single host or alias");?></option>
1050 1050
								<option value="network" <?php if (!$sel) echo "selected=\"selected\""; ?>><?=gettext("Network");?></option>
1051
								<?PHP	if (isset($a_filter[$id]['floating']) || $if == "FloatingRules"): ?>
1052
								<option value="(self)" <?PHP if ($pconfig['src'] == "(self)") echo "selected=\"selected\""; ?>><?=gettext("This Firewall (self)");?></option>
1053
								<?PHP endif;?>
1051 1054
								<?php if(have_ruleint_access("pptp")): ?>
1052 1055
								<option value="pptp"    <?php if ($pconfig['src'] == "pptp") { echo "selected=\"selected\""; } ?>><?=gettext("PPTP clients");?></option>
1053 1056
								<?php endif; ?>
......
1148 1151
								?>
1149 1152
								><?=gettext("Single host or alias");?></option>
1150 1153
								<option value="network" <?php if (!$sel) echo "selected=\"selected\""; ?>><?=gettext("Network");?></option>
1154
								<option value="(self)" <?PHP if ($pconfig['dst'] == "(self)") echo "selected=\"selected\""; ?>><?=gettext("This Firewall (self)");?></option>
1151 1155
								<?php if(have_ruleint_access("pptp")): ?>
1152 1156
								<option value="pptp" <?php if ($pconfig['dst'] == "pptp") { echo "selected=\"selected\""; } ?>><?=gettext("PPTP clients");?></option>
1153 1157
								<?php endif; ?>
usr/local/www/guiconfig.inc
231 231
/* TCP flags */
232 232
$tcpflags = array("fin", "syn", "rst", "psh", "ack", "urg", "ece", "cwr");
233 233

  
234
$specialnets = array("pptp" => "PPTP clients", "pppoe" => "PPPoE clients", "l2tp" => "L2TP clients");
234
$specialnets = array("(self)" => "This Firewall", "pptp" => "PPTP clients", "pppoe" => "PPPoE clients", "l2tp" => "L2TP clients");
235 235

  
236 236
$spiflist = get_configured_interface_with_descr(false, true);
237 237
foreach ($spiflist as $ifgui => $ifdesc) {

Formats disponibles : Unified diff