Make automatic firewall rules optional
[tomato.git] / release / src / router / nvram / defaults.c
blob5559ef30a3285c2fb54e26ff39339f807c20dfa5
1 /*
3 Copyright 2003, CyberTAN Inc.
4 All Rights Reserved.
6 This is UNPUBLISHED PROPRIETARY SOURCE CODE of CyberTAN Inc.
7 the contents of this file may not be disclosed to third parties,
8 copied or duplicated in any form without the prior written
9 permission of CyberTAN Inc.
11 This software should be used as a reference only, and it not
12 intended for production use!
14 THIS SOFTWARE IS OFFERED "AS IS", AND CYBERTAN GRANTS NO WARRANTIES OF ANY
15 KIND, EXPRESS OR IMPLIED, BY STATUTE, COMMUNICATION OR OTHERWISE. CYBERTAN
16 SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS
17 FOR A SPECIFIC PURPOSE OR NONINFRINGEMENT CONCERNING THIS SOFTWARE
22 Copyright 2005, Broadcom Corporation
23 All Rights Reserved.
25 THIS SOFTWARE IS OFFERED "AS IS", AND BROADCOM GRANTS NO WARRANTIES OF ANY
26 KIND, EXPRESS OR IMPLIED, BY STATUTE, COMMUNICATION OR OTHERWISE. BROADCOM
27 SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS
28 FOR A SPECIFIC PURPOSE OR NONINFRINGEMENT CONCERNING THIS SOFTWARE.
32 #include <string.h>
33 #include <bcmnvram.h>
35 #include "tomato_profile.h"
36 #include "defaults.h"
38 //! = see restore_main()
40 const defaults_t defaults[] = {
41 { "restore_defaults", "0" }, // Set to 0 to not restore defaults on boot
43 // LAN H/W parameters
44 //! { "lan_ifname", "" }, // LAN interface name
45 //! { "lan_ifnames", "" }, // Enslaved LAN interfaces
46 { "lan_hwnames", "" }, // LAN driver names (e.g. et0)
47 { "lan_hwaddr", "" }, // LAN interface MAC address
49 // LAN TCP/IP parameters
50 { "lan_dhcp", "0" }, // DHCP client [static|dhcp]
51 { "lan_proto", "dhcp" }, // DHCP server [static|dhcp] //Barry add 2004 09 16
52 { "lan_ipaddr", "192.168.1.1" }, // LAN IP address
53 { "lan_netmask", "255.255.255.0" }, // LAN netmask
54 { "lan_wins", "" }, // x.x.x.x x.x.x.x ...
55 { "lan_domain", "" }, // LAN domain name
56 { "lan_lease", "86400" }, // LAN lease time in seconds
57 { "lan_stp", "0" }, // LAN spanning tree protocol
58 { "lan_route", "" }, // Static routes (ipaddr:netmask:gateway:metric:ifname ...)
60 { "lan_gateway", "0.0.0.0" }, // LAN Gateway
61 { "wds_enable", "0" }, // WDS Enable (0|1)
63 // WAN H/W parameters
64 //! { "wan_ifname", "" }, // WAN interface name
65 //! { "wan_ifnames", "" }, // WAN interface names
66 { "wan_hwname", "" }, // WAN driver name (e.g. et1)
67 { "wan_hwaddr", "" }, // WAN interface MAC address
69 // WAN TCP/IP parameters
70 { "wan_proto", "dhcp" }, // [static|dhcp|pppoe|disabled]
71 { "wan_ipaddr", "0.0.0.0" }, // WAN IP address
72 { "wan_netmask", "0.0.0.0" }, // WAN netmask
73 { "wan_gateway", "0.0.0.0" }, // WAN gateway
74 { "wan_dns", "" }, // x.x.x.x x.x.x.x ...
75 { "wan_wins", "" }, // x.x.x.x x.x.x.x ...
76 { "wan_lease", "86400" }, // WAN lease time in seconds
78 { "wan_primary", "1" }, // Primary wan connection
79 { "wan_unit", "0" }, // Last configured connection
81 // Filters
82 { "filter_maclist", "" }, // xx:xx:xx:xx:xx:xx ...
83 { "filter_macmode", "deny" }, // "allow" only, "deny" only, or "disabled" (allow all)
84 { "filter_client0", "" }, // [lan_ipaddr0-lan_ipaddr1|*]:lan_port0-lan_port1,proto,enable,day_start-day_end,sec_start-sec_end,desc
86 { "filter", "on" }, // [on | off] Firewall Protection
88 // Port forwards
89 { "autofw_port0", "" }, // out_proto:out_port,in_proto:in_port0-in_port1>to_port0-to_port1,enable,desc
91 // DHCP server parameters
92 { "dhcp_start", "100" }, //
93 { "dhcp_num", "50" }, //
94 { "dhcpd_startip", "" }, // if empty, tomato will use dhcp_start/dchp_num for better compatibility
95 { "dhcpd_endip", "" }, // "
96 { "dhcp_lease", "0" }, // LAN lease time in minutes
97 { "dhcp_domain", "wan" }, // Use WAN domain name first if available (wan|lan)
98 { "wan_get_dns", "" }, // DNS IP address which get by dhcpc // Add
101 // PPPoE parameters
102 { "pppoe_ifname", "" }, // PPPoE enslaved interface
103 { "ppp_username", "" }, // PPP username
104 { "ppp_passwd", "" }, // PPP password
105 { "ppp_idletime", "5" }, // Dial on demand max idle time (mins)
106 { "ppp_keepalive", "0" }, // Restore link automatically
107 { "ppp_demand", "0" }, // Dial on demand
108 { "ppp_redialperiod", "30" }, // Redial Period (seconds)*/
109 { "ppp_mru", "1500" }, // Negotiate MRU to this value
110 { "ppp_mtu", "1500" }, // Negotiate MTU to the smaller of this value or the peer MRU
111 { "ppp_service", "" }, // PPPoE service name
112 { "ppp_ac", "" }, // PPPoE access concentrator name
113 { "ppp_static", "0" }, // Enable / Disable Static IP
114 { "ppp_static_ip", "" }, // PPPoE Static IP
115 { "ppp_get_ac", "" }, // PPPoE Server ac name
116 { "ppp_get_srv", "" }, // PPPoE Server service name
118 { "pppoe_lei", "" },
119 { "pppoe_lef", "" },
121 // Wireless parameters
122 { "wl_ifname", "" }, // Interface name
123 { "wl_hwaddr", "" }, // MAC address
124 { "wl_phytype", "g" }, // Current wireless band ("a" (5 GHz), "b" (2.4 GHz), or "g" (2.4 GHz)) // Modify
125 { "wl_corerev", "" }, // Current core revision
126 { "wl_phytypes", "" }, // List of supported wireless bands (e.g. "ga")
127 { "wl_radioids", "" }, // List of radio IDs
128 { "wl_ssid", "wireless" }, // Service set ID (network name)
129 { "wl_country", "Worldwide" }, // Country (default obtained from driver)
130 { "wl_radio", "1" }, // Enable (1) or disable (0) radio
131 { "wl_closed", "0" }, // Closed (hidden) network
132 { "wl_ap_isolate", "0" }, // AP isolate mode
133 { "wl_mode", "ap" }, // AP mode (ap|sta|wds)
134 { "wl_lazywds", "1" }, // Enable "lazy" WDS mode (0|1)
135 { "wl_wds", "" }, // xx:xx:xx:xx:xx:xx ...
136 { "wl_wds_timeout", "1" }, // WDS link detection interval defualt 1 sec*/
137 { "wl_wep", "disabled" }, // WEP data encryption (enabled|disabled)
138 { "wl_auth", "0" }, // Shared key authentication optional (0) or required (1)
139 { "wl_key", "1" }, // Current WEP key
140 { "wl_key1", "" }, // 5/13 char ASCII or 10/26 char hex
141 { "wl_key2", "" }, // 5/13 char ASCII or 10/26 char hex
142 { "wl_key3", "" }, // 5/13 char ASCII or 10/26 char hex
143 { "wl_key4", "" }, // 5/13 char ASCII or 10/26 char hex
144 { "wl_maclist", "" }, // xx:xx:xx:xx:xx:xx ...
145 { "wl_channel", "6" }, // Channel number
146 { "wl_rate", "0" }, // Rate (bps, 0 for auto)
147 { "wl_mrate", "0" }, // Mcast Rate (bps, 0 for auto)
148 { "wl_rateset", "default" }, // "default" or "all" or "12"
149 { "wl_frag", "2346" }, // Fragmentation threshold
150 { "wl_rts", "2347" }, // RTS threshold
151 { "wl_dtim", "1" }, // DTIM period (3.11.5)*/ // It is best value for WiFi test
152 { "wl_bcn", "100" }, // Beacon interval
153 { "wl_plcphdr", "long" }, // 802.11b PLCP preamble type
154 { "wl_net_mode", "mixed" }, // Wireless mode (mixed|g-only|b-only|disable)
155 { "wl_gmode", "1" }, // 54g mode
156 { "wl_gmode_protection","off" }, // 802.11g RTS/CTS protection (off|auto)
157 { "wl_afterburner", "off" }, // AfterBurner
158 { "wl_frameburst", "off" }, // BRCM Frambursting mode (off|on)
159 { "wl_wme", "off" }, // WME mode (off|on)
160 { "wl_antdiv", "-1" }, // Antenna Diversity (-1|0|1|3)
161 { "wl_infra", "1" }, // Network Type (BSS/IBSS)
163 { "wl_passphrase", "" }, // Passphrase // Add
164 { "wl_wep_bit", "128" }, // WEP encryption [64 | 128] // Add
165 { "wl_wep_buf", "" }, // save all settings for web // Add
166 { "wl_wep_gen", "" }, // save all settings for generate button // Add
167 { "wl_wep_last", "" }, // Save last wl_wep mode // Add
168 { "wl_active_mac", "" }, // xx:xx:xx:xx:xx:xx ... // Add
170 // WPA parameters
171 { "security_mode2", "disabled" }, // WPA mode (disabled|radius|wpa_personal|wpa_enterprise|wep|wpa2_personal|wpa2_enterprise) for WEB // Add
172 { "security_mode", "disabled" }, // WPA mode (disabled|radius|wpa|psk|wep|psk psk2|wpa wpa2) for WEB // Add
173 { "security_mode_last", "" }, // Save last WPA mode // Add
174 { "wl_auth_mode", "none" }, // Network authentication mode (radius|none)
175 { "wl_wpa_psk", "" }, // WPA pre-shared key
176 { "wl_wpa_gtk_rekey", "3600" }, // WPA GTK rekey interval // Modify
177 { "wl_radius_ipaddr", "" }, // RADIUS server IP address
178 { "wl_radius_key", "" }, // RADIUS shared secret
179 { "wl_radius_port", "1812" }, // RADIUS server UDP port
180 { "wl_crypto", "tkip" }, // WPA data encryption
181 { "wl_net_reauth", "36000" }, // Network Re-auth/PMK caching duration
182 { "wl_akm", "" }, // WPA akm list
184 // WME parameters
185 // EDCA parameters for STA
186 { "wl_wme_sta_bk", "15 1023 7 0 0 off" }, // WME STA AC_BK paramters
187 { "wl_wme_sta_be", "15 1023 3 0 0 off" }, // WME STA AC_BE paramters
188 { "wl_wme_sta_vi", "7 15 2 6016 3008 off" }, // WME STA AC_VI paramters
189 { "wl_wme_sta_vo", "3 7 2 3264 1504 off" }, // WME STA AC_VO paramters
191 // EDCA parameters for AP
192 { "wl_wme_ap_bk", "15 1023 7 0 0 off" }, // WME AP AC_BK paramters
193 { "wl_wme_ap_be", "15 63 3 0 0 off" }, // WME AP AC_BE paramters
194 { "wl_wme_ap_vi", "7 15 1 6016 3008 off" }, // WME AP AC_VI paramters
195 { "wl_wme_ap_vo", "3 7 1 3264 1504 off" }, // WME AP AC_VO paramters
197 { "wl_wme_no_ack", "off" }, // WME No-Acknowledgmen mode
199 { "wl_unit", "0" }, // Last configured interface
200 { "wl_mac_deny", "" }, // filter MAC // Add
202 { "pptp_server_ip", "" }, // as same as WAN gateway
203 { "pptp_get_ip", "" }, // IP Address assigned by PPTP server
205 // for firewall
206 { "mtu_enable", "0" }, // WAN MTU [1|0]
207 { "wan_mtu", "1500" }, // Negotiate MTU to the smaller of this value or the peer MRU
209 { "l2tp_server_ip", "" }, // L2TP auth server (IP Address)
210 { "l2tp_get_ip", "" }, // IP Address assigned by L2TP server
211 { "wan_gateway_buf", "0.0.0.0" }, // save the default gateway for DHCP
212 // hbobs { "hb_server_ip", "" }, // heartbeat auth server (IP Address)
213 // hbobs { "hb_server_domain", "" }, // heartbeat auth server (domain name)
215 // misc
216 { "t_noise", "-99" },
217 { "led_override", "" },
218 { "btn_override", "" },
219 { "btn_reset", "" },
220 { "env_path", "" },
221 { "manual_boot_nv", "0" },
222 { "wlx_hpamp", "" },
223 // { "wlx_hperx", "" }, // see init.c
224 { "t_fix1", "" },
226 // basic-ddns
227 { "ddnsx0", "" },
228 { "ddnsx1", "" },
229 { "ddnsx0_cache", "" },
230 { "ddnsx1_cache", "" },
232 // basic-network
233 { "wds_save", "" },
235 // basic-ident
236 { "router_name", "tomato" },
237 { "wan_hostname", "unknown" },
238 { "wan_domain", "" },
240 // basic-time
241 { "tm_sel", "PST8PDT,M3.2.0/2,M11.1.0/2" },
242 { "tm_tz", "PST8PDT,M3.2.0/2,M11.1.0/2" },
243 { "tm_dst", "1", },
244 { "ntp_updates", "4" },
245 { "ntp_tdod", "0" },
246 { "ntp_server", "0.pool.ntp.org 1.pool.ntp.org 2.pool.ntp.org" },
247 { "ntp_kiss", "" },
248 { "ntp_kiss_ignore", "" },
250 // basic-static
251 { "dhcpd_static", "" },
253 // basic-wfilter
254 { "wl_mac_list", "" },
255 { "wl_macmode", "disabled" },
256 { "macnames", "" },
258 // advanced-ctnf
259 { "ct_tcp_timeout", "" },
260 { "ct_udp_timeout", "" },
261 { "ct_max", "" },
262 { "nf_ttl", "0" },
263 { "nf_l7in", "1" },
264 { "nf_rtsp", "1" },
265 { "nf_pptp", "1" },
266 { "nf_h323", "1" },
267 { "nf_ftp", "1" },
269 // advanced-mac
270 { "mac_wan", "" },
271 { "mac_wl", "" },
273 // advanced-misc
274 { "boot_wait", "on" },
275 { "wait_time", "5" },
276 { "wan_speed", "4" }, // 0=10 Mb Full, 1=10 Mb Half, 2=100 Mb Full, 3=100 Mb Half, 4=Auto
278 // advanced-dhcpdns
279 { "dhcpd_dmdns", "1" },
280 { "dhcpd_slt", "0" },
281 { "dhcpd_lmax", "" },
282 { "dns_addget", "0" },
283 { "dns_intcpt", "0" },
284 { "dhcpc_minpkt", "0" },
285 { "dnsmasq_custom", "" },
286 // { "dnsmasq_norw", "0" },
288 // advanced-firewall
289 // { "block_loopback", "0" }, // nat loopback
290 { "nf_loopback", "1" },
291 { "block_wan", "1" }, // block inbound icmp
292 { "multicast_pass", "0" }, // enable multicast proxy
293 { "ne_syncookies", "0" }, // tcp_syncookies
295 // advanced-routing
296 { "routes_static", "" },
297 { "wk_mode", "gateway" }, // Network mode [gateway|router]
298 { "dr_setting", "0" }, // [ Disable | WAN | LAN | Both ]
299 { "dr_lan_tx", "0" }, // Dynamic-Routing LAN out
300 { "dr_lan_rx", "0" }, // Dynamic-Routing LAN in
301 { "dr_wan_tx", "0" }, // Dynamic-Routing WAN out
302 { "dr_wan_rx", "0" }, // Dynamic-Routing WAN in
304 // advanced-wireless
305 { "wl_txant", "3" },
306 { "wl_txpwr", "42" },
307 { "wl_maxassoc", "128" }, // Max associations driver could support
308 { "wl_distance", "" },
310 // forward-*
311 { "portforward", "0<3<1.1.1.0/24<1000:2000<<192.168.1.2<ex: 1000 to 2000, restricted>0<2<<1000,2000<<192.168.1.2<ex: 1000 and 2000>0<1<<1000<2000<192.168.1.2<ex: different internal port>0<3<<1000:2000,3000<<192.168.1.2<ex: 1000 to 2000, and 3000>" },
312 { "trigforward", "0<1<3000:4000<5000:6000<ex: open 5000-6000 if 3000-4000>" },
313 { "dmz_enable", "0" },
314 { "dmz_ipaddr", "0" },
315 { "dmz_sip", "" },
317 // forward-upnp
318 { "upnp_enable", "1" },
319 { "upnp_ssdp_interval", "60" }, // SSDP interval
320 { "upnp_max_age", "180" }, // Max age
321 { "upnp_mnp", "0" },
322 { "upnp_config", "0" },
324 // qos
325 { "qos_enable", "0" },
326 { "qos_method", "0" }, // remove later zzz
327 { "qos_sticky", "1" }, // remove later zzz
328 { "qos_ack", "1" },
329 { "qos_syn", "0" },
330 { "qos_fin", "0" },
331 { "qos_rst", "0" },
332 { "qos_icmp", "0" },
333 { "qos_reset", "0" },
334 { "qos_obw", "230" },
335 { "qos_ibw", "1000" },
336 { "qos_orules", "0<<6<d<80,443<0<<0:512<1<WWW>0<<6<d<80,443<0<<512:<3<WWW (512K+)>0<<-1<d<53<0<<0:2<0<DNS>0<<-1<d<53<0<<2:<4<DNS (2K+)>0<<-1<d<1024:65535<0<<<4<Bulk Traffic" },
337 { "qos_burst0", "" },
338 { "qos_burst1", "" },
340 { "qos_default", "3" },
341 { "qos_orates", "80-100,10-100,5-100,3-100,2-95,1-50,1-40,1-30,1-20,1-10" },
343 { "ne_vegas", "0" }, // TCP Vegas
344 { "ne_valpha", "2" }, // "
345 { "ne_vbeta", "6" }, // "
346 { "ne_vgamma", "2" }, // "
348 // access restrictions
349 { "rruleN", "0" },
350 { "rrule0", "0|1320|300|31|||word text\n^begins-with.domain.\n.ends-with.net$\n^www.exact-domain.net$|0|example" },
351 //* { "rrule##", "" },
352 { "rrulewp", "80,8080" },
354 #if TOMATO_SL
355 // samba
356 { "smbd_on", "0" },
357 { "nmbd_on", "0" },
358 { "smbd_wgroup", "WORKGROUP" },
359 { "smbd_nbname", "TOMATO" },
360 { "smbd_adminpass", "admin" },
361 #endif
363 // admin-access
364 { "http_username", "" }, // Username
365 { "http_passwd", "admin" }, // Password
366 { "remote_management", "0" }, // Remote Management [1|0]
367 { "remote_mgt_https", "0" }, // Remote Management use https [1|0]
368 { "http_wanport", "8080" }, // WAN port to listen on
369 { "http_lanport", "80" }, // LAN port to listen on
370 { "https_lanport", "443" }, // LAN port to listen on
371 { "http_enable", "1" }, // HTTP server enable/disable
372 { "https_enable", "0" }, // HTTPS server enable/disable
373 { "https_crt_save", "0" },
374 { "https_crt_cn", "" },
375 { "https_crt_file", "" },
376 { "https_crt", "" },
377 { "web_wl_filter", "0" }, // Allow/Deny Wireless Access Web
378 { "web_favicon", "0" },
379 { "web_css", "tomato" },
380 { "web_svg", "1" },
381 { "telnetd_eas", "1" },
382 { "telnetd_port", "23" },
383 { "sshd_eas", "0" },
384 { "sshd_pass", "1" },
385 { "sshd_port", "22" },
386 { "sshd_remote", "0" },
387 { "sshd_rport", "2222" },
388 { "sshd_authkeys", "" },
389 { "sshd_hostkey", "" },
390 { "rmgt_sip", "" }, // remote management: source ip address
392 { "http_id", "" },
394 // admin-bwm
395 { "rstats_enable", "1" },
396 { "rstats_path", "" },
397 { "rstats_stime", "48" },
398 { "rstats_offset", "1" },
399 { "rstats_data", "" },
400 { "rstats_colors", "" },
401 { "rstats_exclude", "" },
402 { "rstats_sshut", "1" },
403 { "rstats_bak", "0" },
405 // advanced-buttons
406 { "sesx_led", "0" },
407 { "sesx_b0", "1" },
408 { "sesx_b1", "4" },
409 { "sesx_b2", "4" },
410 { "sesx_b3", "4" },
411 { "sesx_script",
412 "[ $1 -ge 20 ] && telnetd -p 233 -l /bin/sh\n"
414 { "script_brau",
415 "if [ ! -e /tmp/switch-start ]; then\n"
416 " # do something at startup\n"
417 " echo position at startup was $1 >/tmp/switch-start\n"
418 " exit\n"
419 "fi\n"
420 "if [ $1 = \"bridge\" ]; then\n"
421 " # do something\n"
422 " led bridge on\n"
423 "elif [ $1 = \"auto\" ]; then\n"
424 " # do something\n"
425 " led bridge off\n"
426 "fi\n"
429 // admin-log
430 { "log_remote", "0" },
431 { "log_remoteip", "" },
432 { "log_remoteport", "514" },
433 { "log_file", "1" },
434 { "log_limit", "60" },
435 { "log_in", "0" },
436 { "log_out", "0" },
437 { "log_mark", "60" },
438 { "log_events", "" },
440 // admin-debugging
441 { "debug_nocommit", "0" },
442 { "debug_cprintf", "0" },
443 { "debug_cprintf_file", "0" },
444 // { "debug_keepfiles", "0" },
445 { "console_loglevel", "1" },
446 { "t_cafree", "0" },
447 { "t_hidelr", "0" },
448 { "debug_clkfix", "1" },
449 { "debug_ddns", "0" },
451 // admin-cifs
452 { "cifs1", "" },
453 { "cifs2", "" },
455 // admin-jffs2
456 { "jffs2_on", "0" },
457 { "jffs2_exec", "" },
459 // admin-sch
460 { "sch_rboot", "" },
461 { "sch_rcon", "" },
462 { "sch_c1", "" },
463 { "sch_c2", "" },
464 { "sch_c3", "" },
465 { "sch_c1_cmd", "" },
466 { "sch_c2_cmd", "" },
467 { "sch_c3_cmd", "" },
469 // admin-script
470 { "script_init", "" },
471 { "script_shut", "" },
472 { "script_fire", "" },
473 { "script_wanup", "" },
475 // vpn
476 { "vpn_debug", "0" },
477 { "vpn_server1_if", "tap" },
478 { "vpn_server1_proto", "udp" },
479 { "vpn_server1_port", "1194" },
480 { "vpn_server1_firewall", "auto" },
481 { "vpn_server1_crypt", "tls" },
482 { "vpn_server1_comp", "yes" },
483 { "vpn_server1_cipher", "default" },
484 { "vpn_server1_dhcp", "1" },
485 { "vpn_server1_r1", "192.168.1.50" },
486 { "vpn_server1_r2", "192.168.1.55" },
487 { "vpn_server1_sn", "10.8.0.0" },
488 { "vpn_server1_nm", "255.255.255.0" },
489 { "vpn_server1_local", "10.8.0.1" },
490 { "vpn_server1_remote", "10.8.0.2" },
491 { "vpn_server1_hmac", "-1" },
492 { "vpn_server1_custom", "" },
493 { "vpn_server1_static", "" },
494 { "vpn_server1_ca", "" },
495 { "vpn_server1_cert", "" },
496 { "vpn_server1_key", "" },
497 { "vpn_server1_dh", "" },
498 { "vpn_server2_if", "tap" },
499 { "vpn_server2_proto", "udp" },
500 { "vpn_server2_port", "1194" },
501 { "vpn_server2_firewall", "auto" },
502 { "vpn_server2_crypt", "tls" },
503 { "vpn_server2_comp", "yes" },
504 { "vpn_server2_cipher", "default" },
505 { "vpn_server2_dhcp", "1" },
506 { "vpn_server2_r1", "192.168.1.50" },
507 { "vpn_server2_r2", "192.168.1.55" },
508 { "vpn_server2_sn", "10.8.0.0" },
509 { "vpn_server2_nm", "255.255.255.0" },
510 { "vpn_server2_local", "10.8.0.1" },
511 { "vpn_server2_remote", "10.8.0.2" },
512 { "vpn_server2_hmac", "-1" },
513 { "vpn_server2_custom", "" },
514 { "vpn_server2_static", "" },
515 { "vpn_server2_ca", "" },
516 { "vpn_server2_cert", "" },
517 { "vpn_server2_key", "" },
518 { "vpn_server2_dh", "" },
519 { "vpn_client1_if", "tap" },
520 { "vpn_client1_bridge", "1" },
521 { "vpn_client1_nat", "1" },
522 { "vpn_client1_proto", "udp" },
523 { "vpn_client1_addr", "" },
524 { "vpn_client1_port", "1194" },
525 { "vpn_client1_retry", "30" },
526 { "vpn_client1_rg", "0" },
527 { "vpn_client1_firewall", "auto" },
528 { "vpn_client1_crypt", "tls" },
529 { "vpn_client1_comp", "yes" },
530 { "vpn_client1_cipher", "default" },
531 { "vpn_client1_local", "10.8.0.2" },
532 { "vpn_client1_remote", "10.8.0.1" },
533 { "vpn_client1_nm", "255.255.255.0" },
534 { "vpn_client1_hmac", "-1" },
535 { "vpn_client1_custom", "" },
536 { "vpn_client1_static", "" },
537 { "vpn_client1_ca", "" },
538 { "vpn_client1_cert", "" },
539 { "vpn_client1_key", "" },
540 { "vpn_client2_if", "tap" },
541 { "vpn_client2_bridge", "1" },
542 { "vpn_client2_nat", "1" },
543 { "vpn_client2_proto", "udp" },
544 { "vpn_client2_addr", "" },
545 { "vpn_client2_port", "1194" },
546 { "vpn_client2_retry", "30" },
547 { "vpn_client2_rg", "0" },
548 { "vpn_client2_firewall", "auto" },
549 { "vpn_client2_crypt", "tls" },
550 { "vpn_client2_comp", "yes" },
551 { "vpn_client2_cipher", "default" },
552 { "vpn_client2_local", "10.8.0.2" },
553 { "vpn_client2_remote", "10.8.0.1" },
554 { "vpn_client2_nm", "255.255.255.0" },
555 { "vpn_client2_hmac", "-1" },
556 { "vpn_client2_custom", "" },
557 { "vpn_client2_static", "" },
558 { "vpn_client2_ca", "" },
559 { "vpn_client2_cert", "" },
560 { "vpn_client2_key", "" },
562 #if 0
563 // safe to remove?
564 { "QoS", "0" },
566 { "ses_enable", "0" }, // enable ses
567 { "ses_event", "2" }, // initial ses event
568 { "ses_led_assertlvl", "0" }, // For SES II
569 { "ses_client_join", "0" }, // For SES II
570 { "ses_sw_btn_status", "DEFAULTS" }, // Barry Adds 20050309 for SW SES BTN
571 { "ses_count", "0" },
572 { "eou_configured", "0" },
574 { "port_priority_1", "0" }, // port 1 priority; 1:high, 0:low
575 { "port_flow_control_1", "1" }, // port 1 flow control; 1:enable, 0:disable
576 { "port_rate_limit_1", "0" }, // port 1 rate limit: 256k,512k,1M,2M,5M,10M,20M,50M
577 { "port_priority_2", "0" }, // port 2 priority; 1:high, 0:low
578 { "port_flow_control_2", "1" }, // port 2 flow control; 1:enable, 0:disable
579 { "port_rate_limit_2", "0" }, // port 2 rate limit: 256k,512k,1M,2M,5M,10M,20M,50M
580 { "port_priority_3", "0" }, // port 3 priority; 1:high, 0:low
581 { "port_flow_control_3", "1" }, // port 3 flow control; 1:enable, 0:disable
582 { "port_rate_limit_3", "0" }, // port 3 rate limit: 256k,512k,1M,2M,5M,10M,20M,50M
583 { "port_priority_4", "0" }, // port 4 priority; 1:high, 0:low
584 { "port_flow_control_4", "1" }, // port 4 flow control; 1:enable, 0:disable
585 { "port_rate_limit_4", "0" }, // port 4 rate limit: 256k,512k,1M,2M,5M,10M,20M,50M
587 //obs zzz { "http_method", "post" }, // HTTP method
589 // { "wl_macmode1", "disabled" },
591 /* obsolete
592 { "filter", "on" }, // Firewall Protection [on|off]
593 { "ipsec_pass", "1" }, // IPSec Pass Through [1|0]
594 { "pptp_pass", "1" }, // PPTP Pass Through [1|0]
595 { "l2tp_pass", "1" }, // L2TP Pass Through [1|0]
596 { "block_cookie", "0" }, // Block Cookie [1|0]
597 { "ident_pass", "0" }, // IDENT passthrough [1|0]
598 { "block_proxy", "0" }, // Block Proxy [1|0]
601 /* --- obsolete ---
602 { "forward_port", "" }, // name:[on|off]:[tcp|udp|both]:wan_port>lan_ipaddr:lan_port0
603 { "port_trigger", "" }, // name:[on|off]:[tcp|udp|both]:wan_port0-wan_port1>lan_port0-lan_port1
605 // for mac clone
606 { "mac_clone_enable", "0" }, // User define WAN interface MAC address
607 { "def_hwaddr", "00:00:00:00:00:00" }, // User define WAN interface MAC address
609 { "public_ip", "" }, // public ip
612 //forced in rc.c { "os_name", "" }, // OS name string
613 //forced in rc.c { "os_version", EPI_VERSION_STR }, // OS revision
614 //forced in rc.c { "os_date", __DATE__ }, // OS date
615 //not used { "ct_modules", "" }, // CyberTAN kernel modules
616 //obs { "timer_interval", "3600" }, // Timer interval in seconds
617 //obs { "ezc_enable", "1" }, // Enable EZConfig updates
618 //obs { "ezc_version", EZC_VERSION_STR }, // EZConfig version
619 //obs { "is_default", "1" }, // is it default setting: 1:yes 0:no*/
620 //obs { "os_server", "" }, // URL for getting upgrades
621 //obs { "stats_server", "" }, // URL for posting stats -- used by httpd/stats.c
622 //obs { "router_disable", "0" }, // lan_proto=static lan_stp=0 wan_proto=disabled
623 //obs { "fw_disable", "0" }, // Disable firewall (allow new connections from the WAN)
624 //obs { "static_route", "" }, // Static routes (ipaddr:netmask:gateway:metric:ifname ...)
625 //obs { "static_route_name", "" }, // Static routes name ($NAME:name)
626 // { "filter_port", "" }, // [lan_ipaddr|*]:lan_port0-lan_port1
627 //{ "dhcp_end", "150" }, // Last assignable DHCP address // Remove
628 //zzz not used { "dhcp_wins", "wan" }, // Use WAN WINS first if available (wan|lan)
629 //{ "eou_device_id", "" },
630 //{ "eou_public_key", "" },
631 //{ "eou_private_key", "" },
632 //{ "eou_public", "b49b5ec6866f5b166cc058110b20551d4fe7a5c96a9b5f01a3929f40015e4248359732b7467bae4948d6bb62f96996a7122c6834311c1ea276b35d12c37895501c0f5bd215499cf443d580b999830ac620ac2bf3b7f912741f54fea17627d13a92f44d014030d5c8d3249df385f500ffc90311563e89aa290e7c6f06ef9a6ec311" },
633 //{ "eou_private", "1fdf2ed7bd5ef1f4e603d34e4d41f0e70e19d1f65e1b6b1e6828eeed2d6afca354c0543e75d9973a1be9a898fed665e13f713f90bd5f50b3421fa7034fabde1ce63c44d01a5489765dc4dc3486521163bf6288db6c5e99c44bbb0ad7494fef20148ad862662dabcbff8dae7b466fad087d9f4754e9a6c84bc9adcbda7bc22e59" },
634 { "eou_expired_hour", "72" }, //The expired time is 72 hours, and this value = 72 * 10*/
635 // { "ntp_enable", "1" }, // replaced with ntp_updates
636 // { "ntp_mode", "auto" }, // auto, manual
639 // for AOL
640 { "aol_block_traffic", "0" }, // 0:Disable 1:Enable for global
641 { "aol_block_traffic1", "0" }, // 0:Disable 1:Enable for "ppp_username"
642 { "aol_block_traffic2", "0" }, // 0:Disable 1:Enable for "Parental control"
643 { "skip_amd_check", "0" }, // 0:Disable 1:Enable
644 { "skip_intel_check", "0" }, // 0:Disable 1:Enable
646 // advanced-watchdog
647 { "wd_en", "" },
648 { "wd_atp0", "" },
649 { "wd_atp1", "" },
650 { "wd_atp2", "" },
651 { "wd_atp3", "" },
652 { "wd_atp4", "" },
653 { "wd_mxr", "3" },
654 { "wd_rdy", "15" },
655 { "wd_cki", "300" },
656 { "wd_fdm", "" },
657 { "wd_aof", "" },
659 #endif // 0
661 { NULL, NULL }
664 const defaults_t if_generic[] = {
665 { "lan_ifname", "br0" },
666 { "lan_ifnames", "eth0 eth2 eth3 eth4" },
667 { "wan_ifname", "eth1" },
668 { "wan_ifnames", "eth1" },
669 { NULL, NULL }
672 const defaults_t if_vlan[] = {
673 { "lan_ifname", "br0" },
674 { "lan_ifnames", "vlan0 eth1 eth2 eth3" },
675 { "wan_ifname", "vlan1" },
676 { "wan_ifnames", "vlan1" },
677 { NULL, NULL }