Project

General

Profile

Download (5.48 KB) Statistics
| Branch: | Tag: | Revision:
1 5b237745 Scott Ullrich
<?php
2 307cd525 Bill Marquette
/* $Id$ */
3 5b237745 Scott Ullrich
/*
4
    globals.inc
5 ee11cc6e Scott Ullrich
    part of pfSense (www.pfsense.com)
6 abe7607f Scott Ullrich
    Copyright (C) 2004-2010 Scott Ullrich
7 ee11cc6e Scott Ullrich
8
    Originally Part of m0n0wall
9 5b237745 Scott Ullrich
    Copyright (C) 2003-2004 Manuel Kasper <mk@neon1.net>.
10
    All rights reserved.
11 ee11cc6e Scott Ullrich
12 5b237745 Scott Ullrich
    Redistribution and use in source and binary forms, with or without
13
    modification, are permitted provided that the following conditions are met:
14 ee11cc6e Scott Ullrich
15 5b237745 Scott Ullrich
    1. Redistributions of source code must retain the above copyright notice,
16
       this list of conditions and the following disclaimer.
17 ee11cc6e Scott Ullrich
18 5b237745 Scott Ullrich
    2. Redistributions in binary form must reproduce the above copyright
19
       notice, this list of conditions and the following disclaimer in the
20
       documentation and/or other materials provided with the distribution.
21 ee11cc6e Scott Ullrich
22 5b237745 Scott Ullrich
    THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
23
    INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
24
    AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
25
    AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
26
    OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
27
    SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
28
    INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
29
    CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
30
    ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
31
    POSSIBILITY OF SUCH DAMAGE.
32 523855b0 Scott Ullrich
33
	pfSense_MODULE:	utils
34
35 5b237745 Scott Ullrich
*/
36
37 3f9a98c1 Scott Ullrich
function remove_numbers($string) {
38
	$nums = array("1", "2", "3", "4", "5", "6", "7", "8", "9", "0", " ");
39
	$string = str_replace($nums, '', $string);
40
	return $string;
41
}
42
43 5b237745 Scott Ullrich
$g = array(
44 4a8bc5a2 Scott Ullrich
	"base_packages" => "siproxd", 
45 0ae6daf8 Ermal
	"event_address" => "unix:///var/run/check_reload_status",
46 4b96b367 mgrooms
	"factory_shipped_username" => "admin",
47 46974905 Chris Buechler
	"factory_shipped_password" => "pfsense",
48 1ef7b568 Scott Ullrich
	"upload_path" => "/root",
49 e9e7d501 Matthew Grooms
	"dhcpd_chroot_path" => "/var/dhcpd",
50 a36a239a Warren Baker
	"unbound_chroot_path" => "/var/unbound",
51 e9e7d501 Matthew Grooms
	"varrun_path" => "/var/run",
52
	"varetc_path" => "/var/etc",
53
	"vardb_path" => "/var/db",
54
	"varlog_path" => "/var/log",
55
	"etc_path" => "/etc",
56
	"tmp_path" => "/tmp",
57
	"conf_path" => "/conf",
58
	"ftmp_path" => "/ftmp",
59
	"conf_default_path" => "/conf.default",
60
	"cf_path" => "/cf",
61
	"cf_conf_path" => "/cf/conf",
62
	"www_path" => "/usr/local/www",
63
	"xml_rootobj" => "pfsense",
64
	"admin_group" => "admins",
65 36d0358b Scott Ullrich
	"product_name" => "pfSense",
66 c57e9f90 Chris Buechler
	"product_copyright" => "BSD Perimeter LLC",
67 3d7639eb Scott Ullrich
	"product_copyright_url" => "http://www.bsdperimeter.com",
68 932052bd Chris Buechler
	"product_copyright_years" => "2004 - 2012",
69 73113ce9 Ermal Luci
	"product_website" => "www.pfsense.org",
70 3d7639eb Scott Ullrich
	"product_website_footer" => "http://www.pfsense.org/?gui20",
71 c57e9f90 Chris Buechler
	"product_email" => "coreteam@pfsense.org",
72 3d7639eb Scott Ullrich
	"hideplatform" => false,
73 3ff39566 Scott Ullrich
	"hidedownloadbackup" => false,
74 8b289232 Chris Buechler
	"disablethemeselection" => false,
75 3b29612f Chris Buechler
	"disablehelpmenu" => false,
76 28181237 Renato Botelho
	"disablehelpicon" => false,
77 36365f49 Scott Ullrich
	"disablecrashreporter" => false,
78 4b665f74 Scott Ullrich
	"crashreporterurl" => "http://crashreporter.pfsense.org/crash_reporter.php",
79 e9e7d501 Matthew Grooms
	"debug" => false,
80 c9ba2f8a Ermal
	"latest_config" => "9.1",
81 e9e7d501 Matthew Grooms
	"nopkg_platforms" => array("cdrom"),
82 67b0ed57 Chris Buechler
	"minimum_ram_warning" => "101",
83 9f274393 Chris Buechler
	"minimum_ram_warning_text" => "128 MB",
84 73d0efb9 Chris Buechler
	"minimum_nic_count" => "1",
85
	"minimum_nic_count_text" => "*AT LEAST* 1",	
86 954d8f12 Scott Ullrich
	"wan_interface_name" => "wan", 
87 e9e7d501 Matthew Grooms
	"nopccard_platforms" => array("wrap", "net48xx"),
88
	"xmlrpcbaseurl" => "www.pfsense.com",
89
	"captiveportal_path" => "/usr/local/captiveportal",
90
	"captiveportal_element_path" => "/var/db/cpelements",
91 c2d0699f Scott Ullrich
	"captiveportal_element_sizelimit" => 1048576,
92 e9e7d501 Matthew Grooms
	"xmlrpcpath" => "/pfSense/xmlrpc.php",
93
	"embeddedbootupslice" => "/dev/ad0a",
94 e3a13b00 Scott Ullrich
	"services_dhcp_server_enable" => true,
95 8c62fa48 jim-p
	"wireless_regex" => "/^(ndis|wi|ath|an|ral|ural|iwi|wlan|rum|run|bwn|zyd|mwl|bwi|ipw|iwn|malo|uath|upgt|urtw|wpi)/",
96 462c4a27 jim-p
	"help_base_url" => "/help.php"
97 5b237745 Scott Ullrich
);
98
99 a03e3c1f Bill Marquette
/* IP TOS flags */
100 ec6adc21 Bill Marquette
$iptos = array("lowdelay", "throughput", "reliability");
101 a03e3c1f Bill Marquette
102
/* TCP flags */
103 79cc9e6b bcyrill
$tcpflags = array("syn", "ack", "fin", "rst", "psh", "urg", "ece", "cwr");
104 a03e3c1f Bill Marquette
105 b24a7390 Scott Ullrich
if(file_exists("/etc/platform")) {
106 9a7f6731 Ermal
	$arch = php_uname("m");
107 03cc2016 Erik
	$g['platform'] = trim(file_get_contents("/etc/platform"));
108 aadf2c9f Scott Ullrich
	if($g['platform'] == "nanobsd") {
109 4b340c90 smos
		$g['update_url']="http://snapshots.pfsense.org/FreeBSD_RELENG_8_3/{$arch}/pfSense_HEAD/.updaters/";
110 aadf2c9f Scott Ullrich
		$g['update_manifest']="http://updates.pfSense.com/nanobsd/manifest";
111 b4a9785a jim-p
		$g['firmware_update_text']="pfSense-*.img.gz";
112 fdcd8ac7 jim-p
113 aadf2c9f Scott Ullrich
	} else {
114 4b340c90 smos
		$g['update_url']="http://snapshots.pfsense.org/FreeBSD_RELENG_8_3/{$arch}/pfSense_HEAD/.updaters/";
115 aadf2c9f Scott Ullrich
		$g['update_manifest']="http://updates.pfSense.com/manifest";
116 b4a9785a jim-p
		$g['firmware_update_text']="pfSense-*.tgz";
117 aadf2c9f Scott Ullrich
	}
118 b24a7390 Scott Ullrich
}
119
120 3a35f55f Scott Ullrich
/* Default sysctls */
121
$sysctls = array("net.inet.ip.portrange.first" => "1024", 
122 feae85bc Scott Ullrich
	"net.inet.tcp.blackhole" => "2", 
123
	"net.inet.udp.blackhole" => "1", 
124
	"net.inet.ip.random_id" => "1", 
125
	"net.inet.tcp.drop_synfin" => "1", 
126
	"net.inet.ip.redirect" => "1", 
127
	"net.inet6.ip6.redirect" => "1", 
128
	"net.inet.tcp.syncookies" => "1", 
129
	"net.inet.tcp.recvspace" => "65228", 
130
	"net.inet.tcp.sendspace" => "65228", 
131 4f76b144 Ermal
	"net.inet.ip.fastforwarding" => "0", 
132 feae85bc Scott Ullrich
	"net.inet.tcp.delayed_ack" => "0", 
133
	"net.inet.udp.maxdgram" => "57344", 
134
	"net.link.bridge.pfil_onlyip" => "0", 
135
	"net.link.bridge.pfil_member" => "1", 
136
	"net.link.bridge.pfil_bridge" => "0", 
137
	"net.link.tap.user_open" => "1", 
138
	"kern.randompid" => "347", 
139
	"net.inet.ip.intr_queue_maxlen" => "1000", 
140
	"hw.syscons.kbd_reboot" => "0", 
141
	"net.inet.tcp.inflight.enable" => "1", 
142
	"net.inet.tcp.log_debug" => "0", 
143
	"net.inet.tcp.tso" => "1", 
144
	"net.inet.icmp.icmplim" => "0",
145 abe7607f Scott Ullrich
	"vfs.read_max" => "32",
146 2b7ca9b2 Ermal
	"kern.ipc.maxsockbuf" => "4262144",
147 d8e73863 Ermal
	"debug.pfftpproxy" => "0",
148 c06240db Ermal
	"net.inet.ip.process_options" => 0,
149
	"vfs.forcesync" => 0
150 feae85bc Scott Ullrich
);
151 3a35f55f Scott Ullrich
152 1883455a Ermal
$config_parsed = false;
153 9734b054 Scott Ullrich
154 2b7ca9b2 Ermal
?>