Merge remote-tracking branch 'origin/tomato-shibby' into tomato-null
[tomato/tomato-cn.git] / release / src / router / www / advanced-firewall.asp
blobb7ce577774141f450a81688f7e093b61dd766339
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 For use with Tomato Firmware only.
8 No part of this file may be used without permission.
9 -->
10 <html>
11 <head>
12 <meta http-equiv='content-type' content='text/html;charset=utf-8'>
13 <meta name='robots' content='noindex,nofollow'>
14 <title>[<% ident(); %>] Advanced: Firewall</title>
15 <link rel='stylesheet' type='text/css' href='tomato.css'>
16 <link rel='stylesheet' type='text/css' href='color.css'>
17 <script type='text/javascript' src='tomato.js'></script>
19 <!-- / / / -->
21 <script type='text/javascript' src='debug.js'></script>
23 <script type='text/javascript'>
25 // <% nvram("block_wan,multicast_pass,nf_loopback,ne_syncookies,imq_numdevs"); %>
27 function verifyFields(focused, quiet)
29 return 1;
32 function save()
34 var fom;
36 if (!verifyFields(null, 0)) return;
38 fom = E('_fom');
39 fom.block_wan.value = E('_f_icmp').checked ? 0 : 1;
40 fom.multicast_pass.value = E('_f_multicast').checked ? 1 : 0;
41 fom.ne_syncookies.value = E('_f_syncookies').checked ? 1 : 0;
42 form.submit(fom, 1);
44 </script>
46 </head>
47 <body>
48 <form id='_fom' method='post' action='tomato.cgi'>
49 <table id='container' cellspacing=0>
50 <tr><td colspan=2 id='header'>
51 <div class='title'>Tomato</div>
52 <div class='version'>Version <% version(); %></div>
53 </td></tr>
54 <tr id='body'><td id='navi'><script type='text/javascript'>navi()</script></td>
55 <td id='content'>
56 <div id='ident'><% ident(); %></div>
58 <!-- / / / -->
60 <input type='hidden' name='_nextpage' value='advanced-firewall.asp'>
61 <input type='hidden' name='_service' value='firewall-restart'>
63 <input type='hidden' name='block_wan'>
64 <input type='hidden' name='multicast_pass'>
65 <input type='hidden' name='ne_syncookies'>
67 <div class='section-title'>Firewall</div>
68 <div class='section'>
69 <script type='text/javascript'>
70 createFieldTable('', [
71 { title: 'Respond to ICMP ping', name: 'f_icmp', type: 'checkbox', value: nvram.block_wan == '0' },
72 { title: 'Allow multicast', name: 'f_multicast', type: 'checkbox', value: nvram.multicast_pass == '1' },
73 { title: 'NAT loopback', name: 'nf_loopback', type: 'select', options: [[0,'All'],[1,'Forwarded Only'],[2,'Disabled']], value: fixInt(nvram.nf_loopback, 0, 2, 1) },
74 { title: 'Enable SYN cookies', name: 'f_syncookies', type: 'checkbox', value: nvram.ne_syncookies != '0' },
75 null,
76 { title: 'Set IMQ Numdevs', name: 'imq_numdevs', type: 'text', maxlen: 4, size: 6, value: nvram.imq_numdevs, suffix: ' <small>* (range: 2 - 16; default: 2)</small>' },
77 null,
78 { text: '<small>* Will take effect only after a restart.</small>' }
80 ]);
81 </script>
82 </div>
84 <!-- / / / -->
86 </td></tr>
87 <tr><td id='footer' colspan=2>
88 <span id='footer-msg'></span>
89 <input type='button' value='Save' id='save-button' onclick='save()'>
90 <input type='button' value='Cancel' id='cancel-button' onclick='reloadPage();'>
91 </td></tr>
92 </table>
93 </form>
94 <script type='text/javascript'>verifyFields(null, 1);</script>
95 </body>
96 </html>