RSA Keylength to 1024
[tomato.git] / release / src / router / www / advanced-firewall.asp
blob21fa8c5eaff89d03f5dd9f2e84678d56571e3f63
1 <!DOCTYPE HTML PUBLIC '-//W3C//DTD HTML 4.0//EN'>
2 <!--
3 Tomato GUI
4 Copyright (C) 2006-2010 Jonathan Zarate
5 http://www.polarcloud.com/tomato/
7 Tomato VLAN GUI
8 Copyright (C) 2011 Augusto Bott
9 http://code.google.com/p/tomato-sdhc-vlan/
11 For use with Tomato Firmware only.
12 No part of this file may be used without permission.
13 -->
14 <html>
15 <head>
16 <meta http-equiv='content-type' content='text/html;charset=utf-8'>
17 <meta name='robots' content='noindex,nofollow'>
18 <title>[<% ident(); %>] Advanced: Firewall</title>
19 <link rel='stylesheet' type='text/css' href='tomato.css'>
20 <% css(); %>
21 <script type='text/javascript' src='tomato.js'></script>
23 <!-- / / / -->
25 <script type='text/javascript' src='debug.js'></script>
27 <script type='text/javascript'>
29 // <% nvram("block_wan,nf_loopback,ne_syncookies,DSCP_fix_enable,multicast_pass,multicast_lan,multicast_lan1,multicast_lan2,multicast_lan3,lan_ifname,lan1_ifname,lan2_ifname,lan3_ifname,udpxy_enable,udpxy_stats,udpxy_clients,udpxy_port,ne_snat"); %>
31 function verifyFields(focused, quiet)
34 /* VLAN-BEGIN */
35 var enable_mcast = E('_f_multicast').checked;
36 E('_f_multicast_lan').disabled = ((!enable_mcast) || (nvram.lan_ifname.length < 1));
37 E('_f_multicast_lan1').disabled = ((!enable_mcast) || (nvram.lan1_ifname.length < 1));
38 E('_f_multicast_lan2').disabled = ((!enable_mcast) || (nvram.lan2_ifname.length < 1));
39 E('_f_multicast_lan3').disabled = ((!enable_mcast) || (nvram.lan3_ifname.length < 1));
40 if(nvram.lan_ifname.length < 1)
41 E('_f_multicast_lan').checked = false;
42 if(nvram.lan1_ifname.length < 1)
43 E('_f_multicast_lan1').checked = false;
44 if(nvram.lan2_ifname.length < 1)
45 E('_f_multicast_lan2').checked = false;
46 if(nvram.lan3_ifname.length < 1)
47 E('_f_multicast_lan3').checked = false;
48 if ((enable_mcast) && (!E('_f_multicast_lan').checked) && (!E('_f_multicast_lan1').checked) && (!E('_f_multicast_lan2').checked) && (!E('_f_multicast_lan3').checked)) {
49 ferror.set('_f_multicast', 'IGMPproxy must be enabled in least one LAN bridge', quiet);
50 return 0;
51 } else {
52 ferror.clear('_f_multicast');
54 /* VLAN-END */
55 E('_f_udpxy_stats').disabled = !E('_f_udpxy_enable').checked;
56 E('_f_udpxy_clients').disabled = !E('_f_udpxy_enable').checked;
57 E('_f_udpxy_port').disabled = !E('_f_udpxy_enable').checked;
58 return 1;
61 function save()
63 var fom;
65 if (!verifyFields(null, 0)) return;
67 fom = E('_fom');
68 fom.block_wan.value = E('_f_icmp').checked ? 0 : 1;
69 fom.ne_syncookies.value = E('_f_syncookies').checked ? 1 : 0;
70 fom.DSCP_fix_enable.value = E('_f_DSCP_fix_enable').checked ? 1 : 0;
71 fom.multicast_pass.value = E('_f_multicast').checked ? 1 : 0;
72 /* VLAN-BEGIN */
73 fom.multicast_lan.value = E('_f_multicast_lan').checked ? 1 : 0;
74 fom.multicast_lan1.value = E('_f_multicast_lan1').checked ? 1 : 0;
75 fom.multicast_lan2.value = E('_f_multicast_lan2').checked ? 1 : 0;
76 fom.multicast_lan3.value = E('_f_multicast_lan3').checked ? 1 : 0;
77 /* VLAN-END */
78 fom.udpxy_enable.value = E('_f_udpxy_enable').checked ? 1 : 0;
79 fom.udpxy_stats.value = E('_f_udpxy_stats').checked ? 1 : 0;
80 fom.udpxy_clients.value = E('_f_udpxy_clients').value;
81 fom.udpxy_port.value = E('_f_udpxy_port').value;
82 form.submit(fom, 1);
84 </script>
86 </head>
87 <body>
88 <form id='_fom' method='post' action='tomato.cgi'>
89 <table id='container' cellspacing=0>
90 <tr><td colspan=2 id='header'>
91 <div class='title'>Tomato</div>
92 <div class='version'>Version <% version(); %></div>
93 </td></tr>
94 <tr id='body'><td id='navi'><script type='text/javascript'>navi()</script></td>
95 <td id='content'>
96 <div id='ident'><% ident(); %></div>
98 <!-- / / / -->
100 <input type='hidden' name='_nextpage' value='advanced-firewall.asp'>
101 <input type='hidden' name='_service' value='firewall-restart'>
103 <input type='hidden' name='block_wan'>
104 <input type='hidden' name='ne_syncookies'>
105 <input type='hidden' name='DSCP_fix_enable'>
106 <input type='hidden' name='multicast_pass'>
108 /* VLAN-BEGIN */
109 <input type='hidden' name='multicast_lan'>
110 <input type='hidden' name='multicast_lan1'>
111 <input type='hidden' name='multicast_lan2'>
112 <input type='hidden' name='multicast_lan3'>
113 /* VLAN-END */
114 <input type='hidden' name='udpxy_enable'>
115 <input type='hidden' name='udpxy_stats'>
116 <input type='hidden' name='udpxy_clients'>
117 <input type='hidden' name='udpxy_port'>
119 <div class='section-title'>Firewall</div>
120 <div class='section'>
121 <script type='text/javascript'>
122 createFieldTable('', [
123 { title: 'Respond to ICMP ping', name: 'f_icmp', type: 'checkbox', value: nvram.block_wan == '0' },
124 { title: 'Limit packets per second', indent: 2, name: 'f_icmp_limit', type: 'checkbox', value: nvram.block_wan_limit != '0' },
125 { title: 'ICMP', indent: 3, name: 'f_icmp_limit_icmp', type: 'text', maxlen: 3, size: 3, suffix: ' <small> request per second</small>', value: fixInt(nvram.block_wan_limit_icmp || 1, 1, 300, 5) },
126 { title: 'Traceroute', indent: 3, name: 'f_icmp_limit_traceroute', type: 'text', maxlen: 3, size: 3, suffix: ' <small> request per second</small>', value: fixInt(nvram.block_wan_limit_tr || 5, 1, 300, 5) },
127 { title: 'Enable SYN cookies', name: 'f_syncookies', type: 'checkbox', value: nvram.ne_syncookies != '0' },
128 { title: 'Enable DSCP Fix', name: 'f_DSCP_fix_enable', type: 'checkbox', value: nvram.DSCP_fix_enable != '0', suffix: ' <small>Fixes Comcast incorrect DSCP</small>' }
130 </script>
131 </div>
133 <!-- / / / -->
135 <div class='section-title'>NAT</div>
136 <div class='section'>
137 <script type='text/javascript'>
138 createFieldTable('', [
139 { title: 'NAT loopback', name: 'nf_loopback', type: 'select', options: [[0,'All'],[1,'Forwarded Only'],[2,'Disabled']], value: fixInt(nvram.nf_loopback, 0, 2, 1) },
140 { title: 'NAT target', name: 'ne_snat', type: 'select', options: [[0,'MASQUERADE'],[1,'SNAT']], value: nvram.ne_snat }
142 </script>
143 </div>
145 <!-- / / / -->
147 <div class='section-title'>Multicast</div>
148 <div class='section'>
149 <script type='text/javascript'>
150 createFieldTable('', [
151 { title: 'Enable IGMPproxy', name: 'f_multicast', type: 'checkbox', value: nvram.multicast_pass == '1' },
152 /* VLAN-BEGIN */
153 { title: 'LAN', indent: 2, name: 'f_multicast_lan', type: 'checkbox', value: (nvram.multicast_lan == '1') },
154 { title: 'LAN1', indent: 2, name: 'f_multicast_lan1', type: 'checkbox', value: (nvram.multicast_lan1 == '1') },
155 { title: 'LAN2', indent: 2, name: 'f_multicast_lan2', type: 'checkbox', value: (nvram.multicast_lan2 == '1') },
156 { title: 'LAN3', indent: 2, name: 'f_multicast_lan3', type: 'checkbox', value: (nvram.multicast_lan3 == '1') },
157 /* VLAN-END */
158 { title: 'Enable Udpxy', name: 'f_udpxy_enable', type: 'checkbox', value: (nvram.udpxy_enable == '1') },
159 { title: 'Enable client statistics', indent: 2, name: 'f_udpxy_stats', type: 'checkbox', value: (nvram.udpxy_stats == '1') },
160 { title: 'Max clients', indent: 2, name: 'f_udpxy_clients', type: 'text', maxlen: 4, size: 6, value: fixInt(nvram.udpxy_clients || 3, 1, 5000, 3) },
161 { title: 'Udpxy port', indent: 2, name: 'f_udpxy_port', type: 'text', maxlen: 5, size: 7, value: fixPort(nvram.udpxy_port, 4022) }
163 </script>
164 </div>
166 <!-- / / / -->
168 </td></tr>
169 <tr><td id='footer' colspan=2>
170 <span id='footer-msg'></span>
171 <input type='button' value='Save' id='save-button' onclick='save()'>
172 <input type='button' value='Cancel' id='cancel-button' onclick='reloadPage();'>
173 </td></tr>
174 </table>
175 </form>
176 <script type='text/javascript'>verifyFields(null, 1);</script>
177 </body>
178 </html>