Revision 4143e7fb
Added by Colin Fleming over 12 years ago
usr/local/www/firewall_rules_edit.php | ||
---|---|---|
693 | 693 |
<?php if ($input_errors) print_input_errors($input_errors); ?> |
694 | 694 |
|
695 | 695 |
<form action="firewall_rules_edit.php" method="post" name="iform" id="iform"> |
696 |
<input type='hidden' name="ruleid" value="<?=(isset($pconfig['ruleid'])&&$pconfig['ruleid']>0)?htmlspecialchars($pconfig['ruleid']):''?>"> |
|
696 |
<input type='hidden' name="ruleid" value="<?=(isset($pconfig['ruleid'])&&$pconfig['ruleid']>0)?htmlspecialchars($pconfig['ruleid']):''?>" />
|
|
697 | 697 |
|
698 |
<table width="100%" border="0" cellpadding="6" cellspacing="0"> |
|
698 |
<table width="100%" border="0" cellpadding="6" cellspacing="0" summary="firewall rules edit">
|
|
699 | 699 |
<tr> |
700 | 700 |
<td colspan="2" valign="top" class="listtopic"><?=gettext("Edit Firewall rule");?></td> |
701 | 701 |
</tr> |
... | ... | |
708 | 708 |
<td width="78%" class="vtable"> |
709 | 709 |
<select name="type" class="formselect"> |
710 | 710 |
<?php $types = explode(" ", "Pass Block Reject"); foreach ($types as $type): ?> |
711 |
<option value="<?=strtolower($type);?>" <?php if (strtolower($type) == strtolower($pconfig['type'])) echo "selected"; ?>> |
|
711 |
<option value="<?=strtolower($type);?>" <?php if (strtolower($type) == strtolower($pconfig['type'])) echo "selected=\"selected\""; ?>>
|
|
712 | 712 |
<?=htmlspecialchars($type);?> |
713 | 713 |
</option> |
714 | 714 |
<?php endforeach; ?> |
715 | 715 |
<?php if ($if == "FloatingRules" || isset($pconfig['floating'])): ?> |
716 |
<option value="match" <?php if ("match" == strtolower($pconfig['type'])) echo "selected"; ?>>Match</option> |
|
716 |
<option value="match" <?php if ("match" == strtolower($pconfig['type'])) echo "selected=\"selected\""; ?>>Match</option>
|
|
717 | 717 |
<?php endif; ?> |
718 | 718 |
</select> |
719 | 719 |
<br/> |
... | ... | |
726 | 726 |
<tr> |
727 | 727 |
<td width="22%" valign="top" class="vncellreq"><?=gettext("Disabled");?></td> |
728 | 728 |
<td width="78%" class="vtable"> |
729 |
<input name="disabled" type="checkbox" id="disabled" value="yes" <?php if ($pconfig['disabled']) echo "checked"; ?>>
|
|
729 |
<input name="disabled" type="checkbox" id="disabled" value="yes" <?php if ($pconfig['disabled']) echo "checked=\"checked\""; ?> />
|
|
730 | 730 |
<strong><?=gettext("Disable this rule");?></strong><br /> |
731 | 731 |
<span class="vexpl"><?=gettext("Set this option to disable this rule without removing it from the list.");?></span> |
732 | 732 |
</td> |
... | ... | |
756 | 756 |
if (is_array($config['nat']['rule'])) { |
757 | 757 |
foreach( $config['nat']['rule'] as $index => $nat_rule ) { |
758 | 758 |
if( isset($nat_rule['associated-rule-id']) && $nat_rule['associated-rule-id']==$pconfig['associated-rule-id'] ) { |
759 |
echo "<a href=\"firewall_nat_edit.php?id={$index}\">" . gettext("View the NAT rule") . "</a><br>"; |
|
759 |
echo "<a href=\"firewall_nat_edit.php?id={$index}\">" . gettext("View the NAT rule") . "</a><br/>";
|
|
760 | 760 |
break; |
761 | 761 |
} |
762 | 762 |
} |
763 | 763 |
} |
764 |
echo "<input name='associated-rule-id' id='associated-rule-id' type='hidden' value='{$pconfig['associated-rule-id']}' >"; |
|
764 |
echo "<input name='associated-rule-id' id='associated-rule-id' type='hidden' value='{$pconfig['associated-rule-id']}' />";
|
|
765 | 765 |
if (!empty($pconfig['interface'])) |
766 |
echo "<input name='interface' id='interface' type='hidden' value='{$pconfig['interface']}' >"; |
|
766 |
echo "<input name='interface' id='interface' type='hidden' value='{$pconfig['interface']}' />";
|
|
767 | 767 |
?> |
768 | 768 |
<script type="text/javascript"> |
769 | 769 |
editenabled = 0; |
... | ... | |
775 | 775 |
<td width="22%" valign="top" class="vncellreq"><?=gettext("Interface");?></td> |
776 | 776 |
<td width="78%" class="vtable"> |
777 | 777 |
<?php if ($if == "FloatingRules" || isset($pconfig['floating'])): ?> |
778 |
<select name="interface[]" title="Select interfaces..." multiple style="width:350px;" class="chzn-select" tabindex="2" <?=$edit_disabled;?>> |
|
778 |
<select name="interface[]" title="Select interfaces..." multiple="multiple" style="width:350px;" class="chzn-select" tabindex="2" <?=$edit_disabled;?>>
|
|
779 | 779 |
<?php else: ?> |
780 | 780 |
<select name="interface" class="formselect" <?=$edit_disabled;?>> |
781 | 781 |
<?php |
... | ... | |
811 | 811 |
$pconfig['interface'] = implode(",", $pconfig['interface']); |
812 | 812 |
$selected_interfaces = explode(",", $pconfig['interface']); |
813 | 813 |
foreach ($interfaces as $iface => $ifacename): ?> |
814 |
<option value="<?=$iface;?>" <?php if ($pconfig['interface'] <> "" && ( strcasecmp($pconfig['interface'], $iface) == 0 || in_array($iface, $selected_interfaces) )) echo "selected"; ?>><?=$ifacename?></option> |
|
814 |
<option value="<?=$iface;?>" <?php if ($pconfig['interface'] <> "" && ( strcasecmp($pconfig['interface'], $iface) == 0 || in_array($iface, $selected_interfaces) )) echo "selected=\"selected\""; ?>><?=$ifacename?></option>
|
|
815 | 815 |
<?php endforeach; ?> |
816 | 816 |
</select> |
817 | 817 |
<br /> |
... | ... | |
834 | 834 |
><?=$direction;?></option> |
835 | 835 |
<?php endforeach; ?> |
836 | 836 |
</select> |
837 |
<input type="hidden" id="floating" name="floating" value="floating"> |
|
837 |
<input type="hidden" id="floating" name="floating" value="floating" />
|
|
838 | 838 |
</td> |
839 | 839 |
<tr> |
840 | 840 |
<?php endif; ?> |
... | ... | |
861 | 861 |
<?php |
862 | 862 |
$protocols = explode(" ", "TCP UDP TCP/UDP ICMP ESP AH GRE IGMP OSPF any carp pfsync"); |
863 | 863 |
foreach ($protocols as $proto): ?> |
864 |
<option value="<?=strtolower($proto);?>" <?php if (strtolower($proto) == $pconfig['proto']) echo "selected"; ?>><?=htmlspecialchars($proto);?></option> |
|
864 |
<option value="<?=strtolower($proto);?>" <?php if (strtolower($proto) == $pconfig['proto']) echo "selected=\"selected\""; ?>><?=htmlspecialchars($proto);?></option>
|
|
865 | 865 |
<?php endforeach; ?> |
866 | 866 |
</select> |
867 | 867 |
<br /> |
868 | 868 |
<span class="vexpl"><?=gettext("Choose which IP protocol this rule should match.");?> <br /> <?=gettext("Hint: in most cases, you should specify ");?><em>TCP</em> <?=gettext("here.");?></span> |
869 | 869 |
</td> |
870 | 870 |
</tr> |
871 |
<tr id="icmpbox" name="icmpbox">
|
|
871 |
<tr id="icmpbox"> |
|
872 | 872 |
<td valign="top" class="vncell"><?=gettext("ICMP type");?></td> |
873 | 873 |
<td class="vtable"> |
874 | 874 |
<select <?=$edit_disabled;?> name="icmptype" class="formselect"> |
... | ... | |
894 | 894 |
); |
895 | 895 |
|
896 | 896 |
foreach ($icmptypes as $icmptype => $descr): ?> |
897 |
<option value="<?=$icmptype;?>" <?php if ($icmptype == $pconfig['icmptype']) echo "selected"; ?>><?=htmlspecialchars($descr);?></option> |
|
897 |
<option value="<?=$icmptype;?>" <?php if ($icmptype == $pconfig['icmptype']) echo "selected=\"selected\""; ?>><?=htmlspecialchars($descr);?></option>
|
|
898 | 898 |
<?php endforeach; ?> |
899 | 899 |
</select> |
900 | 900 |
<br /> |
... | ... | |
904 | 904 |
<tr> |
905 | 905 |
<td width="22%" valign="top" class="vncellreq"><?=gettext("Source");?></td> |
906 | 906 |
<td width="78%" class="vtable"> |
907 |
<input <?=$edit_disabled;?> name="srcnot" type="checkbox" id="srcnot" value="yes" <?php if ($pconfig['srcnot']) echo "checked"; ?>>
|
|
907 |
<input <?=$edit_disabled;?> name="srcnot" type="checkbox" id="srcnot" value="yes" <?php if ($pconfig['srcnot']) echo "checked=\"checked\""; ?> />
|
|
908 | 908 |
<strong><?=gettext("not");?></strong> |
909 | 909 |
<br /> |
910 | 910 |
<?=gettext("Use this option to invert the sense of the match.");?> |
... | ... | |
914 | 914 |
<tr> |
915 | 915 |
<td><?=gettext("Type:");?> </td> |
916 | 916 |
<td> |
917 |
<select <?=$edit_disabled;?> name="srctype" class="formselect" onChange="typesel_change()">
|
|
917 |
<select <?=$edit_disabled;?> name="srctype" class="formselect" onchange="typesel_change()">
|
|
918 | 918 |
<?php |
919 | 919 |
$sel = is_specialnet($pconfig['src']); ?> |
920 |
<option value="any" <?php if ($pconfig['src'] == "any") { echo "selected"; } ?>><?=gettext("any");?></option> |
|
920 |
<option value="any" <?php if ($pconfig['src'] == "any") { echo "selected=\"selected\""; } ?>><?=gettext("any");?></option>
|
|
921 | 921 |
<option value="single" |
922 | 922 |
<?php if (!$sel && |
923 | 923 |
((is_ipaddrv6($pconfig['src']) && $pconfig['srcmask'] == 128) || |
924 | 924 |
(is_ipaddrv4($pconfig['src']) && $pconfig['srcmask'] == 32) || is_alias($pconfig['src']))) |
925 |
{ echo "selected"; $sel = 1; } |
|
925 |
{ echo "selected=\"selected\""; $sel = 1; }
|
|
926 | 926 |
?> |
927 | 927 |
> <?=gettext("Single host or alias");?></option> |
928 |
<option value="network" <?php if (!$sel) echo "selected"; ?>><?=gettext("Network");?></option> |
|
928 |
<option value="network" <?php if (!$sel) echo "selected=\"selected\""; ?>><?=gettext("Network");?></option>
|
|
929 | 929 |
<?php if(have_ruleint_access("pptp")): ?> |
930 |
<option value="pptp" <?php if ($pconfig['src'] == "pptp") { echo "selected"; } ?>><?=gettext("PPTP clients");?></option> |
|
930 |
<option value="pptp" <?php if ($pconfig['src'] == "pptp") { echo "selected=\"selected\""; } ?>><?=gettext("PPTP clients");?></option>
|
|
931 | 931 |
<?php endif; ?> |
932 | 932 |
<?php if(have_ruleint_access("pppoe")): ?> |
933 |
<option value="pppoe" <?php if ($pconfig['src'] == "pppoe") { echo "selected"; } ?>><?=gettext("PPPoE clients");?></option> |
|
933 |
<option value="pppoe" <?php if ($pconfig['src'] == "pppoe") { echo "selected=\"selected\""; } ?>><?=gettext("PPPoE clients");?></option>
|
|
934 | 934 |
<?php endif; ?> |
935 | 935 |
<?php if(have_ruleint_access("l2tp")): ?> |
936 |
<option value="l2tp" <?php if ($pconfig['src'] == "l2tp") { echo "selected"; } ?>><?=gettext("L2TP clients");?></option> |
|
936 |
<option value="l2tp" <?php if ($pconfig['src'] == "l2tp") { echo "selected=\"selected\""; } ?>><?=gettext("L2TP clients");?></option>
|
|
937 | 937 |
<?php endif; ?> |
938 | 938 |
<?php |
939 | 939 |
foreach ($ifdisp as $ifent => $ifdesc): ?> |
940 | 940 |
<?php if(have_ruleint_access($ifent)): ?> |
941 |
<option value="<?=$ifent;?>" <?php if ($pconfig['src'] == $ifent) { echo "selected"; } ?>><?=htmlspecialchars($ifdesc);?><?=gettext(" subnet");?></option> |
|
942 |
<option value="<?=$ifent;?>ip"<?php if ($pconfig['src'] == $ifent . "ip") { echo "selected"; } ?>> |
|
941 |
<option value="<?=$ifent;?>" <?php if ($pconfig['src'] == $ifent) { echo "selected=\"selected\""; } ?>><?=htmlspecialchars($ifdesc);?><?=gettext(" subnet");?></option>
|
|
942 |
<option value="<?=$ifent;?>ip"<?php if ($pconfig['src'] == $ifent . "ip") { echo "selected=\"selected\""; } ?>>
|
|
943 | 943 |
<?=$ifdesc?> <?=gettext("address");?> |
944 | 944 |
</option> |
945 | 945 |
<?php endif; ?> |
... | ... | |
950 | 950 |
<tr> |
951 | 951 |
<td><?=gettext("Address:");?> </td> |
952 | 952 |
<td> |
953 |
<input <?=$edit_disabled;?> autocomplete='off' name="src" type="text" class="formfldalias ipv4v6" id="src" size="20" value="<?php if (!is_specialnet($pconfig['src'])) echo htmlspecialchars($pconfig['src']);?>"> / |
|
953 |
<input <?=$edit_disabled;?> autocomplete='off' name="src" type="text" class="formfldalias ipv4v6" id="src" size="20" value="<?php if (!is_specialnet($pconfig['src'])) echo htmlspecialchars($pconfig['src']);?>" /> /
|
|
954 | 954 |
<select <?=$edit_disabled;?> name="srcmask" class="formselect ipv4v6" id="srcmask"> |
955 | 955 |
<?php for ($i = 127; $i > 0; $i--): ?> |
956 |
<option value="<?=$i;?>" <?php if ($i == $pconfig['srcmask']) echo "selected"; ?>><?=$i;?></option> |
|
956 |
<option value="<?=$i;?>" <?php if ($i == $pconfig['srcmask']) echo "selected=\"selected\""; ?>><?=$i;?></option>
|
|
957 | 957 |
<?php endfor; ?> |
958 | 958 |
</select> |
959 | 959 |
</td> |
... | ... | |
961 | 961 |
</table> |
962 | 962 |
<div id="showadvancedboxspr"> |
963 | 963 |
<p> |
964 |
<input <?=$edit_disabled;?> type="button" onClick="show_source_port_range()" value="<?=gettext("Advanced"); ?>"></input> - <?=gettext("Show source port range");?></a> |
|
964 |
<input <?=$edit_disabled;?> type="button" onclick="show_source_port_range()" value="<?=gettext("Advanced"); ?>" /> - <?=gettext("Show source port range");?> |
|
965 |
</p> |
|
965 | 966 |
</div> |
966 | 967 |
</td> |
967 | 968 |
</tr> |
968 |
<tr style="display:none" id="sprtable" name="sprtable">
|
|
969 |
<tr style="display:none" id="sprtable"> |
|
969 | 970 |
<td width="22%" valign="top" class="vncellreq"><?=gettext("Source port range");?></td> |
970 | 971 |
<td width="78%" class="vtable"> |
971 | 972 |
<table border="0" cellspacing="0" cellpadding="0"> |
... | ... | |
974 | 975 |
<td> |
975 | 976 |
<select <?=$edit_disabled;?> name="srcbeginport" class="formselect" onchange="src_rep_change();ext_change()"> |
976 | 977 |
<option value="">(<?=gettext("other"); ?>)</option> |
977 |
<option value="any" <?php $bfound = 0; if ($pconfig['srcbeginport'] == "any") { echo "selected"; $bfound = 1; } ?>><?=gettext("any");?></option> |
|
978 |
<option value="any" <?php $bfound = 0; if ($pconfig['srcbeginport'] == "any") { echo "selected=\"selected\""; $bfound = 1; } ?>><?=gettext("any");?></option>
|
|
978 | 979 |
<?php foreach ($wkports as $wkport => $wkportdesc): ?> |
979 |
<option value="<?=$wkport;?>" <?php if ($wkport == $pconfig['srcbeginport']) { echo "selected"; $bfound = 1; } ?>><?=htmlspecialchars($wkportdesc);?></option> |
|
980 |
<option value="<?=$wkport;?>" <?php if ($wkport == $pconfig['srcbeginport']) { echo "selected=\"selected\""; $bfound = 1; } ?>><?=htmlspecialchars($wkportdesc);?></option>
|
|
980 | 981 |
<?php endforeach; ?> |
981 | 982 |
</select> |
982 |
<input <?=$edit_disabled;?> autocomplete='off' class="formfldalias" name="srcbeginport_cust" id="srcbeginport_cust" type="text" size="5" value="<?php if (!$bfound && $pconfig['srcbeginport']) echo htmlspecialchars($pconfig['srcbeginport']); ?>"> |
|
983 |
<input <?=$edit_disabled;?> autocomplete='off' class="formfldalias" name="srcbeginport_cust" id="srcbeginport_cust" type="text" size="5" value="<?php if (!$bfound && $pconfig['srcbeginport']) echo htmlspecialchars($pconfig['srcbeginport']); ?>" />
|
|
983 | 984 |
</td> |
984 | 985 |
</tr> |
985 | 986 |
<tr> |
... | ... | |
987 | 988 |
<td> |
988 | 989 |
<select <?=$edit_disabled;?> name="srcendport" class="formselect" onchange="ext_change()"> |
989 | 990 |
<option value="">(<?=gettext("other"); ?>)</option> |
990 |
<option value="any" <?php $bfound = 0; if ($pconfig['srcendport'] == "any") { echo "selected"; $bfound = 1; } ?>><?=gettext("any");?></option> |
|
991 |
<option value="any" <?php $bfound = 0; if ($pconfig['srcendport'] == "any") { echo "selected=\"selected\""; $bfound = 1; } ?>><?=gettext("any");?></option>
|
|
991 | 992 |
<?php foreach ($wkports as $wkport => $wkportdesc): ?> |
992 |
<option value="<?=$wkport;?>" <?php if ($wkport == $pconfig['srcendport']) { echo "selected"; $bfound = 1; } ?>><?=htmlspecialchars($wkportdesc);?></option> |
|
993 |
<option value="<?=$wkport;?>" <?php if ($wkport == $pconfig['srcendport']) { echo "selected=\"selected\""; $bfound = 1; } ?>><?=htmlspecialchars($wkportdesc);?></option>
|
|
993 | 994 |
<?php endforeach; ?> |
994 | 995 |
</select> |
995 |
<input <?=$edit_disabled;?> autocomplete='off' class="formfldalias" name="srcendport_cust" id="srcendport_cust" type="text" size="5" value="<?php if (!$bfound && $pconfig['srcendport']) echo htmlspecialchars($pconfig['srcendport']); ?>"> |
|
996 |
<input <?=$edit_disabled;?> autocomplete='off' class="formfldalias" name="srcendport_cust" id="srcendport_cust" type="text" size="5" value="<?php if (!$bfound && $pconfig['srcendport']) echo htmlspecialchars($pconfig['srcendport']); ?>" />
|
|
996 | 997 |
</td> |
997 | 998 |
</tr> |
998 | 999 |
</table> |
... | ... | |
1003 | 1004 |
<tr> |
1004 | 1005 |
<td width="22%" valign="top" class="vncellreq"><?=gettext("Destination");?></td> |
1005 | 1006 |
<td width="78%" class="vtable"> |
1006 |
<input <?=$edit_disabled;?> name="dstnot" type="checkbox" id="dstnot" value="yes" <?php if ($pconfig['dstnot']) echo "checked"; ?>>
|
|
1007 |
<input <?=$edit_disabled;?> name="dstnot" type="checkbox" id="dstnot" value="yes" <?php if ($pconfig['dstnot']) echo "checked=\"checked\""; ?> />
|
|
1007 | 1008 |
<strong><?=gettext("not");?></strong> |
1008 | 1009 |
<br /> |
1009 | 1010 |
<?=gettext("Use this option to invert the sense of the match.");?> |
... | ... | |
1013 | 1014 |
<tr> |
1014 | 1015 |
<td><?=gettext("Type:");?> </td> |
1015 | 1016 |
<td> |
1016 |
<select <?=$edit_disabled;?> name="dsttype" class="formselect" onChange="typesel_change()">
|
|
1017 |
<select <?=$edit_disabled;?> name="dsttype" class="formselect" onchange="typesel_change()">
|
|
1017 | 1018 |
<?php |
1018 | 1019 |
$sel = is_specialnet($pconfig['dst']); ?> |
1019 |
<option value="any" <?php if ($pconfig['dst'] == "any") { echo "selected"; } ?>><?=gettext("any");?></option> |
|
1020 |
<option value="any" <?php if ($pconfig['dst'] == "any") { echo "selected=\"selected\""; } ?>><?=gettext("any");?></option>
|
|
1020 | 1021 |
<option value="single" |
1021 | 1022 |
<?php if (!$sel && |
1022 | 1023 |
((is_ipaddrv6($pconfig['dst']) && $pconfig['dstmask'] == 128) || |
1023 | 1024 |
(is_ipaddrv4($pconfig['dst']) && $pconfig['dstmask'] == 32) || is_alias($pconfig['dst']))) |
1024 |
{ echo "selected"; $sel = 1; } |
|
1025 |
{ echo "selected=\"selected\""; $sel = 1; }
|
|
1025 | 1026 |
?> |
1026 | 1027 |
><?=gettext("Single host or alias");?></option> |
1027 |
<option value="network" <?php if (!$sel) echo "selected"; ?>><?=gettext("Network");?></option> |
|
1028 |
<option value="network" <?php if (!$sel) echo "selected=\"selected\""; ?>><?=gettext("Network");?></option>
|
|
1028 | 1029 |
<?php if(have_ruleint_access("pptp")): ?> |
1029 |
<option value="pptp" <?php if ($pconfig['dst'] == "pptp") { echo "selected"; } ?>><?=gettext("PPTP clients");?></option> |
|
1030 |
<option value="pptp" <?php if ($pconfig['dst'] == "pptp") { echo "selected=\"selected\""; } ?>><?=gettext("PPTP clients");?></option>
|
|
1030 | 1031 |
<?php endif; ?> |
1031 | 1032 |
<?php if(have_ruleint_access("pppoe")): ?> |
1032 |
<option value="pppoe" <?php if ($pconfig['dst'] == "pppoe") { echo "selected"; } ?>><?=gettext("PPPoE clients");?></option> |
|
1033 |
<option value="pppoe" <?php if ($pconfig['dst'] == "pppoe") { echo "selected=\"selected\""; } ?>><?=gettext("PPPoE clients");?></option>
|
|
1033 | 1034 |
<?php endif; ?> |
1034 | 1035 |
<?php if(have_ruleint_access("l2tp")): ?> |
1035 |
<option value="l2tp" <?php if ($pconfig['dst'] == "l2tp") { echo "selected"; } ?>><?=gettext("L2TP clients");?></option> |
|
1036 |
<option value="l2tp" <?php if ($pconfig['dst'] == "l2tp") { echo "selected=\"selected\""; } ?>><?=gettext("L2TP clients");?></option>
|
|
1036 | 1037 |
<?php endif; ?> |
1037 | 1038 |
|
1038 | 1039 |
<?php foreach ($ifdisp as $if => $ifdesc): ?> |
1039 | 1040 |
<?php if(have_ruleint_access($if)): ?> |
1040 |
<option value="<?=$if;?>" <?php if ($pconfig['dst'] == $if) { echo "selected"; } ?>><?=htmlspecialchars($ifdesc);?> <?=gettext("subnet");?></option> |
|
1041 |
<option value="<?=$if;?>ip"<?php if ($pconfig['dst'] == $if . "ip") { echo "selected"; } ?>> |
|
1041 |
<option value="<?=$if;?>" <?php if ($pconfig['dst'] == $if) { echo "selected=\"selected\""; } ?>><?=htmlspecialchars($ifdesc);?> <?=gettext("subnet");?></option>
|
|
1042 |
<option value="<?=$if;?>ip"<?php if ($pconfig['dst'] == $if . "ip") { echo "selected=\"selected\""; } ?>>
|
|
1042 | 1043 |
<?=$ifdesc;?> <?=gettext("address");?> |
1043 | 1044 |
</option> |
1044 | 1045 |
<?php endif; ?> |
... | ... | |
1049 | 1050 |
<tr> |
1050 | 1051 |
<td><?=gettext("Address:");?> </td> |
1051 | 1052 |
<td> |
1052 |
<input <?=$edit_disabled;?> autocomplete='off' name="dst" type="text" class="formfldalias ipv4v6" id="dst" size="20" value="<?php if (!is_specialnet($pconfig['dst'])) echo htmlspecialchars($pconfig['dst']);?>"> |
|
1053 |
<input <?=$edit_disabled;?> autocomplete='off' name="dst" type="text" class="formfldalias ipv4v6" id="dst" size="20" value="<?php if (!is_specialnet($pconfig['dst'])) echo htmlspecialchars($pconfig['dst']);?>" />
|
|
1053 | 1054 |
/ |
1054 | 1055 |
<select <?=$edit_disabled;?> name="dstmask" class="formselect ipv4v6" id="dstmask"> |
1055 | 1056 |
<?php |
1056 | 1057 |
for ($i = 127; $i > 0; |
1057 | 1058 |
$i--): ?> |
1058 |
<option value="<?=$i;?>" <?php if ($i == $pconfig['dstmask']) echo "selected"; ?>><?=$i;?></option> |
|
1059 |
<option value="<?=$i;?>" <?php if ($i == $pconfig['dstmask']) echo "selected=\"selected\""; ?>><?=$i;?></option>
|
|
1059 | 1060 |
<?php endfor; ?> |
1060 | 1061 |
</select> |
1061 | 1062 |
</td> |
... | ... | |
1063 | 1064 |
</table> |
1064 | 1065 |
</td> |
1065 | 1066 |
</tr> |
1066 |
<tr id="dprtr" name="dprtr">
|
|
1067 |
<tr id="dprtr"> |
|
1067 | 1068 |
<td width="22%" valign="top" class="vncellreq"><?=gettext("Destination port range ");?></td> |
1068 | 1069 |
<td width="78%" class="vtable"> |
1069 | 1070 |
<table border="0" cellspacing="0" cellpadding="0"> |
... | ... | |
1072 | 1073 |
<td> |
1073 | 1074 |
<select <?=$edit_disabled;?> name="dstbeginport" class="formselect" onchange="dst_rep_change();ext_change()"> |
1074 | 1075 |
<option value="">(<?=gettext("other"); ?>)</option> |
1075 |
<option value="any" <?php $bfound = 0; if ($pconfig['dstbeginport'] == "any") { echo "selected"; $bfound = 1; } ?>><?=gettext("any");?></option> |
|
1076 |
<option value="any" <?php $bfound = 0; if ($pconfig['dstbeginport'] == "any") { echo "selected=\"selected\""; $bfound = 1; } ?>><?=gettext("any");?></option>
|
|
1076 | 1077 |
<?php foreach ($wkports as $wkport => $wkportdesc): ?> |
1077 |
<option value="<?=$wkport;?>" <?php if ($wkport == $pconfig['dstbeginport']) { echo "selected"; $bfound = 1; }?>><?=htmlspecialchars($wkportdesc);?></option> |
|
1078 |
<option value="<?=$wkport;?>" <?php if ($wkport == $pconfig['dstbeginport']) { echo "selected=\"selected\""; $bfound = 1; }?>><?=htmlspecialchars($wkportdesc);?></option>
|
|
1078 | 1079 |
<?php endforeach; ?> |
1079 | 1080 |
</select> |
1080 |
<input <?=$edit_disabled;?> autocomplete='off' class="formfldalias" name="dstbeginport_cust" id="dstbeginport_cust" type="text" size="5" value="<?php if (!$bfound && $pconfig['dstbeginport']) echo htmlspecialchars($pconfig['dstbeginport']); ?>"> |
|
1081 |
<input <?=$edit_disabled;?> autocomplete='off' class="formfldalias" name="dstbeginport_cust" id="dstbeginport_cust" type="text" size="5" value="<?php if (!$bfound && $pconfig['dstbeginport']) echo htmlspecialchars($pconfig['dstbeginport']); ?>" />
|
|
1081 | 1082 |
</td> |
1082 | 1083 |
</tr> |
1083 | 1084 |
<tr> |
... | ... | |
1085 | 1086 |
<td> |
1086 | 1087 |
<select <?=$edit_disabled;?> name="dstendport" class="formselect" onchange="ext_change()"> |
1087 | 1088 |
<option value="">(<?=gettext("other"); ?>)</option> |
1088 |
<option value="any" <?php $bfound = 0; if ($pconfig['dstendport'] == "any") { echo "selected"; $bfound = 1; } ?>><?=gettext("any");?></option> |
|
1089 |
<option value="any" <?php $bfound = 0; if ($pconfig['dstendport'] == "any") { echo "selected=\"selected\""; $bfound = 1; } ?>><?=gettext("any");?></option>
|
|
1089 | 1090 |
<?php foreach ($wkports as $wkport => $wkportdesc): ?> |
1090 |
<option value="<?=$wkport;?>" <?php if ($wkport == $pconfig['dstendport']) { echo "selected"; $bfound = 1; } ?>><?=htmlspecialchars($wkportdesc);?></option> |
|
1091 |
<option value="<?=$wkport;?>" <?php if ($wkport == $pconfig['dstendport']) { echo "selected=\"selected\""; $bfound = 1; } ?>><?=htmlspecialchars($wkportdesc);?></option>
|
|
1091 | 1092 |
<?php endforeach; ?> |
1092 | 1093 |
</select> |
1093 |
<input <?=$edit_disabled;?> autocomplete='off' class="formfldalias" name="dstendport_cust" id="dstendport_cust" type="text" size="5" value="<?php if (!$bfound && $pconfig['dstendport']) echo htmlspecialchars($pconfig['dstendport']); ?>"> |
|
1094 |
<input <?=$edit_disabled;?> autocomplete='off' class="formfldalias" name="dstendport_cust" id="dstendport_cust" type="text" size="5" value="<?php if (!$bfound && $pconfig['dstendport']) echo htmlspecialchars($pconfig['dstendport']); ?>" />
|
|
1094 | 1095 |
</td> |
1095 | 1096 |
</tr> |
1096 | 1097 |
</table> |
... | ... | |
1105 | 1106 |
<tr> |
1106 | 1107 |
<td width="22%" valign="top" class="vncellreq"><?=gettext("Log");?></td> |
1107 | 1108 |
<td width="78%" class="vtable"> |
1108 |
<input name="log" type="checkbox" id="log" value="yes" <?php if ($pconfig['log']) echo "checked"; ?>>
|
|
1109 |
<input name="log" type="checkbox" id="log" value="yes" <?php if ($pconfig['log']) echo "checked=\"checked\""; ?> />
|
|
1109 | 1110 |
<strong><?=gettext("Log packets that are handled by this rule");?></strong> |
1110 | 1111 |
<br /> |
1111 | 1112 |
<span class="vexpl"><?=gettext("Hint: the firewall has limited local log space. Don't turn on logging for everything. If you want to do a lot of logging, consider using a remote syslog server"); ?> (<?=gettext("see the"); ?> <a href="diag_logs_settings.php"><?=gettext("Diagnostics: System logs: Settings"); ?></a> <?=gettext("page"); ?>).</span> |
... | ... | |
1114 | 1115 |
<tr> |
1115 | 1116 |
<td width="22%" valign="top" class="vncell"><?=gettext("Description");?></td> |
1116 | 1117 |
<td width="78%" class="vtable"> |
1117 |
<input name="descr" type="text" class="formfld unknown" id="descr" size="52" maxlength="52" value="<?=htmlspecialchars($pconfig['descr']);?>"> |
|
1118 |
<input name="descr" type="text" class="formfld unknown" id="descr" size="52" maxlength="52" value="<?=htmlspecialchars($pconfig['descr']);?>" />
|
|
1118 | 1119 |
<br /> |
1119 | 1120 |
<span class="vexpl"><?=gettext("You may enter a description here for your reference.");?></span> |
1120 | 1121 |
</td> |
... | ... | |
1123 | 1124 |
<tr> |
1124 | 1125 |
<td width="22%" valign="top"> </td> |
1125 | 1126 |
<td width="78%"> |
1126 |
<br> |
|
1127 |
<input name="Submit" type="submit" class="formbtn" value="<?=gettext("Save"); ?>"> <input type="button" class="formbtn" value="<?=gettext("Cancel"); ?>" onclick="history.back()">
|
|
1127 |
<br/>
|
|
1128 |
<input name="Submit" type="submit" class="formbtn" value="<?=gettext("Save"); ?>" /> <input type="button" class="formbtn" value="<?=gettext("Cancel"); ?>" onclick="history.back()" />
|
|
1128 | 1129 |
<?php if (isset($id) && $a_filter[$id]): ?> |
1129 |
<input name="id" type="hidden" value="<?=htmlspecialchars($id);?>"> |
|
1130 |
<input name="id" type="hidden" value="<?=htmlspecialchars($id);?>" />
|
|
1130 | 1131 |
<?php endif; ?> |
1131 |
<input name="after" type="hidden" value="<?=htmlspecialchars($after);?>"> |
|
1132 |
<input name="after" type="hidden" value="<?=htmlspecialchars($after);?>" />
|
|
1132 | 1133 |
</td> |
1133 | 1134 |
</tr> |
1134 | 1135 |
<?php endif; ?> |
... | ... | |
1142 | 1143 |
<td width="22%" valign="top" class="vncell"><?=gettext("Source OS");?></td> |
1143 | 1144 |
<td width="78%" class="vtable"> |
1144 | 1145 |
<div id="showadvsourceosbox" <?php if ($pconfig['os']) echo "style='display:none'"; ?>> |
1145 |
<input type="button" onClick="show_advanced_sourceos()" value="<?=gettext("Advanced"); ?>"></input> - <?=gettext("Show advanced option");?></a>
|
|
1146 |
<input type="button" onclick="show_advanced_sourceos()" value="<?=gettext("Advanced"); ?>" /> - <?=gettext("Show advanced option");?>
|
|
1146 | 1147 |
</div> |
1147 | 1148 |
<div id="showsourceosadv" <?php if (empty($pconfig['os'])) echo "style='display:none'"; ?>> |
1148 | 1149 |
<?=gettext("OS Type:");?> |
... | ... | |
1162 | 1163 |
"NMAP" => "NMAP" |
1163 | 1164 |
); |
1164 | 1165 |
foreach ($ostypes as $ostype => $descr): ?> |
1165 |
<option value="<?=$ostype;?>" <?php if ($ostype == $pconfig['os']) echo "selected"; ?>><?=htmlspecialchars($descr);?></option> |
|
1166 |
<option value="<?=$ostype;?>" <?php if ($ostype == $pconfig['os']) echo "selected=\"selected\""; ?>><?=htmlspecialchars($descr);?></option>
|
|
1166 | 1167 |
<?php |
1167 | 1168 |
endforeach; |
1168 | 1169 |
?> |
... | ... | |
1175 | 1176 |
<tr> |
1176 | 1177 |
<td width="22%" valign="top" class="vncell"><?=gettext("Diffserv Code Point");?></td> |
1177 | 1178 |
<td width="78%" class="vtable"> |
1178 |
<div id="dsadv" name="dsadv" <?php if ($pconfig['dscp']) echo "style='display:none'"; ?>>
|
|
1179 |
<input type="button" onClick="show_dsdiv();" value="<?=gettext("Advanced"); ?>"> - <?=gettext("Show advanced option");?>
|
|
1179 |
<div id="dsadv" <?php if ($pconfig['dscp']) echo "style='display:none'"; ?>> |
|
1180 |
<input type="button" onclick="show_dsdiv();" value="<?=gettext("Advanced"); ?>" /> - <?=gettext("Show advanced option");?>
|
|
1180 | 1181 |
</div> |
1181 |
<div id="dsdivmain" name="dsdivmain" <?php if (empty($pconfig['dscp'])) echo "style='display:none'"; ?>>
|
|
1182 |
<div id="dsdivmain" <?php if (empty($pconfig['dscp'])) echo "style='display:none'"; ?>> |
|
1182 | 1183 |
<select name="dscp" id="dscp"> |
1183 | 1184 |
<option value=""></option> |
1184 | 1185 |
<?php foreach($firewall_rules_dscp_types as $frdt): ?> |
1185 |
<option value="<?=$frdt?>"<?php if($pconfig['dscp'] == $frdt) echo " SELECTED"; ?>><?=$frdt?></option>
|
|
1186 |
<option value="<?=$frdt?>"<?php if($pconfig['dscp'] == $frdt) echo " selected=\"selected\""; ?>><?=$frdt?></option>
|
|
1186 | 1187 |
<?php endforeach; ?> |
1187 | 1188 |
</select> |
1188 | 1189 |
</div> |
... | ... | |
1191 | 1192 |
<tr> |
1192 | 1193 |
<td width="22%" valign="top" class="vncell"><?=gettext("Advanced Options");?></td> |
1193 | 1194 |
<td width="78%" class="vtable"> |
1194 |
<div id="aoadv" name="aoadv">
|
|
1195 |
<input type="button" onClick="show_aodiv();" value="<?=gettext("Advanced"); ?>"> - <?=gettext("Show advanced option");?>
|
|
1195 |
<div id="aoadv"> |
|
1196 |
<input type="button" onclick="show_aodiv();" value="<?=gettext("Advanced"); ?>" /> - <?=gettext("Show advanced option");?>
|
|
1196 | 1197 |
</div> |
1197 |
<div id="aodivmain" name="aodivmain" style="display:none">
|
|
1198 |
<input type="checkbox" id="allowopts" value="yes" name="allowopts"<?php if($pconfig['allowopts'] == true) echo " checked"; ?>>
|
|
1198 |
<div id="aodivmain" style="display:none"> |
|
1199 |
<input type="checkbox" id="allowopts" value="yes" name="allowopts"<?php if($pconfig['allowopts'] == true) echo " checked=\"checked\""; ?> />
|
|
1199 | 1200 |
<br/><span class="vexpl"><?=gettext("This allows packets with IP options to pass. Otherwise they are blocked by default. This is usually only seen with multicast traffic.");?> |
1200 | 1201 |
</span><p> |
1201 |
<input type="checkbox" id="disablereplyto" value="yes" name="disablereplyto"<?php if($pconfig['disablereplyto'] == true) echo " checked"; ?>>
|
|
1202 |
<input type="checkbox" id="disablereplyto" value="yes" name="disablereplyto"<?php if($pconfig['disablereplyto'] == true) echo " checked=\"checked\""; ?> />
|
|
1202 | 1203 |
<br/><span class="vexpl"><?=gettext("This will disable auto generated reply-to for this rule.");?> |
1203 |
</span><p> |
|
1204 |
<input name="tag" id="tag" value="<?=htmlspecialchars($pconfig['tag']);?>"> |
|
1204 |
</span></p><p>
|
|
1205 |
<input name="tag" id="tag" value="<?=htmlspecialchars($pconfig['tag']);?>" />
|
|
1205 | 1206 |
<br /><span class="vexpl"><?=gettext("You can mark a packet matching this rule and use this mark to match on other NAT/filter rules. It is called"); ?> <b><?=gettext("Policy filtering"); ?></b> |
1206 |
</span><p> |
|
1207 |
<input name="tagged" id="tagged" value="<?=htmlspecialchars($pconfig['tagged']);?>"> |
|
1207 |
</span></p><p>
|
|
1208 |
<input name="tagged" id="tagged" value="<?=htmlspecialchars($pconfig['tagged']);?>" />
|
|
1208 | 1209 |
<br /><span class="vexpl"><?=gettext("You can match packet on a mark placed before on another rule.")?> |
1209 |
</span> <p>
|
|
1210 |
<input name="max" id="max" value="<?php echo htmlspecialchars($pconfig['max']) ?>"><br><?=gettext(" Maximum state entries this rule can create");?></p><p>
|
|
1211 |
<input name="max-src-nodes" id="max-src-nodes" value="<?php echo htmlspecialchars($pconfig['max-src-nodes']) ?>"><br><?=gettext(" Maximum number of unique source hosts");?></p><p>
|
|
1212 |
<input name="max-src-conn" id="max-src-conn" value="<?php echo htmlspecialchars($pconfig['max-src-conn']) ?>"><br><?=gettext(" Maximum number of established connections per host");?></p><p>
|
|
1213 |
<input name="max-src-states" id="max-src-states" value="<?php echo htmlspecialchars($pconfig['max-src-states']) ?>"><br><?=gettext(" Maximum state entries per host");?></p><p>
|
|
1214 |
<input name="max-src-conn-rate" id="max-src-conn-rate" value="<?php echo htmlspecialchars($pconfig['max-src-conn-rate']) ?>"> / |
|
1210 |
</span></p><p>
|
|
1211 |
<input name="max" id="max" value="<?php echo htmlspecialchars($pconfig['max']) ?>" /><br/><?=gettext(" Maximum state entries this rule can create");?></p><p>
|
|
1212 |
<input name="max-src-nodes" id="max-src-nodes" value="<?php echo htmlspecialchars($pconfig['max-src-nodes']) ?>" /><br/><?=gettext(" Maximum number of unique source hosts");?></p><p>
|
|
1213 |
<input name="max-src-conn" id="max-src-conn" value="<?php echo htmlspecialchars($pconfig['max-src-conn']) ?>" /><br/><?=gettext(" Maximum number of established connections per host");?></p><p>
|
|
1214 |
<input name="max-src-states" id="max-src-states" value="<?php echo htmlspecialchars($pconfig['max-src-states']) ?>" /><br/><?=gettext(" Maximum state entries per host");?></p><p>
|
|
1215 |
<input name="max-src-conn-rate" id="max-src-conn-rate" value="<?php echo htmlspecialchars($pconfig['max-src-conn-rate']) ?>" /> /
|
|
1215 | 1216 |
<select name="max-src-conn-rates" id="max-src-conn-rates"> |
1216 |
<option value=""<?php if(intval($pconfig['max-src-conn-rates']) < 1) echo " selected"; ?>></option> |
|
1217 |
<option value=""<?php if(intval($pconfig['max-src-conn-rates']) < 1) echo " selected=\"selected\""; ?>></option>
|
|
1217 | 1218 |
<?php for($x=1; $x<255; $x++) { |
1218 |
if($x == $pconfig['max-src-conn-rates']) $selected = " selected"; else $selected = ""; |
|
1219 |
if($x == $pconfig['max-src-conn-rates']) $selected = " selected=\"selected\""; else $selected = "";
|
|
1219 | 1220 |
echo "<option value=\"{$x}\"{$selected}>{$x}</option>\n"; |
1220 | 1221 |
} ?> |
1221 | 1222 |
</select><br /> |
1222 | 1223 |
<?=gettext("Maximum new connections / per second(s)");?> |
1223 | 1224 |
</p><p> |
1224 |
|
|
1225 |
<input name="statetimeout" value="<?php echo htmlspecialchars($pconfig['statetimeout']) ?>"><br> |
|
1225 |
<input name="statetimeout" value="<?php echo htmlspecialchars($pconfig['statetimeout']) ?>" /><br/> |
|
1226 | 1226 |
<?=gettext("State Timeout in seconds");?> |
1227 | 1227 |
</p> |
1228 |
|
|
1229 | 1228 |
<p><strong><?=gettext("Note: Leave fields blank to disable that feature.");?></strong></p> |
1230 | 1229 |
</div> |
1231 | 1230 |
</td> |
1232 | 1231 |
</tr> |
1233 |
<tr id="tcpflags" name="tcpflags">
|
|
1232 |
<tr id="tcpflags"> |
|
1234 | 1233 |
<td width="22%" valign="top" class="vncell"><?=gettext("TCP flags");?></td> |
1235 | 1234 |
<td width="78%" class="vtable"> |
1236 | 1235 |
<div id="showtcpflagsbox" <?php if ($pconfig['tcpflags_any'] || $pconfig['tcpflags1'] || $pconfig['tcpflags2']) echo "style='display:none'"; ?>> |
1237 |
<input type="button" onClick="show_advanced_tcpflags()" value="<?=gettext("Advanced"); ?>"></input> - <?=gettext("Show advanced option");?></a>
|
|
1236 |
<input type="button" onclick="show_advanced_tcpflags()" value="<?=gettext("Advanced"); ?>" /> - <?=gettext("Show advanced option");?>
|
|
1238 | 1237 |
</div> |
1239 | 1238 |
<div id="showtcpflagsadv" <?php if (empty($pconfig['tcpflags_any']) && empty($pconfig['tcpflags1']) && empty($pconfig['tcpflags2'])) echo "style='display:none'"; ?>> |
1240 |
<div id="tcpheader" name="tcpheader"> |
|
1241 |
<center> |
|
1239 |
<div id="tcpheader" align="center"> |
|
1242 | 1240 |
<table border="0" cellspacing="0" cellpadding="0"> |
1243 | 1241 |
<?php |
1244 | 1242 |
$setflags = explode(",", $pconfig['tcpflags1']); |
1245 | 1243 |
$outofflags = explode(",", $pconfig['tcpflags2']); |
1246 |
$header = "<td width='40' nowrap></td>";
|
|
1247 |
$tcpflags1 = "<td width='40' nowrap>set</td>";
|
|
1248 |
$tcpflags2 = "<td width='40' nowrap>out of</td>";
|
|
1244 |
$header = "<td width='40' class='nowrap'></td>";
|
|
1245 |
$tcpflags1 = "<td width='40' class='nowrap'>set</td>";
|
|
1246 |
$tcpflags2 = "<td width='40' class='nowrap'>out of</td>";
|
|
1249 | 1247 |
foreach ($tcpflags as $tcpflag) { |
1250 |
$header .= "<td width='40' nowrap><strong>" . strtoupper($tcpflag) . "</strong></td>\n";
|
|
1251 |
$tcpflags1 .= "<td width='40' nowrap> <input type='checkbox' name='tcpflags1_{$tcpflag}' value='on' ";
|
|
1248 |
$header .= "<td width='40' class='nowrap'><strong>" . strtoupper($tcpflag) . "</strong></td>\n";
|
|
1249 |
$tcpflags1 .= "<td width='40' class='nowrap'> <input type='checkbox' name='tcpflags1_{$tcpflag}' value='on' ";
|
|
1252 | 1250 |
if (array_search($tcpflag, $setflags) !== false) |
1253 |
$tcpflags1 .= "checked"; |
|
1254 |
$tcpflags1 .= "></td>\n"; |
|
1255 |
$tcpflags2 .= "<td width='40' nowrap> <input type='checkbox' name='tcpflags2_{$tcpflag}' value='on' ";
|
|
1251 |
$tcpflags1 .= "checked=\"checked\"";
|
|
1252 |
$tcpflags1 .= " /></td>\n";
|
|
1253 |
$tcpflags2 .= "<td width='40' class='nowrap'> <input type='checkbox' name='tcpflags2_{$tcpflag}' value='on' ";
|
|
1256 | 1254 |
if (array_search($tcpflag, $outofflags) !== false) |
1257 |
$tcpflags2 .= "checked"; |
|
1258 |
$tcpflags2 .= "></td>\n"; |
|
1255 |
$tcpflags2 .= "checked=\"checked\"";
|
|
1256 |
$tcpflags2 .= " /></td>\n";
|
|
1259 | 1257 |
} |
1260 |
echo "<tr id='tcpheader' name='tcpheader'>{$header}</tr>\n";
|
|
1261 |
echo "<tr id='tcpflags1' name='tcpflags1'>{$tcpflags1}</tr>\n";
|
|
1262 |
echo "<tr id='tcpflags2' name='tcpflags2'>{$tcpflags2}</tr>\n";
|
|
1258 |
echo "<tr id='tcpheader'>{$header}</tr>\n"; |
|
1259 |
echo "<tr id='tcpflags1'>{$tcpflags1}</tr>\n"; |
|
1260 |
echo "<tr id='tcpflags2'>{$tcpflags2}</tr>\n"; |
|
1263 | 1261 |
?> |
1264 | 1262 |
</table> |
1265 |
<center> |
|
1266 | 1263 |
</div> |
1267 | 1264 |
<br/><center> |
1268 |
<input onClick='tcpflags_anyclick(this);' type='checkbox' name='tcpflags_any' value='on' <?php if ($pconfig['tcpflags_any']) echo "checked"; ?>><strong><?=gettext("Any flags.");?></strong><br/></center>
|
|
1265 |
<input onclick='tcpflags_anyclick(this);' type='checkbox' name='tcpflags_any' value='on' <?php if ($pconfig['tcpflags_any']) echo "checked=\"checked\""; ?> /><strong><?=gettext("Any flags.");?></strong><br/></center>
|
|
1269 | 1266 |
<br/> |
1270 | 1267 |
<span class="vexpl"><?=gettext("Use this to choose TCP flags that must ". |
1271 | 1268 |
"be set or cleared for this rule to match.");?></span> |
... | ... | |
1276 | 1273 |
<td width="22%" valign="top" class="vncell"><?=gettext("State Type");?></td> |
1277 | 1274 |
<td width="78%" class="vtable"> |
1278 | 1275 |
<div id="showadvstatebox" <?php if (!empty($pconfig['statetype']) && $pconfig['statetype'] != "keep state") echo "style='display:none'"; ?>> |
1279 |
<input type="button" onClick="show_advanced_state()" value="<?=gettext("Advanced"); ?>"></input> - <?=gettext("Show advanced option");?></a>
|
|
1276 |
<input type="button" onclick="show_advanced_state()" value="<?=gettext("Advanced"); ?>" /> - <?=gettext("Show advanced option");?>
|
|
1280 | 1277 |
</div> |
1281 | 1278 |
<div id="showstateadv" <?php if (empty($pconfig['statetype']) || $pconfig['statetype'] == "keep state") echo "style='display:none'"; ?>> |
1282 | 1279 |
<select name="statetype"> |
1283 |
<option value="keep state" <?php if(!isset($pconfig['statetype']) or $pconfig['statetype'] == "keep state") echo "selected"; ?>><?=gettext("keep state");?></option> |
|
1284 |
<option value="sloppy state" <?php if($pconfig['statetype'] == "sloppy state") echo "selected"; ?>><?=gettext("sloppy state");?></option> |
|
1285 |
<option value="synproxy state"<?php if($pconfig['statetype'] == "synproxy state") echo "selected"; ?>><?=gettext("synproxy state");?></option> |
|
1286 |
<option value="none"<?php if($pconfig['statetype'] == "none") echo "selected"; ?>><?=gettext("none");?></option> |
|
1287 |
</select><br><?=gettext("Hint: Select which type of state tracking mechanism you would like to use. If in doubt, use keep state.");?> |
|
1288 |
<p> |
|
1280 |
<option value="keep state" <?php if(!isset($pconfig['statetype']) or $pconfig['statetype'] == "keep state") echo "selected=\"selected\""; ?>><?=gettext("keep state");?></option> |
|
1281 |
<option value="sloppy state" <?php if($pconfig['statetype'] == "sloppy state") echo "selected=\"selected\""; ?>><?=gettext("sloppy state");?></option> |
|
1282 |
<option value="synproxy state"<?php if($pconfig['statetype'] == "synproxy state") echo "selected=\"selected\""; ?>><?=gettext("synproxy state");?></option> |
|
1283 |
<option value="none"<?php if($pconfig['statetype'] == "none") echo "selected=\"selected\""; ?>><?=gettext("none");?></option> |
|
1284 |
</select><br/><?=gettext("Hint: Select which type of state tracking mechanism you would like to use. If in doubt, use keep state.");?> |
|
1289 | 1285 |
<table width="90%"> |
1290 | 1286 |
<tr><td width="25%"><ul><li><?=gettext("keep state");?></li></ul></td><td><?=gettext("Works with all IP protocols.");?></td></tr> |
1291 | 1287 |
<tr><td width="25%"><ul><li><?=gettext("sloppy state");?></li></ul></td><td><?=gettext("Works with all IP protocols.");?></td></tr> |
1292 | 1288 |
<tr><td width="25%"><ul><li><?=gettext("synproxy state");?></li></ul></td><td><?=gettext("Proxies incoming TCP connections to help protect servers from spoofed TCP SYN floods. This option includes the functionality of keep state and modulate state combined.");?></td></tr> |
1293 | 1289 |
<tr><td width="25%"><ul><li><?=gettext("none");?></li></ul></td><td><?=gettext("Do not use state mechanisms to keep track. This is only useful if you're doing advanced queueing in certain situations. Please check the documentation.");?></td></tr> |
1294 | 1290 |
</table> |
1295 |
</p> |
|
1296 | 1291 |
</div> |
1297 | 1292 |
</td> |
1298 | 1293 |
</tr> |
... | ... | |
1300 | 1295 |
<td width="22%" valign="top" class="vncell"><?=gettext("No XMLRPC Sync");?></td> |
1301 | 1296 |
<td width="78%" class="vtable"> |
1302 | 1297 |
<div id="showadvnoxmlrpcsyncbox" <?php if ($pconfig['nosync']) echo "style='display:none'"; ?>> |
1303 |
<input type="button" onClick="show_advanced_noxmlrpc()" value="<?=gettext("Advanced"); ?>"></input> - <?=gettext("Show advanced option");?></a>
|
|
1298 |
<input type="button" onclick="show_advanced_noxmlrpc()" value="<?=gettext("Advanced"); ?>" /> - <?=gettext("Show advanced option");?>
|
|
1304 | 1299 |
</div> |
1305 | 1300 |
<div id="shownoxmlrpcadv" <?php if (empty($pconfig['nosync'])) echo "style='display:none'"; ?>> |
1306 |
<input type="checkbox" name="nosync"<?php if($pconfig['nosync']) echo " CHECKED"; ?>><br>
|
|
1301 |
<input type="checkbox" name="nosync"<?php if($pconfig['nosync']) echo " checked=\"checked\""; ?> /><br/>
|
|
1307 | 1302 |
<?=gettext("Hint: This prevents the rule on Master from automatically syncing to other CARP members. This does NOT prevent the rule from being overwritten on Slave.");?> |
1308 | 1303 |
</div> |
1309 | 1304 |
</td> |
... | ... | |
1312 | 1307 |
<td width="22%" valign="top" class="vncell"><?=gettext("802.1p");?></td> |
1313 | 1308 |
<td width="78%" class="vtable"> |
1314 | 1309 |
<div id="showadvvlanpriobox" <?php if (!empty($pconfig['vlanprio'])) echo "style='display:none'"; ?>> |
1315 |
<input type="button" onClick="show_advanced_vlanprio()" value="<?=gettext("Advanced"); ?>"></input> - <?=gettext("Show advanced option");?></a>
|
|
1310 |
<input type="button" onclick="show_advanced_vlanprio()" value="<?=gettext("Advanced"); ?>" /> - <?=gettext("Show advanced option");?>
|
|
1316 | 1311 |
</div> |
1317 | 1312 |
<div id="showvlanprioadv" <?php if (empty($pconfig['vlanprio'])) echo "style='display:none'"; ?>> |
1318 | 1313 |
<?php $vlanprio = array("none", "be", "bk", "ee", "ca", "vi", "vo", "ic", "nc"); ?> |
... | ... | |
1320 | 1315 |
$opts = ""; |
1321 | 1316 |
foreach($vlanprio as $vprio) { |
1322 | 1317 |
if ($vprio == $pconfig['vlanprio']) |
1323 |
$selected = " SELECTED";
|
|
1318 |
$selected = " selected=\"selected\"";
|
|
1324 | 1319 |
else |
1325 | 1320 |
$selected = ""; |
1326 | 1321 |
if ($vprio == "none") |
1327 |
$opts .= "<option value=\"\" {$vprio}>{$vprio}</option>\n";
|
|
1322 |
$opts .= "<option value=\"{$vprio}\">{$vprio}</option>\n";
|
|
1328 | 1323 |
else |
1329 | 1324 |
$opts .= "<option value=\"{$vprio}\" {$selected}>" . strtoupper($vprio) . "</option>\n"; |
1330 | 1325 |
} |
... | ... | |
1355 | 1350 |
<td width="22%" valign="top" class="vncell"><?=gettext("Schedule");?></td> |
1356 | 1351 |
<td width="78%" class="vtable"> |
1357 | 1352 |
<div id="showadvschedulebox" <?php if (!empty($pconfig['sched'])) echo "style='display:none'"; ?>> |
1358 |
<input type="button" onClick="show_advanced_schedule()" value="<?=gettext("Advanced"); ?>"></input> - <?=gettext("Show advanced option");?></a>
|
|
1353 |
<input type="button" onclick="show_advanced_schedule()" value="<?=gettext("Advanced"); ?>" /> - <?=gettext("Show advanced option");?>
|
|
1359 | 1354 |
</div> |
1360 | 1355 |
<div id="showscheduleadv" <?php if (empty($pconfig['sched'])) echo "style='display:none'"; ?>> |
1361 | 1356 |
<select name='sched'> |
1362 | 1357 |
<?php |
1363 | 1358 |
foreach($schedules as $schedule) { |
1364 | 1359 |
if($schedule == $pconfig['sched']) { |
1365 |
$selected = " SELECTED";
|
|
1360 |
$selected = " selected=\"selected\"";
|
|
1366 | 1361 |
} else { |
1367 | 1362 |
$selected = ""; |
1368 | 1363 |
} |
... | ... | |
1382 | 1377 |
<td width="22%" valign="top" class="vncell"><?=gettext("Gateway");?></td> |
1383 | 1378 |
<td width="78%" class="vtable"> |
1384 | 1379 |
<div id="showadvgatewaybox" <?php if (!empty($pconfig['gateway'])) echo "style='display:none'"; ?>> |
1385 |
<input type="button" onClick="show_advanced_gateway()" value="<?=gettext("Advanced"); ?>"></input> - <?=gettext("Show advanced option");?></a>
|
|
1380 |
<input type="button" onclick="show_advanced_gateway()" value="<?=gettext("Advanced"); ?>" /> - <?=gettext("Show advanced option");?>
|
|
1386 | 1381 |
</div> |
1387 | 1382 |
<div id="showgatewayadv" <?php if (empty($pconfig['gateway'])) echo "style='display:none'"; ?>> |
1388 | 1383 |
<select name='gateway'> |
... | ... | |
1401 | 1396 |
if($gw == "") |
1402 | 1397 |
continue; |
1403 | 1398 |
if($gwname == $pconfig['gateway']) { |
1404 |
$selected = " SELECTED";
|
|
1399 |
$selected = " selected=\"selected\"";
|
|
1405 | 1400 |
} else { |
1406 | 1401 |
$selected = ""; |
1407 | 1402 |
} |
... | ... | |
1420 | 1415 |
if($gw_group['name'] == "") |
1421 | 1416 |
continue; |
1422 | 1417 |
if($pconfig['gateway'] == $gw_group['name']) { |
1423 |
$selected = " SELECTED";
|
|
1418 |
$selected = " selected=\"selected\"";
|
|
1424 | 1419 |
} else { |
1425 | 1420 |
$selected = ""; |
1426 | 1421 |
} |
... | ... | |
1437 | 1432 |
<td width="22%" valign="top" class="vncell"><?=gettext("In/Out");?></td> |
1438 | 1433 |
<td width="78%" class="vtable"> |
1439 | 1434 |
<div id="showadvinoutbox" <?php if (!empty($pconfig['dnpipe'])) echo "style='display:none'"; ?>> |
1440 |
<input type="button" onClick="show_advanced_inout()" value="<?=gettext("Advanced"); ?>"></input> - <?=gettext("Show advanced option");?></a>
|
|
1435 |
<input type="button" onclick="show_advanced_inout()" value="<?=gettext("Advanced"); ?>" /> - <?=gettext("Show advanced option");?>
|
|
1441 | 1436 |
</div> |
1442 | 1437 |
<div id="showinoutadv" <?php if (empty($pconfig['dnpipe'])) echo "style='display:none'"; ?>> |
1443 | 1438 |
<select name="dnpipe"> |
... | ... | |
1445 | 1440 |
if (!is_array($dnqlist)) |
1446 | 1441 |
$dnqlist = array(); |
1447 | 1442 |
echo "<option value=\"none\""; |
1448 |
if (!$dnqselected) echo " SELECTED";
|
|
1443 |
if (!$dnqselected) echo " selected=\"selected\"";
|
|
1449 | 1444 |
echo " >none</option>"; |
1450 | 1445 |
foreach ($dnqlist as $dnq => $dnqkey) { |
1451 | 1446 |
if($dnq == "") |
... | ... | |
1453 | 1448 |
echo "<option value=\"$dnq\""; |
1454 | 1449 |
if ($dnq == $pconfig['dnpipe']) { |
1455 | 1450 |
$dnqselected = 1; |
1456 |
echo " SELECTED";
|
|
1451 |
echo " selected=\"selected\"";
|
|
1457 | 1452 |
} |
1458 | 1453 |
echo ">{$dnq}</option>"; |
1459 | 1454 |
} |
... | ... | |
1463 | 1458 |
<?php |
1464 | 1459 |
$dnqselected = 0; |
1465 | 1460 |
echo "<option value=\"none\""; |
1466 |
if (!$dnqselected) echo " SELECTED";
|
|
1461 |
if (!$dnqselected) echo " selected=\"selected\"";
|
|
1467 | 1462 |
echo " >none</option>"; |
1468 | 1463 |
foreach ($dnqlist as $dnq => $dnqkey) { |
1469 | 1464 |
if($dnq == "") |
... | ... | |
1471 | 1466 |
echo "<option value=\"$dnq\""; |
1472 | 1467 |
if ($dnq == $pconfig['pdnpipe']) { |
1473 | 1468 |
$dnqselected = 1; |
1474 |
echo " SELECTED";
|
|
1469 |
echo " selected=\"selected\"";
|
|
1475 | 1470 |
} |
1476 | 1471 |
echo ">{$dnq}</option>"; |
1477 | 1472 |
} |
... | ... | |
1487 | 1482 |
<td width="22%" valign="top" class="vncell"><?=gettext("Ackqueue/Queue");?></td> |
1488 | 1483 |
<td width="78%" class="vtable"> |
1489 | 1484 |
<div id="showadvackqueuebox" <?php if (!empty($pconfig['defaultqueue'])) echo "style='display:none'"; ?>> |
1490 |
<input type="button" onClick="show_advanced_ackqueue()" value="<?=gettext("Advanced"); ?>"></input> - <?=gettext("Show advanced option");?></a>
|
|
1485 |
<input type="button" onclick="show_advanced_ackqueue()" value="<?=gettext("Advanced"); ?>" /> - <?=gettext("Show advanced option");?>
|
|
1491 | 1486 |
</div> |
1492 | 1487 |
<div id="showackqueueadv" <?php if (empty($pconfig['defaultqueue'])) echo "style='display:none'"; ?>> |
1493 | 1488 |
<select name="ackqueue"> |
... | ... | |
1495 | 1490 |
if (!is_array($qlist)) |
1496 | 1491 |
$qlist = array(); |
1497 | 1492 |
echo "<option value=\"none\""; |
1498 |
if (!$qselected) echo " SELECTED";
|
|
1493 |
if (!$qselected) echo " selected=\"selected\"";
|
|
1499 | 1494 |
echo " >none</option>"; |
1500 | 1495 |
foreach ($qlist as $q => $qkey) { |
1501 | 1496 |
if($q == "") |
... | ... | |
1503 | 1498 |
echo "<option value=\"$q\""; |
1504 | 1499 |
if ($q == $pconfig['ackqueue']) { |
1505 | 1500 |
$qselected = 1; |
1506 |
echo " SELECTED";
|
|
1501 |
echo " selected=\"selected\"";
|
|
1507 | 1502 |
} |
1508 | 1503 |
if (isset($ifdisp[$q])) |
1509 | 1504 |
echo ">{$ifdisp[$q]}</option>"; |
... | ... | |
1516 | 1511 |
<?php |
1517 | 1512 |
$qselected = 0; |
1518 | 1513 |
echo "<option value=\"none\""; |
1519 |
if (!$qselected) echo " SELECTED";
|
|
1514 |
if (!$qselected) echo " selected=\"selected\"";
|
|
1520 | 1515 |
echo " >none</option>"; |
1521 | 1516 |
foreach ($qlist as $q => $qkey) { |
1522 | 1517 |
if($q == "") |
... | ... | |
1524 | 1519 |
echo "<option value=\"$q\""; |
1525 | 1520 |
if ($q == $pconfig['defaultqueue']) { |
1526 | 1521 |
$qselected = 1; |
1527 |
echo " SELECTED";
|
|
1522 |
echo " selected=\"selected\"";
|
|
1528 | 1523 |
} |
1529 | 1524 |
if (isset($ifdisp[$q])) |
1530 | 1525 |
echo ">{$ifdisp[$q]}</option>"; |
... | ... | |
1535 | 1530 |
</select> |
1536 | 1531 |
<br /> |
1537 | 1532 |
<span class="vexpl"><?=gettext("Choose the Acknowledge Queue only if you have selected Queue.");?></span> |
1533 |
</div> |
|
1538 | 1534 |
</td> |
1539 | 1535 |
</tr> |
1540 | 1536 |
<tr> |
1541 | 1537 |
<td width="22%" valign="top" class="vncell"><?=gettext("Layer7");?></td> |
1542 | 1538 |
<td width="78%" class="vtable"> |
1543 | 1539 |
<div id="showadvlayer7box" <?php if (!empty($pconfig['l7container'])) echo "style='display:none'"; ?>> |
1544 |
<input type="button" onClick="show_advanced_layer7()" value="<?=gettext("Advanced"); ?>"></input> - <?=gettext("Show advanced option");?></a>
|
|
1540 |
<input type="button" onclick="show_advanced_layer7()" value="<?=gettext("Advanced"); ?>" /> - <?=gettext("Show advanced option");?>
|
|
1545 | 1541 |
</div> |
1546 | 1542 |
<div id="showlayer7adv" <?php if (empty($pconfig['l7container'])) echo "style='display:none'"; ?>> |
1547 | 1543 |
<select name="l7container"> |
... | ... | |
1553 | 1549 |
foreach ($l7clist as $l7ckey) { |
1554 | 1550 |
echo "<option value=\"{$l7ckey}\""; |
1555 | 1551 |
if ($l7ckey == $pconfig['l7container']) { |
1556 |
echo " SELECTED";
|
|
1552 |
echo " selected=\"selected\"";
|
|
1557 | 1553 |
} |
1558 | 1554 |
echo ">{$l7ckey}</option>"; |
1559 | 1555 |
} |
... | ... | |
1602 | 1598 |
<tr> |
1603 | 1599 |
<td width="22%" valign="top"> </td> |
1604 | 1600 |
<td width="78%"> |
1605 |
<br> |
|
1606 |
<input name="Submit" type="submit" class="formbtn" value="<?=gettext("Save"); ?>"> <input type="button" class="formbtn" value="<?=gettext("Cancel"); ?>" onclick="history.back()">
|
|
1601 |
<br/>
|
|
1602 |
<input name="Submit" type="submit" class="formbtn" value="<?=gettext("Save"); ?>" /> <input type="button" class="formbtn" value="<?=gettext("Cancel"); ?>" onclick="history.back()" />
|
|
1607 | 1603 |
<?php if (isset($id) && $a_filter[$id]): ?> |
1608 |
<input name="id" type="hidden" value="<?=htmlspecialchars($id);?>"> |
|
1604 |
<input name="id" type="hidden" value="<?=htmlspecialchars($id);?>" />
|
|
1609 | 1605 |
<?php endif; ?> |
1610 |
<input name="after" type="hidden" value="<?=htmlspecialchars($after);?>"> |
|
1606 |
<input name="after" type="hidden" value="<?=htmlspecialchars($after);?>" />
|
|
1611 | 1607 |
</td> |
1612 | 1608 |
</tr> |
1613 | 1609 |
</table> |
1614 | 1610 |
</form> |
1615 |
<script language="JavaScript">
|
|
1611 |
<script type="text/javascript">
|
|
1616 | 1612 |
//<![CDATA[ |
1617 | 1613 |
ext_change(); |
1618 | 1614 |
typesel_change(); |
Also available in: Unified diff
Tidy up "firewall_rules_edit.php" XHTML
Close INPUT, BR and IMG tags and add ALT to IMG tags
Update HTML boolean operators
Add missing closing P tags
Remove NAME paramenter from TR and DIV tags, invalid HTML