1 <!DOCTYPE HTML PUBLIC '-//W3C//DTD HTML
4.0//EN'
>
4 Copyright (C) 2006-2010 Jonathan Zarate
5 http://www.polarcloud.com/tomato/
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.
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'
>
21 <script type='text/javascript' src='tomato.js'
></script>
25 <script type='text/javascript' src='debug.js'
></script>
27 <script type='text/javascript'
>
29 // <% nvram("block_wan,nf_loopback,ne_syncookies,multicast_pass,multicast_lan,multicast_lan1,multicast_lan2,multicast_lan3,lan_ifname,lan1_ifname,lan2_ifname,lan3_ifname"); %>
31 function verifyFields(focused
, quiet
)
34 var enable_mcast
= E('_f_multicast').checked
;
35 E('_f_multicast_lan').disabled
= ((!enable_mcast
) || (nvram
.lan_ifname
.length
< 1));
36 E('_f_multicast_lan1').disabled
= ((!enable_mcast
) || (nvram
.lan1_ifname
.length
< 1));
37 E('_f_multicast_lan2').disabled
= ((!enable_mcast
) || (nvram
.lan2_ifname
.length
< 1));
38 E('_f_multicast_lan3').disabled
= ((!enable_mcast
) || (nvram
.lan3_ifname
.length
< 1));
39 if(nvram
.lan_ifname
.length
< 1)
40 E('_f_multicast_lan').checked
= false;
41 if(nvram
.lan1_ifname
.length
< 1)
42 E('_f_multicast_lan1').checked
= false;
43 if(nvram
.lan2_ifname
.length
< 1)
44 E('_f_multicast_lan2').checked
= false;
45 if(nvram
.lan3_ifname
.length
< 1)
46 E('_f_multicast_lan3').checked
= false;
47 if ((enable_mcast
) && (!E('_f_multicast_lan').checked
) && (!E('_f_multicast_lan1').checked
) && (!E('_f_multicast_lan2').checked
) && (!E('_f_multicast_lan3').checked
)) {
48 ferror
.set('_f_multicast', 'IGMPproxy must be enabled in least one LAN bridge', quiet
);
51 ferror
.clear('_f_multicast');
61 if (!verifyFields(null, 0)) return;
64 fom
.block_wan
.value
= E('_f_icmp').checked
? 0 : 1;
65 fom
.ne_syncookies
.value
= E('_f_syncookies').checked
? 1 : 0;
66 fom
.multicast_pass
.value
= E('_f_multicast').checked
? 1 : 0;
68 fom
.multicast_lan
.value
= E('_f_multicast_lan').checked
? 1 : 0;
69 fom
.multicast_lan1
.value
= E('_f_multicast_lan1').checked
? 1 : 0;
70 fom
.multicast_lan2
.value
= E('_f_multicast_lan2').checked
? 1 : 0;
71 fom
.multicast_lan3
.value
= E('_f_multicast_lan3').checked
? 1 : 0;
79 <form id='_fom' method='post' action='tomato.cgi'
>
80 <table id='container' cellspacing=
0>
81 <tr><td colspan=
2 id='header'
>
82 <div class='title'
>Tomato
</div>
83 <div class='version'
>Version <%
version(); %></div>
85 <tr id='body'
><td id='navi'
><script type='text/javascript'
>navi()</script></td>
87 <div id='ident'
><%
ident(); %></div>
91 <input type='hidden' name='_nextpage' value='advanced-firewall.asp'
>
92 <input type='hidden' name='_service' value='firewall-restart'
>
94 <input type='hidden' name='block_wan'
>
95 <input type='hidden' name='ne_syncookies'
>
96 <input type='hidden' name='multicast_pass'
>
98 <input type='hidden' name='multicast_lan'
>
99 <input type='hidden' name='multicast_lan1'
>
100 <input type='hidden' name='multicast_lan2'
>
101 <input type='hidden' name='multicast_lan3'
>
104 <div class='section-title'
>Firewall
</div>
105 <div class='section'
>
106 <script type='text/javascript'
>
107 createFieldTable('', [
108 { title
: 'Respond to ICMP ping', name
: 'f_icmp', type
: 'checkbox', value
: nvram
.block_wan
== '0' },
109 { title
: 'NAT loopback', name
: 'nf_loopback', type
: 'select', options
: [[0,'All'],[1,'Forwarded Only'],[2,'Disabled']], value
: fixInt(nvram
.nf_loopback
, 0, 2, 1) },
110 { title
: 'Enable SYN cookies', name
: 'f_syncookies', type
: 'checkbox', value
: nvram
.ne_syncookies
!= '0' },
111 { title
: 'Allow multicast', name
: 'f_multicast', type
: 'checkbox', value
: nvram
.multicast_pass
== '1' },
113 { title
: 'LAN', indent
: 2, name
: 'f_multicast_lan', type
: 'checkbox', value
: (nvram
.multicast_lan
== '1') },
114 { title
: 'LAN1', indent
: 2, name
: 'f_multicast_lan1', type
: 'checkbox', value
: (nvram
.multicast_lan1
== '1') },
115 { title
: 'LAN2', indent
: 2, name
: 'f_multicast_lan2', type
: 'checkbox', value
: (nvram
.multicast_lan2
== '1') },
116 { title
: 'LAN3', indent
: 2, name
: 'f_multicast_lan3', type
: 'checkbox', value
: (nvram
.multicast_lan3
== '1') },
125 <tr><td id='footer' colspan=
2>
126 <span id='footer-msg'
></span>
127 <input type='button' value='Save' id='save-button' onclick='save()'
>
128 <input type='button' value='Cancel' id='cancel-button' onclick='reloadPage();'
>
132 <script type='text/javascript'
>verifyFields(null, 1);</script>