Merge branch 'tomato-ND-usbmod-vpn' into tomato-ND-USBmod
[tomato.git] / release / src / router / nvram / defaults.c
blobbc055827159de9db9c67dc72ca017a52ae1e5768
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_config.h> //!!TB
36 #include "tomato_profile.h"
37 #include "defaults.h"
39 //! = see restore_main()
41 const defaults_t defaults[] = {
42 { "restore_defaults", "0" }, // Set to 0 to not restore defaults on boot
44 // LAN H/W parameters
45 //! { "lan_ifname", "" }, // LAN interface name
46 //! { "lan_ifnames", "" }, // Enslaved LAN interfaces
47 { "lan_hwnames", "" }, // LAN driver names (e.g. et0)
48 { "lan_hwaddr", "" }, // LAN interface MAC address
50 // LAN TCP/IP parameters
51 { "lan_dhcp", "0" }, // DHCP client [static|dhcp]
52 { "lan_proto", "dhcp" }, // DHCP server [static|dhcp] //Barry add 2004 09 16
53 { "lan_ipaddr", "192.168.1.1" }, // LAN IP address
54 { "lan_netmask", "255.255.255.0" }, // LAN netmask
55 { "lan_wins", "" }, // x.x.x.x x.x.x.x ...
56 { "lan_domain", "" }, // LAN domain name
57 { "lan_lease", "86400" }, // LAN lease time in seconds
58 { "lan_stp", "0" }, // LAN spanning tree protocol
59 { "lan_route", "" }, // Static routes (ipaddr:netmask:gateway:metric:ifname ...)
61 { "lan_gateway", "0.0.0.0" }, // LAN Gateway
62 { "wds_enable", "0" }, // WDS Enable (0|1)
64 // WAN H/W parameters
65 //! { "wan_ifname", "" }, // WAN interface name
66 //! { "wan_ifnames", "" }, // WAN interface names
67 { "wan_hwname", "" }, // WAN driver name (e.g. et1)
68 { "wan_hwaddr", "" }, // WAN interface MAC address
70 // WAN TCP/IP parameters
71 { "wan_proto", "dhcp" }, // [static|dhcp|pppoe|disabled]
72 { "wan_ipaddr", "0.0.0.0" }, // WAN IP address
73 { "wan_netmask", "0.0.0.0" }, // WAN netmask
74 { "wan_gateway", "0.0.0.0" }, // WAN gateway
75 { "wan_dns", "" }, // x.x.x.x x.x.x.x ...
76 { "wan_wins", "" }, // x.x.x.x x.x.x.x ...
77 { "wan_lease", "86400" }, // WAN lease time in seconds
79 { "wan_primary", "1" }, // Primary wan connection
80 { "wan_unit", "0" }, // Last configured connection
82 // Filters
83 { "filter_maclist", "" }, // xx:xx:xx:xx:xx:xx ...
84 { "filter_macmode", "deny" }, // "allow" only, "deny" only, or "disabled" (allow all)
85 { "filter_client0", "" }, // [lan_ipaddr0-lan_ipaddr1|*]:lan_port0-lan_port1,proto,enable,day_start-day_end,sec_start-sec_end,desc
87 { "filter", "on" }, // [on | off] Firewall Protection
89 // Port forwards
90 { "autofw_port0", "" }, // out_proto:out_port,in_proto:in_port0-in_port1>to_port0-to_port1,enable,desc
92 // DHCP server parameters
93 { "dhcp_start", "100" }, //
94 { "dhcp_num", "50" }, //
95 { "dhcpd_startip", "" }, // if empty, tomato will use dhcp_start/dchp_num for better compatibility
96 { "dhcpd_endip", "" }, // "
97 { "dhcp_lease", "0" }, // LAN lease time in minutes
98 { "dhcp_domain", "wan" }, // Use WAN domain name first if available (wan|lan)
99 { "wan_get_dns", "" }, // DNS IP address which get by dhcpc // Add
102 // PPPoE parameters
103 { "pppoe_ifname", "" }, // PPPoE enslaved interface
104 { "ppp_username", "" }, // PPP username
105 { "ppp_passwd", "" }, // PPP password
106 { "ppp_idletime", "5" }, // Dial on demand max idle time (mins)
107 { "ppp_keepalive", "0" }, // Restore link automatically
108 { "ppp_demand", "0" }, // Dial on demand
109 { "ppp_redialperiod", "30" }, // Redial Period (seconds)*/
110 { "ppp_mru", "1500" }, // Negotiate MRU to this value
111 { "ppp_mtu", "1500" }, // Negotiate MTU to the smaller of this value or the peer MRU
112 { "ppp_service", "" }, // PPPoE service name
113 { "ppp_ac", "" }, // PPPoE access concentrator name
114 { "ppp_static", "0" }, // Enable / Disable Static IP
115 { "ppp_static_ip", "" }, // PPPoE Static IP
116 { "ppp_get_ac", "" }, // PPPoE Server ac name
117 { "ppp_get_srv", "" }, // PPPoE Server service name
119 { "pppoe_lei", "" },
120 { "pppoe_lef", "" },
122 // Wireless parameters
123 { "wl_ifname", "" }, // Interface name
124 { "wl_hwaddr", "" }, // MAC address
125 { "wl_phytype", "g" }, // Current wireless band ("a" (5 GHz), "b" (2.4 GHz), or "g" (2.4 GHz)) // Modify
126 { "wl_corerev", "" }, // Current core revision
127 { "wl_phytypes", "" }, // List of supported wireless bands (e.g. "ga")
128 { "wl_radioids", "" }, // List of radio IDs
129 { "wl_ssid", "wireless" }, // Service set ID (network name)
130 { "wl_country", "JP" }, // Country (default obtained from driver)
131 { "wl_country_code", "JP" }, // !!TB - Country (default to JP to allow all 14 channels)
132 { "wl_radio", "1" }, // Enable (1) or disable (0) radio
133 { "wl_closed", "0" }, // Closed (hidden) network
134 { "wl_ap_isolate", "0" }, // AP isolate mode
135 { "wl_mode", "ap" }, // AP mode (ap|sta|wds)
136 { "wl_lazywds", "1" }, // Enable "lazy" WDS mode (0|1)
137 { "wl_wds", "" }, // xx:xx:xx:xx:xx:xx ...
138 { "wl_wds_timeout", "1" }, // WDS link detection interval defualt 1 sec*/
139 { "wl_wep", "disabled" }, // WEP data encryption (enabled|disabled)
140 { "wl_auth", "0" }, // Shared key authentication optional (0) or required (1)
141 { "wl_key", "1" }, // Current WEP key
142 { "wl_key1", "" }, // 5/13 char ASCII or 10/26 char hex
143 { "wl_key2", "" }, // 5/13 char ASCII or 10/26 char hex
144 { "wl_key3", "" }, // 5/13 char ASCII or 10/26 char hex
145 { "wl_key4", "" }, // 5/13 char ASCII or 10/26 char hex
146 { "wl_maclist", "" }, // xx:xx:xx:xx:xx:xx ...
147 { "wl_channel", "6" }, // Channel number
148 { "wl_rate", "0" }, // Rate (bps, 0 for auto)
149 { "wl_mrate", "0" }, // Mcast Rate (bps, 0 for auto)
150 { "wl_rateset", "default" }, // "default" or "all" or "12"
151 { "wl_frag", "2346" }, // Fragmentation threshold
152 { "wl_rts", "2347" }, // RTS threshold
153 { "wl_dtim", "1" }, // DTIM period (3.11.5)*/ // It is best value for WiFi test
154 { "wl_bcn", "100" }, // Beacon interval
155 { "wl_plcphdr", "long" }, // 802.11b PLCP preamble type
156 { "wl_net_mode", "mixed" }, // Wireless mode (mixed|g-only|b-only|disable)
157 { "wl_gmode", "1" }, // 54g mode
158 { "wl_gmode_protection","off" }, // 802.11g RTS/CTS protection (off|auto)
159 { "wl_afterburner", "off" }, // AfterBurner
160 { "wl_frameburst", "off" }, // BRCM Frambursting mode (off|on)
161 { "wl_wme", "off" }, // WME mode (off|on)
162 { "wl_antdiv", "-1" }, // Antenna Diversity (-1|0|1|3)
163 { "wl_infra", "1" }, // Network Type (BSS/IBSS)
165 { "wl_passphrase", "" }, // Passphrase // Add
166 { "wl_wep_bit", "128" }, // WEP encryption [64 | 128] // Add
167 { "wl_wep_buf", "" }, // save all settings for web // Add
168 { "wl_wep_gen", "" }, // save all settings for generate button // Add
169 { "wl_wep_last", "" }, // Save last wl_wep mode // Add
170 { "wl_active_mac", "" }, // xx:xx:xx:xx:xx:xx ... // Add
172 // WPA parameters
173 { "security_mode2", "disabled" }, // WPA mode (disabled|radius|wpa_personal|wpa_enterprise|wep|wpa2_personal|wpa2_enterprise) for WEB // Add
174 { "security_mode", "disabled" }, // WPA mode (disabled|radius|wpa|psk|wep|psk psk2|wpa wpa2) for WEB // Add
175 { "security_mode_last", "" }, // Save last WPA mode // Add
176 { "wl_auth_mode", "none" }, // Network authentication mode (radius|none)
177 { "wl_wpa_psk", "" }, // WPA pre-shared key
178 { "wl_wpa_gtk_rekey", "3600" }, // WPA GTK rekey interval // Modify
179 { "wl_radius_ipaddr", "" }, // RADIUS server IP address
180 { "wl_radius_key", "" }, // RADIUS shared secret
181 { "wl_radius_port", "1812" }, // RADIUS server UDP port
182 { "wl_crypto", "tkip" }, // WPA data encryption
183 { "wl_net_reauth", "36000" }, // Network Re-auth/PMK caching duration
184 { "wl_akm", "" }, // WPA akm list
186 // WME parameters
187 // EDCA parameters for STA
188 { "wl_wme_sta_bk", "15 1023 7 0 0 off" }, // WME STA AC_BK paramters
189 { "wl_wme_sta_be", "15 1023 3 0 0 off" }, // WME STA AC_BE paramters
190 { "wl_wme_sta_vi", "7 15 2 6016 3008 off" }, // WME STA AC_VI paramters
191 { "wl_wme_sta_vo", "3 7 2 3264 1504 off" }, // WME STA AC_VO paramters
193 // EDCA parameters for AP
194 { "wl_wme_ap_bk", "15 1023 7 0 0 off" }, // WME AP AC_BK paramters
195 { "wl_wme_ap_be", "15 63 3 0 0 off" }, // WME AP AC_BE paramters
196 { "wl_wme_ap_vi", "7 15 1 6016 3008 off" }, // WME AP AC_VI paramters
197 { "wl_wme_ap_vo", "3 7 1 3264 1504 off" }, // WME AP AC_VO paramters
199 { "wl_wme_no_ack", "off" }, // WME No-Acknowledgmen mode
201 { "wl_unit", "0" }, // Last configured interface
202 { "wl_mac_deny", "" }, // filter MAC // Add
204 { "wl_leddc", "0x640000" }, // !!TB - 100% duty cycle for LED on router (WLAN LED fix for some routers)
205 { "wl_bss_enabled", "1" }, // !!TB - If not present the new versions of wlconf may not bring up wlan
206 { "wl_reg_mode", "off" }, // !!TB - Regulatory: 802.11H(h)/802.11D(d)/off(off)
208 { "pptp_server_ip", "" }, // as same as WAN gateway
209 { "pptp_get_ip", "" }, // IP Address assigned by PPTP server
211 // for firewall
212 { "mtu_enable", "0" }, // WAN MTU [1|0]
213 { "wan_mtu", "1500" }, // Negotiate MTU to the smaller of this value or the peer MRU
215 { "l2tp_server_ip", "" }, // L2TP auth server (IP Address)
216 { "l2tp_get_ip", "" }, // IP Address assigned by L2TP server
217 { "wan_gateway_buf", "0.0.0.0" }, // save the default gateway for DHCP
218 // hbobs { "hb_server_ip", "" }, // heartbeat auth server (IP Address)
219 // hbobs { "hb_server_domain", "" }, // heartbeat auth server (domain name)
221 // misc
222 { "t_noise", "-99" },
223 { "led_override", "" },
224 { "btn_override", "" },
225 { "btn_reset", "" },
226 { "env_path", "" },
227 { "manual_boot_nv", "0" },
228 { "wlx_hpamp", "" },
229 // { "wlx_hperx", "" }, // see init.c
230 { "t_fix1", "" },
232 // basic-ddns
233 { "ddnsx0", "" },
234 { "ddnsx1", "" },
235 { "ddnsx0_cache", "" },
236 { "ddnsx1_cache", "" },
238 // basic-network
239 { "wds_save", "" },
241 // basic-ident
242 { "router_name", "tomato" },
243 { "wan_hostname", "unknown" },
244 { "wan_domain", "" },
246 // basic-time
247 { "tm_sel", "PST8PDT,M3.2.0/2,M11.1.0/2" },
248 { "tm_tz", "PST8PDT,M3.2.0/2,M11.1.0/2" },
249 { "tm_dst", "1", },
250 { "ntp_updates", "4" },
251 { "ntp_tdod", "0" },
252 { "ntp_server", "0.pool.ntp.org 1.pool.ntp.org 2.pool.ntp.org" },
253 { "ntp_kiss", "" },
254 { "ntp_kiss_ignore", "" },
256 // basic-static
257 { "dhcpd_static", "" },
259 // basic-wfilter
260 { "wl_mac_list", "" },
261 { "wl_macmode", "disabled" },
262 { "macnames", "" },
264 // advanced-ctnf
265 { "ct_tcp_timeout", "" },
266 { "ct_udp_timeout", "" },
267 { "ct_max", "" },
268 { "nf_ttl", "0" },
269 { "nf_l7in", "1" },
270 { "nf_rtsp", "1" },
271 { "nf_pptp", "1" },
272 { "nf_h323", "1" },
273 { "nf_ftp", "1" },
275 // advanced-mac
276 { "mac_wan", "" },
277 { "mac_wl", "" },
279 // advanced-misc
280 { "boot_wait", "on" },
281 { "wait_time", "5" },
282 { "wan_speed", "4" }, // 0=10 Mb Full, 1=10 Mb Half, 2=100 Mb Full, 3=100 Mb Half, 4=Auto
284 // advanced-dhcpdns
285 { "dhcpd_dmdns", "1" },
286 { "dhcpd_slt", "0" },
287 { "dhcpd_lmax", "" },
288 { "dns_addget", "0" },
289 { "dns_intcpt", "0" },
290 { "dhcpc_minpkt", "0" },
291 { "dnsmasq_custom", "" },
292 // { "dnsmasq_norw", "0" },
294 // advanced-firewall
295 // { "block_loopback", "0" }, // nat loopback
296 { "nf_loopback", "1" },
297 { "block_wan", "1" }, // block inbound icmp
298 { "multicast_pass", "0" }, // enable multicast proxy
299 { "ne_syncookies", "0" }, // tcp_syncookies
300 { "ne_snat", "0" }, // use SNAT instead of MASQUERADE
302 // advanced-routing
303 { "routes_static", "" },
304 { "wk_mode", "gateway" }, // Network mode [gateway|router]
305 { "dr_setting", "0" }, // [ Disable | WAN | LAN | Both ]
306 { "dr_lan_tx", "0" }, // Dynamic-Routing LAN out
307 { "dr_lan_rx", "0" }, // Dynamic-Routing LAN in
308 { "dr_wan_tx", "0" }, // Dynamic-Routing WAN out
309 { "dr_wan_rx", "0" }, // Dynamic-Routing WAN in
311 // advanced-wireless
312 { "wl_txant", "3" },
313 { "wl_txpwr", "42" },
314 { "wl_maxassoc", "128" }, // Max associations driver could support
315 { "wl_distance", "" },
317 // forward-*
318 { "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>" },
319 { "trigforward", "0<1<3000:4000<5000:6000<ex: open 5000-6000 if 3000-4000>" },
320 { "dmz_enable", "0" },
321 { "dmz_ipaddr", "0" },
322 { "dmz_sip", "" },
324 // forward-upnp
325 { "upnp_enable", "0" }, // !!TB - disabled by default
326 { "upnp_ssdp_interval", "60" }, // SSDP interval
327 { "upnp_max_age", "180" }, // Max age
328 { "upnp_mnp", "0" },
329 { "upnp_config", "0" },
331 //!!TB - miniupnpd
332 { "upnp_nat_pmp_enable", "0" }, /* 0:Disable 1:Enable */
333 { "upnp_clean_ruleset_enable", "1" }, /* 0:Disable 1:Enable */
334 { "upnp_secure_mode", "1" }, /* 0:Disable 1:Enable */
335 { "upnp_clean_ruleset_interval", "600" }, /* Cleaning interval in seconds */
336 { "upnp_clean_ruleset_threshold", "20" }, /* Threshold for cleaning unused rules */
337 { "upnp_port", "0" }, /* port for HTTP traffic (0 - autoselect) */
338 { "upnp_bitrate_up", "10000000" }, /* Bitrate upstream */
339 { "upnp_bitrate_down", "100000000" }, /* Bitrate downstream*/
340 { "upnp_min_port_int", "1024" }, /* MIN PORT internal */
341 { "upnp_max_port_int", "65535" }, /* MAX PORT internal */
342 { "upnp_min_port_ext", "1024" }, /* MIN PORT external */
343 { "upnp_max_port_ext", "65535" }, /* MAX PORT external */
345 // qos
346 { "qos_enable", "0" },
347 { "qos_method", "0" }, // remove later zzz
348 { "qos_sticky", "1" }, // remove later zzz
349 { "qos_ack", "1" },
350 { "qos_syn", "0" },
351 { "qos_fin", "0" },
352 { "qos_rst", "0" },
353 { "qos_icmp", "0" },
354 { "qos_reset", "0" },
355 { "qos_obw", "230" },
356 { "qos_ibw", "1000" },
357 { "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" },
358 { "qos_burst0", "" },
359 { "qos_burst1", "" },
361 { "qos_default", "3" },
362 { "qos_orates", "80-100,10-100,5-100,3-100,2-95,1-50,1-40,1-30,1-20,1-10" },
364 { "ne_vegas", "0" }, // TCP Vegas
365 { "ne_valpha", "2" }, // "
366 { "ne_vbeta", "6" }, // "
367 { "ne_vgamma", "2" }, // "
369 // access restrictions
370 { "rruleN", "0" },
371 { "rrule0", "0|1320|300|31|||word text\n^begins-with.domain.\n.ends-with.net$\n^www.exact-domain.net$|0|example" },
372 //* { "rrule##", "" },
373 { "rrulewp", "80,8080" },
375 #if TOMATO_SL
376 // samba
377 { "smbd_on", "0" },
378 { "nmbd_on", "0" },
379 { "smbd_wgroup", "WORKGROUP" },
380 { "smbd_nbname", "TOMATO" },
381 { "smbd_adminpass", "admin" },
382 #endif
384 // admin-access
385 { "http_username", "" }, // Username
386 { "http_passwd", "admin" }, // Password
387 { "remote_management", "0" }, // Remote Management [1|0]
388 { "remote_mgt_https", "0" }, // Remote Management use https [1|0]
389 { "http_wanport", "8080" }, // WAN port to listen on
390 { "http_lanport", "80" }, // LAN port to listen on
391 { "https_lanport", "443" }, // LAN port to listen on
392 { "http_enable", "1" }, // HTTP server enable/disable
393 { "https_enable", "0" }, // HTTPS server enable/disable
394 { "https_crt_save", "0" },
395 { "https_crt_cn", "" },
396 { "https_crt_file", "" },
397 { "https_crt", "" },
398 { "web_wl_filter", "0" }, // Allow/Deny Wireless Access Web
399 { "web_favicon", "0" },
400 { "web_css", "tomato" },
401 { "web_svg", "1" },
402 { "telnetd_eas", "1" },
403 { "telnetd_port", "23" },
404 { "sshd_eas", "0" },
405 { "sshd_pass", "1" },
406 { "sshd_port", "22" },
407 { "sshd_remote", "0" },
408 { "sshd_rport", "2222" },
409 { "sshd_authkeys", "" },
410 { "sshd_hostkey", "" },
411 { "sshd_forwarding", "1" },
412 { "rmgt_sip", "" }, // remote management: source ip address
414 { "http_id", "" },
416 // admin-bwm
417 { "rstats_enable", "1" },
418 { "rstats_path", "" },
419 { "rstats_stime", "48" },
420 { "rstats_offset", "1" },
421 { "rstats_data", "" },
422 { "rstats_colors", "" },
423 { "rstats_exclude", "" },
424 { "rstats_sshut", "1" },
425 { "rstats_bak", "0" },
427 // advanced-buttons
428 { "sesx_led", "0" },
429 { "sesx_b0", "1" },
430 { "sesx_b1", "4" },
431 { "sesx_b2", "4" },
432 { "sesx_b3", "4" },
433 { "sesx_script",
434 "[ $1 -ge 20 ] && telnetd -p 233 -l /bin/sh\n"
436 { "script_brau",
437 "if [ ! -e /tmp/switch-start ]; then\n"
438 " # do something at startup\n"
439 " echo position at startup was $1 >/tmp/switch-start\n"
440 " exit\n"
441 "fi\n"
442 "if [ $1 = \"bridge\" ]; then\n"
443 " # do something\n"
444 " led bridge on\n"
445 "elif [ $1 = \"auto\" ]; then\n"
446 " # do something\n"
447 " led bridge off\n"
448 "fi\n"
451 // admin-log
452 { "log_remote", "0" },
453 { "log_remoteip", "" },
454 { "log_remoteport", "514" },
455 { "log_file", "1" },
456 { "log_limit", "60" },
457 { "log_in", "0" },
458 { "log_out", "0" },
459 { "log_mark", "60" },
460 { "log_events", "" },
462 // admin-debugging
463 { "debug_nocommit", "0" },
464 { "debug_cprintf", "0" },
465 { "debug_cprintf_file", "0" },
466 // { "debug_keepfiles", "0" },
467 { "console_loglevel", "1" },
468 { "t_cafree", "0" },
469 { "t_hidelr", "0" },
470 { "debug_clkfix", "1" },
471 { "debug_ddns", "0" },
473 // admin-cifs
474 { "cifs1", "" },
475 { "cifs2", "" },
477 // admin-jffs2
478 { "jffs2_on", "0" },
479 { "jffs2_exec", "" },
481 // nas-usb - !!TB
482 { "usb_enable", "0" },
483 { "usb_uhci", "0" },
484 { "usb_ohci", "0" },
485 { "usb_usb2", "0" },
486 { "usb_storage", "0" },
487 { "usb_printer", "0" },
488 { "usb_printer_bidirect", "1" },
489 { "usb_fs_ext3", "0" },
490 { "usb_fs_fat", "0" },
491 { "usb_automount", "0" },
492 { "usb_bdflush", "30 500 0 0 100 100 60 0 0" },
493 { "script_usbhotplug", "" },
494 { "script_usbmount", "" },
495 { "script_usbumount", "" },
497 #ifdef TCONFIG_FTP
498 // nas-ftp - !!TB
499 { "ftp_enable", "0" },
500 { "ftp_super", "0" },
501 { "ftp_anonymous", "0" },
502 { "ftp_dirlist", "0" },
503 { "ftp_port", "21" },
504 { "ftp_max", "0" },
505 { "ftp_ipmax", "0" },
506 { "ftp_staytimeout", "300" },
507 { "ftp_rate", "0" },
508 { "ftp_anonrate", "0" },
509 { "ftp_anonroot", "" },
510 { "ftp_pubroot", "" },
511 { "ftp_pvtroot", "" },
512 { "ftp_users", "" },
513 { "ftp_custom", "" },
514 { "log_ftp", "0" },
515 #endif
517 #ifdef TCONFIG_SAMBASRV
518 // nas-samba - !!TB
519 { "smbd_enable", "0" },
520 { "smbd_wgroup", "WORKGROUP" },
521 { "smbd_cpage", "" },
522 { "smbd_cset", "utf8" },
523 { "smbd_loglevel", "0" },
524 { "smbd_custom", "" },
525 { "smbd_autoshare", "1" },
526 { "smbd_shares",
527 "share</mnt<Default Share<0<0>root$</<Hidden Root<0<1"
529 { "smbd_user", "nas" },
530 { "smbd_passwd", "" },
531 { "smbd_master", "1" },
532 #endif
534 // admin-sch
535 { "sch_rboot", "" },
536 { "sch_rcon", "" },
537 { "sch_c1", "" },
538 { "sch_c2", "" },
539 { "sch_c3", "" },
540 { "sch_c1_cmd", "" },
541 { "sch_c2_cmd", "" },
542 { "sch_c3_cmd", "" },
544 // admin-script
545 { "script_init", "" },
546 { "script_shut", "" },
547 { "script_fire", "" },
548 { "script_wanup", "" },
550 #ifdef TCONFIG_OPENVPN
551 // vpn
552 { "vpn_debug", "0" },
553 { "vpn_server_eas", "" },
554 { "vpn_server_dns", "" },
555 { "vpn_server1_if", "tun" },
556 { "vpn_server1_proto", "udp" },
557 { "vpn_server1_port", "1194" },
558 { "vpn_server1_firewall", "auto" },
559 { "vpn_server1_crypt", "tls" },
560 { "vpn_server1_comp", "adaptive" },
561 { "vpn_server1_cipher", "default" },
562 { "vpn_server1_dhcp", "1" },
563 { "vpn_server1_r1", "192.168.1.50" },
564 { "vpn_server1_r2", "192.168.1.55" },
565 { "vpn_server1_sn", "10.8.0.0" },
566 { "vpn_server1_nm", "255.255.255.0" },
567 { "vpn_server1_local", "10.8.0.1" },
568 { "vpn_server1_remote", "10.8.0.2" },
569 { "vpn_server1_hmac", "-1" },
570 { "vpn_server1_ccd", "0" },
571 { "vpn_server1_c2c", "0" },
572 { "vpn_server1_ccd_excl", "0" },
573 { "vpn_server1_ccd_val", "" },
574 { "vpn_server1_custom", "" },
575 { "vpn_server1_static", "" },
576 { "vpn_server1_ca", "" },
577 { "vpn_server1_cert", "" },
578 { "vpn_server1_key", "" },
579 { "vpn_server1_dh", "" },
580 { "vpn_server2_if", "tun" },
581 { "vpn_server2_proto", "udp" },
582 { "vpn_server2_port", "1194" },
583 { "vpn_server2_firewall", "auto" },
584 { "vpn_server2_crypt", "tls" },
585 { "vpn_server2_comp", "adaptive" },
586 { "vpn_server2_cipher", "default" },
587 { "vpn_server2_dhcp", "1" },
588 { "vpn_server2_r1", "192.168.1.50" },
589 { "vpn_server2_r2", "192.168.1.55" },
590 { "vpn_server2_sn", "10.8.0.0" },
591 { "vpn_server2_nm", "255.255.255.0" },
592 { "vpn_server2_local", "10.8.0.1" },
593 { "vpn_server2_remote", "10.8.0.2" },
594 { "vpn_server2_hmac", "-1" },
595 { "vpn_server2_ccd", "0" },
596 { "vpn_server2_c2c", "0" },
597 { "vpn_server2_ccd_excl", "0" },
598 { "vpn_server2_ccd_val", "" },
599 { "vpn_server2_custom", "" },
600 { "vpn_server2_static", "" },
601 { "vpn_server2_ca", "" },
602 { "vpn_server2_cert", "" },
603 { "vpn_server2_key", "" },
604 { "vpn_server2_dh", "" },
605 { "vpn_client_eas", "" },
606 { "vpn_client1_if", "tun" },
607 { "vpn_client1_bridge", "1" },
608 { "vpn_client1_nat", "1" },
609 { "vpn_client1_proto", "udp" },
610 { "vpn_client1_addr", "" },
611 { "vpn_client1_port", "1194" },
612 { "vpn_client1_retry", "30" },
613 { "vpn_client1_rg", "0" },
614 { "vpn_client1_firewall", "auto" },
615 { "vpn_client1_crypt", "tls" },
616 { "vpn_client1_comp", "adaptive" },
617 { "vpn_client1_cipher", "default" },
618 { "vpn_client1_local", "10.8.0.2" },
619 { "vpn_client1_remote", "10.8.0.1" },
620 { "vpn_client1_nm", "255.255.255.0" },
621 { "vpn_client1_hmac", "-1" },
622 { "vpn_client1_custom", "" },
623 { "vpn_client1_static", "" },
624 { "vpn_client1_ca", "" },
625 { "vpn_client1_cert", "" },
626 { "vpn_client1_key", "" },
627 { "vpn_client2_if", "tun" },
628 { "vpn_client2_bridge", "1" },
629 { "vpn_client2_nat", "1" },
630 { "vpn_client2_proto", "udp" },
631 { "vpn_client2_addr", "" },
632 { "vpn_client2_port", "1194" },
633 { "vpn_client2_retry", "30" },
634 { "vpn_client2_rg", "0" },
635 { "vpn_client2_firewall", "auto" },
636 { "vpn_client2_crypt", "tls" },
637 { "vpn_client2_comp", "adaptive" },
638 { "vpn_client2_cipher", "default" },
639 { "vpn_client2_local", "10.8.0.2" },
640 { "vpn_client2_remote", "10.8.0.1" },
641 { "vpn_client2_nm", "255.255.255.0" },
642 { "vpn_client2_hmac", "-1" },
643 { "vpn_client2_custom", "" },
644 { "vpn_client2_static", "" },
645 { "vpn_client2_ca", "" },
646 { "vpn_client2_cert", "" },
647 { "vpn_client2_key", "" },
648 #endif // vpn
650 #if 0
651 // safe to remove?
652 { "QoS", "0" },
654 { "ses_enable", "0" }, // enable ses
655 { "ses_event", "2" }, // initial ses event
656 { "ses_led_assertlvl", "0" }, // For SES II
657 { "ses_client_join", "0" }, // For SES II
658 { "ses_sw_btn_status", "DEFAULTS" }, // Barry Adds 20050309 for SW SES BTN
659 { "ses_count", "0" },
660 { "eou_configured", "0" },
662 { "port_priority_1", "0" }, // port 1 priority; 1:high, 0:low
663 { "port_flow_control_1", "1" }, // port 1 flow control; 1:enable, 0:disable
664 { "port_rate_limit_1", "0" }, // port 1 rate limit: 256k,512k,1M,2M,5M,10M,20M,50M
665 { "port_priority_2", "0" }, // port 2 priority; 1:high, 0:low
666 { "port_flow_control_2", "1" }, // port 2 flow control; 1:enable, 0:disable
667 { "port_rate_limit_2", "0" }, // port 2 rate limit: 256k,512k,1M,2M,5M,10M,20M,50M
668 { "port_priority_3", "0" }, // port 3 priority; 1:high, 0:low
669 { "port_flow_control_3", "1" }, // port 3 flow control; 1:enable, 0:disable
670 { "port_rate_limit_3", "0" }, // port 3 rate limit: 256k,512k,1M,2M,5M,10M,20M,50M
671 { "port_priority_4", "0" }, // port 4 priority; 1:high, 0:low
672 { "port_flow_control_4", "1" }, // port 4 flow control; 1:enable, 0:disable
673 { "port_rate_limit_4", "0" }, // port 4 rate limit: 256k,512k,1M,2M,5M,10M,20M,50M
675 //obs zzz { "http_method", "post" }, // HTTP method
677 // { "wl_macmode1", "disabled" },
679 /* obsolete
680 { "filter", "on" }, // Firewall Protection [on|off]
681 { "ipsec_pass", "1" }, // IPSec Pass Through [1|0]
682 { "pptp_pass", "1" }, // PPTP Pass Through [1|0]
683 { "l2tp_pass", "1" }, // L2TP Pass Through [1|0]
684 { "block_cookie", "0" }, // Block Cookie [1|0]
685 { "ident_pass", "0" }, // IDENT passthrough [1|0]
686 { "block_proxy", "0" }, // Block Proxy [1|0]
689 /* --- obsolete ---
690 { "forward_port", "" }, // name:[on|off]:[tcp|udp|both]:wan_port>lan_ipaddr:lan_port0
691 { "port_trigger", "" }, // name:[on|off]:[tcp|udp|both]:wan_port0-wan_port1>lan_port0-lan_port1
693 // for mac clone
694 { "mac_clone_enable", "0" }, // User define WAN interface MAC address
695 { "def_hwaddr", "00:00:00:00:00:00" }, // User define WAN interface MAC address
697 { "public_ip", "" }, // public ip
700 //forced in rc.c { "os_name", "" }, // OS name string
701 //forced in rc.c { "os_version", EPI_VERSION_STR }, // OS revision
702 //forced in rc.c { "os_date", __DATE__ }, // OS date
703 //not used { "ct_modules", "" }, // CyberTAN kernel modules
704 //obs { "timer_interval", "3600" }, // Timer interval in seconds
705 //obs { "ezc_enable", "1" }, // Enable EZConfig updates
706 //obs { "ezc_version", EZC_VERSION_STR }, // EZConfig version
707 //obs { "is_default", "1" }, // is it default setting: 1:yes 0:no*/
708 //obs { "os_server", "" }, // URL for getting upgrades
709 //obs { "stats_server", "" }, // URL for posting stats -- used by httpd/stats.c
710 //obs { "router_disable", "0" }, // lan_proto=static lan_stp=0 wan_proto=disabled
711 //obs { "fw_disable", "0" }, // Disable firewall (allow new connections from the WAN)
712 //obs { "static_route", "" }, // Static routes (ipaddr:netmask:gateway:metric:ifname ...)
713 //obs { "static_route_name", "" }, // Static routes name ($NAME:name)
714 // { "filter_port", "" }, // [lan_ipaddr|*]:lan_port0-lan_port1
715 //{ "dhcp_end", "150" }, // Last assignable DHCP address // Remove
716 //zzz not used { "dhcp_wins", "wan" }, // Use WAN WINS first if available (wan|lan)
717 //{ "eou_device_id", "" },
718 //{ "eou_public_key", "" },
719 //{ "eou_private_key", "" },
720 //{ "eou_public", "b49b5ec6866f5b166cc058110b20551d4fe7a5c96a9b5f01a3929f40015e4248359732b7467bae4948d6bb62f96996a7122c6834311c1ea276b35d12c37895501c0f5bd215499cf443d580b999830ac620ac2bf3b7f912741f54fea17627d13a92f44d014030d5c8d3249df385f500ffc90311563e89aa290e7c6f06ef9a6ec311" },
721 //{ "eou_private", "1fdf2ed7bd5ef1f4e603d34e4d41f0e70e19d1f65e1b6b1e6828eeed2d6afca354c0543e75d9973a1be9a898fed665e13f713f90bd5f50b3421fa7034fabde1ce63c44d01a5489765dc4dc3486521163bf6288db6c5e99c44bbb0ad7494fef20148ad862662dabcbff8dae7b466fad087d9f4754e9a6c84bc9adcbda7bc22e59" },
722 { "eou_expired_hour", "72" }, //The expired time is 72 hours, and this value = 72 * 10*/
723 // { "ntp_enable", "1" }, // replaced with ntp_updates
724 // { "ntp_mode", "auto" }, // auto, manual
727 // for AOL
728 { "aol_block_traffic", "0" }, // 0:Disable 1:Enable for global
729 { "aol_block_traffic1", "0" }, // 0:Disable 1:Enable for "ppp_username"
730 { "aol_block_traffic2", "0" }, // 0:Disable 1:Enable for "Parental control"
731 { "skip_amd_check", "0" }, // 0:Disable 1:Enable
732 { "skip_intel_check", "0" }, // 0:Disable 1:Enable
734 // advanced-watchdog
735 { "wd_en", "" },
736 { "wd_atp0", "" },
737 { "wd_atp1", "" },
738 { "wd_atp2", "" },
739 { "wd_atp3", "" },
740 { "wd_atp4", "" },
741 { "wd_mxr", "3" },
742 { "wd_rdy", "15" },
743 { "wd_cki", "300" },
744 { "wd_fdm", "" },
745 { "wd_aof", "" },
747 #endif // 0
749 { NULL, NULL }
752 const defaults_t if_generic[] = {
753 { "lan_ifname", "br0" },
754 { "lan_ifnames", "eth0 eth2 eth3 eth4" },
755 { "wan_ifname", "eth1" },
756 { "wan_ifnames", "eth1" },
757 { NULL, NULL }
760 const defaults_t if_vlan[] = {
761 { "lan_ifname", "br0" },
762 { "lan_ifnames", "vlan0 eth1 eth2 eth3" },
763 { "wan_ifname", "vlan1" },
764 { "wan_ifnames", "vlan1" },
765 { NULL, NULL }