Revision ff01cbff
Added by Vinicius Coque almost 15 years ago
usr/local/www/firewall_nat_out.php | ||
---|---|---|
108 | 108 |
$natent = array(); |
109 | 109 |
$natent['source']['network'] = "{$osn}/{$ossubnet}"; |
110 | 110 |
$natent['dstport'] = "500"; |
111 |
$natent['descr'] = "Auto created rule for ISAKMP - {$ifdesc} to {$ifdesc2}";
|
|
111 |
$natent['descr'] = sprintf(gettext("Auto created rule for ISAKMP - %s to %s"),$ifdesc,$ifdesc2);
|
|
112 | 112 |
$natent['target'] = ""; |
113 | 113 |
$natent['interface'] = $if2; |
114 | 114 |
$natent['destination']['any'] = true; |
... | ... | |
118 | 118 |
$natent = array(); |
119 | 119 |
$natent['source']['network'] = "{$osn}/{$ossubnet}"; |
120 | 120 |
$natent['dstport'] = "5060"; |
121 |
$natent['descr'] = "Auto created rule for SIP - {$ifdesc} to {$ifdesc2}";
|
|
121 |
$natent['descr'] = sprintf(gettext("Auto created rule for SIP - %s to %s"),$ifdesc,$ifdesc2);
|
|
122 | 122 |
$natent['target'] = ""; |
123 | 123 |
$natent['interface'] = $if2; |
124 | 124 |
$natent['destination']['any'] = true; |
... | ... | |
128 | 128 |
$natent = array(); |
129 | 129 |
$natent['source']['network'] = "{$osn}/{$ossubnet}"; |
130 | 130 |
$natent['sourceport'] = ""; |
131 |
$natent['descr'] = "Auto created rule for {$ifdesc} to {$ifdesc2}";
|
|
131 |
$natent['descr'] = sprintf(gettext("Auto created rule for %s to %s"),$ifdesc,$ifdesc2);
|
|
132 | 132 |
$natent['target'] = ""; |
133 | 133 |
$natent['interface'] = $if2; |
134 | 134 |
$natent['destination']['any'] = true; |
... | ... | |
146 | 146 |
$natent = array(); |
147 | 147 |
$natent['source']['network'] = "{$osn}/{$ossubnet}"; |
148 | 148 |
$natent['sourceport'] = ""; |
149 |
$natent['descr'] = "Auto created rule for PPTP server";
|
|
149 |
$natent['descr'] = gettext("Auto created rule for PPTP server");
|
|
150 | 150 |
$natent['target'] = ""; |
151 | 151 |
$natent['interface'] = $if2; |
152 | 152 |
$natent['destination']['any'] = true; |
... | ... | |
165 | 165 |
$natent = array(); |
166 | 166 |
$natent['source']['network'] = "{$osn}/{$ossubnet}"; |
167 | 167 |
$natent['sourceport'] = ""; |
168 |
$natent['descr'] = "Auto created rule for PPPoE server";
|
|
168 |
$natent['descr'] = gettext("Auto created rule for PPPoE server");
|
|
169 | 169 |
$natent['target'] = ""; |
170 | 170 |
$natent['interface'] = $if2; |
171 | 171 |
$natent['destination']['any'] = true; |
... | ... | |
184 | 184 |
$natent = array(); |
185 | 185 |
$natent['source']['network'] = "{$osn}/{$ossubnet}"; |
186 | 186 |
$natent['sourceport'] = ""; |
187 |
$natent['descr'] = "Auto created rule for L2TP server";
|
|
187 |
$natent['descr'] = gettext("Auto created rule for L2TP server");
|
|
188 | 188 |
$natent['target'] = ""; |
189 | 189 |
$natent['interface'] = $if2; |
190 | 190 |
$natent['destination']['any'] = true; |
... | ... | |
198 | 198 |
$natent = array(); |
199 | 199 |
$natent['source']['network'] = $ovpnsrv['tunnel_network']; |
200 | 200 |
$natent['sourceport'] = ""; |
201 |
$natent['descr'] = "Auto created rule for OpenVPN server";
|
|
201 |
$natent['descr'] = gettext("Auto created rule for OpenVPN server");
|
|
202 | 202 |
$natent['target'] = ""; |
203 | 203 |
$natent['interface'] = $if2; |
204 | 204 |
$natent['destination']['any'] = true; |
... | ... | |
209 | 209 |
} |
210 | 210 |
} |
211 | 211 |
|
212 |
$savemsg = "Default rules for each interface have been created.";
|
|
212 |
$savemsg = gettext("Default rules for each interface have been created.");
|
|
213 | 213 |
} |
214 | 214 |
break; |
215 | 215 |
} |
... | ... | |
280 | 280 |
} |
281 | 281 |
|
282 | 282 |
|
283 |
$pgtitle = array("Firewall","NAT","Outbound");
|
|
283 |
$pgtitle = array(gettext("Firewall"),gettext("NAT"),gettext("Outbound"));
|
|
284 | 284 |
include("head.inc"); |
285 | 285 |
|
286 | 286 |
?> |
... | ... | |
291 | 291 |
</script> |
292 | 292 |
<?php if ($savemsg) print_info_box($savemsg); ?> |
293 | 293 |
<?php if (is_subsystem_dirty('natconf')): ?><p> |
294 |
<?php print_info_box_np("The NAT configuration has been changed.<br>You must apply the changes in order for them to take effect.");?><br>
|
|
294 |
<?php print_info_box_np(gettext("The NAT configuration has been changed.<br>You must apply the changes in order for them to take effect."));?><br>
|
|
295 | 295 |
<?php endif; ?> |
296 | 296 |
<table width="100%" border="0" cellpadding="0" cellspacing="0"> <tr><td> |
297 | 297 |
<?php |
298 | 298 |
$tab_array = array(); |
299 |
$tab_array[] = array("Port Forward", false, "firewall_nat.php");
|
|
299 |
$tab_array[] = array(gettext("Port Forward"), false, "firewall_nat.php");
|
|
300 | 300 |
$tab_array[] = array("1:1", false, "firewall_nat_1to1.php"); |
301 |
$tab_array[] = array("Outbound", true, "firewall_nat_out.php");
|
|
301 |
$tab_array[] = array(gettext("Outbound"), true, "firewall_nat_out.php");
|
|
302 | 302 |
display_top_tabs($tab_array); |
303 | 303 |
?> |
304 | 304 |
</td></tr> |
... | ... | |
318 | 318 |
<strong><?=gettext("Manual Outbound NAT rule generation (Advanced Outbound NAT (AON))");?></strong></p></td> |
319 | 319 |
</tr> |
320 | 320 |
<tr> |
321 |
<td> <input name="save" type="submit" class="formbtn" value="Save">
|
|
321 |
<td> <input name="save" type="submit" class="formbtn" value="<?=gettext("Save");?>">
|
|
322 | 322 |
</td> |
323 | 323 |
</tr> |
324 | 324 |
<tr> |
325 | 325 |
<td colspan="2"><p><span class="vexpl"><span class="red"><strong>Note:<br> |
326 |
</strong></span>If advanced outbound NAT is enabled, no outbound NAT
|
|
327 |
rules will be automatically generated any longer. Instead, only the mappings
|
|
328 |
you specify below will be used. With advanced outbound NAT disabled,
|
|
329 |
a mapping is automatically created for each interface's subnet
|
|
330 |
(except WAN). If you use target addresses other than the WAN interface's
|
|
331 |
IP address, then depending on the way your WAN connection is setup, you
|
|
332 |
may also need a <a href="firewall_virtual_ip.php">Virtual IP</a>.</span><br>
|
|
326 |
</strong></span><?=gettext("If advanced outbound NAT is enabled, no outbound NAT ".
|
|
327 |
"rules will be automatically generated any longer. Instead, only the mappings ".
|
|
328 |
"you specify below will be used. With advanced outbound NAT disabled, ".
|
|
329 |
"a mapping is automatically created for each interface's subnet ".
|
|
330 |
"(except WAN). If you use target addresses other than the WAN interface's ".
|
|
331 |
"IP address, then depending on the way your WAN connection is setup, you ".
|
|
332 |
"may also need a ");?><a href="firewall_virtual_ip.php"><?=gettext("Virtual IP");?></a>.</span><br>
|
|
333 | 333 |
<br> |
334 |
You may enter your own mappings below.</p>
|
|
334 |
<?=gettext("You may enter your own mappings below.");?></p>
|
|
335 | 335 |
</td> |
336 | 336 |
</tr> |
337 | 337 |
</table> |
... | ... | |
339 | 339 |
<tr id="frheader"> |
340 | 340 |
<td width="3%" class="list"> </td> |
341 | 341 |
<td width="3%" class="list"> </td> |
342 |
<td width="10%" class="listhdrr">Interface</td>
|
|
343 |
<td width="15%" class="listhdrr">Source</td>
|
|
344 |
<td width="10%" class="listhdrr">Source Port</td>
|
|
345 |
<td width="15%" class="listhdrr">Destination</td>
|
|
346 |
<td width="10%" class="listhdrr">Destination Port</td>
|
|
347 |
<td width="15%" class="listhdrr">NAT Address</td>
|
|
348 |
<td width="10%" class="listhdrr">NAT Port</td>
|
|
349 |
<td width="10%" class="listhdrr">Static Port</td>
|
|
350 |
<td width="25%" class="listhdr">Description</td>
|
|
342 |
<td width="10%" class="listhdrr"><?=gettext("Interface");?></td>
|
|
343 |
<td width="15%" class="listhdrr"><?=gettext("Source");?></td>
|
|
344 |
<td width="10%" class="listhdrr"><?=gettext("Source Port");?></td>
|
|
345 |
<td width="15%" class="listhdrr"><?=gettext("Destination");?></td>
|
|
346 |
<td width="10%" class="listhdrr"><?=gettext("Destination Port");?></td>
|
|
347 |
<td width="15%" class="listhdrr"><?=gettext("NAT Address");?></td>
|
|
348 |
<td width="10%" class="listhdrr"><?=gettext("NAT Port");?></td>
|
|
349 |
<td width="10%" class="listhdrr"><?=gettext("Static Port");?></td>
|
|
350 |
<td width="25%" class="listhdr"><?=gettext("Description");?></td>
|
|
351 | 351 |
<td width="5%" class="list"> |
352 | 352 |
<table border="0" cellspacing="0" cellpadding="1"> |
353 | 353 |
<tr> |
354 | 354 |
<td width="17"></td> |
355 |
<td><a href="firewall_nat_out_edit.php"><img src="/themes/<?= $g['theme']; ?>/images/icons/icon_plus.gif" width="17" height="17" border="0" title="add new mapping"></a></td>
|
|
355 |
<td><a href="firewall_nat_out_edit.php"><img src="/themes/<?= $g['theme']; ?>/images/icons/icon_plus.gif" width="17" height="17" border="0" title="<?=gettext("add new mapping");?>"></a></td>
|
|
356 | 356 |
</tr> |
357 | 357 |
</table> |
358 | 358 |
</td> |
... | ... | |
423 | 423 |
<td class="listr" onClick="fr_toggle(<?=$nnats;?>)" id="frd<?=$nnats;?>" ondblclick="document.location='firewall_nat_out_edit.php?id=<?=$nnats;?>';"> |
424 | 424 |
<?php |
425 | 425 |
if(isset($natent['staticnatport'])) |
426 |
echo "<CENTER>YES</CENTER>";
|
|
426 |
echo "<CENTER>" . gettext("YES") . "</CENTER>";
|
|
427 | 427 |
else |
428 |
echo "<CENTER>NO</CENTER>";
|
|
428 |
echo "<CENTER>" . gettext("NO") . "</CENTER>";
|
|
429 | 429 |
?> |
430 | 430 |
</td> |
431 | 431 |
<td class="listbg" onClick="fr_toggle(<?=$nnats;?>)" ondblclick="document.location='firewall_nat_out_edit.php?id=<?=$nnats;?>';"> |
... | ... | |
434 | 434 |
<td class="list" valign="middle" nowrap> |
435 | 435 |
<table border="0" cellspacing="0" cellpadding="1"> |
436 | 436 |
<tr> |
437 |
<td><a href="firewall_nat_out_edit.php?id=<?=$i;?>"><img src="/themes/<?= $g['theme']; ?>/images/icons/icon_e.gif" width="17" height="17" border="0" title="edit mapping"></a></td>
|
|
437 |
<td><a href="firewall_nat_out_edit.php?id=<?=$i;?>"><img src="/themes/<?= $g['theme']; ?>/images/icons/icon_e.gif" width="17" height="17" border="0" title="<?=gettext("edit mapping");?>"></a></td>
|
|
438 | 438 |
</tr> |
439 | 439 |
<tr> |
440 |
<td><input onmouseover="fr_insline(<?=$nnats;?>, true)" onmouseout="fr_insline(<?=$nnats;?>, false)" name="move_<?=$i;?>" src="/themes/<?= $g['theme']; ?>/images/icons/icon_left.gif" title="move selected rules before this rule" height="17" type="image" width="17" border="0"></td>
|
|
441 |
<td><a href="firewall_nat_out_edit.php?dup=<?=$i;?>"><img src="/themes/<?= $g['theme']; ?>/images/icons/icon_plus.gif" title="add a new nat based on this one" width="17" height="17" border="0"></a></td>
|
|
440 |
<td><input onmouseover="fr_insline(<?=$nnats;?>, true)" onmouseout="fr_insline(<?=$nnats;?>, false)" name="move_<?=$i;?>" src="/themes/<?= $g['theme']; ?>/images/icons/icon_left.gif" title="<?=gettext("move selected rules before this rule");?>" height="17" type="image" width="17" border="0"></td>
|
|
441 |
<td><a href="firewall_nat_out_edit.php?dup=<?=$i;?>"><img src="/themes/<?= $g['theme']; ?>/images/icons/icon_plus.gif" title="<?=gettext("add a new nat based on this one");?>" width="17" height="17" border="0"></a></td>
|
|
442 | 442 |
</tr> |
443 | 443 |
</table> |
444 | 444 |
<?php $i++; $nnats++; endforeach; ?> |
... | ... | |
447 | 447 |
<td class="list" valign="middle" nowrap> |
448 | 448 |
<table border="0" cellspacing="0" cellpadding="1"> |
449 | 449 |
<tr> |
450 |
<td><?php if ($nnats == 0): ?><img src="/themes/<?= $g['theme']; ?>/images/icons/icon_left_d.gif" width="17" height="17" title="move selected mappings to end" border="0"><?php else: ?><input name="move_<?=$i;?>" type="image" src="/themes/<?= $g['theme']; ?>/images/icons/icon_left.gif" width="17" height="17" title="move selected mappings to end" border="0"><?php endif; ?></td>
|
|
451 |
<td><a href="firewall_nat_out_edit.php"><img src="/themes/<?= $g['theme']; ?>/images/icons/icon_plus.gif" width="17" height="17" border="0" title="add new mapping"></a></td>
|
|
450 |
<td><?php if ($nnats == 0): ?><img src="/themes/<?= $g['theme']; ?>/images/icons/icon_left_d.gif" width="17" height="17" title="<?=gettext("move selected mappings to end");?>" border="0"><?php else: ?><input name="move_<?=$i;?>" type="image" src="/themes/<?= $g['theme']; ?>/images/icons/icon_left.gif" width="17" height="17" title="<?=gettext("move selected mappings to end");?>" border="0"><?php endif; ?></td>
|
|
451 |
<td><a href="firewall_nat_out_edit.php"><img src="/themes/<?= $g['theme']; ?>/images/icons/icon_plus.gif" width="17" height="17" border="0" title="<?=gettext("add new mapping");?>"></a></td>
|
|
452 | 452 |
</tr> |
453 | 453 |
<tr> |
454 |
<td><?php if ($nnats == 0): ?><img src="/themes/<?= $g['theme']; ?>/images/icons/icon_x_d.gif" width="17" height="17" title="delete selected rules" border="0"><?php else: ?><input name="del" type="image" src="/themes/<?= $g['theme']; ?>/images/icons/icon_x.gif" width="17" height="17" title="delete selected mappings" onclick="return confirm('Do you really want to delete the selected mappings?')"><?php endif; ?></td>
|
|
454 |
<td><?php if ($nnats == 0): ?><img src="/themes/<?= $g['theme']; ?>/images/icons/icon_x_d.gif" width="17" height="17" title="<?=gettext("delete selected rules");?>" border="0"><?php else: ?><input name="del" type="image" src="/themes/<?= $g['theme']; ?>/images/icons/icon_x.gif" width="17" height="17" title="<?=gettext("delete selected mappings");?>" onclick="return confirm('<?=gettext("Do you really want to delete the selected mappings?");?>')"><?php endif; ?></td>
|
|
455 | 455 |
</tr> |
456 | 456 |
</table></td> |
457 | 457 |
</tr> |
Also available in: Unified diff
Implement gettext() calls on firewall_nat_out.php