Project

General

Profile

Download (18.8 KB) Statistics
| Branch: | Tag: | Revision:
1 7a23e419 Scott Ullrich
<?xml version="1.0" encoding="utf-8" ?>
2 e48fc17d Scott Ullrich
<pfsensewizard>
3 6aed3a2e Bill Marquette
<copyright>
4
/* $Id$ */
5
/*
6
	setup.xml
7
        part of pfSense (http://www.pfsense.org/)
8
9
	Copyright (C) 2004, 2005 Scott Ullrich
10
        All rights reserved.
11
12
        Redistribution and use in source and binary forms, with or without
13
        modification, are permitted provided that the following conditions are met:
14
15
        1. Redistributions of source code must retain the above copyright notice,
16
           this list of conditions and the following disclaimer.
17
18
        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
22
        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
*/
33
</copyright>
34 cc0ef90e Scott Ullrich
<totalsteps>8</totalsteps>
35 19fd2947 Scott Ullrich
<step>
36
	<id>1</id>
37
	<title>pfSense Setup Wizard</title>
38 34b5c5a0 Scott Ullrich
	<disableheader>true</disableheader>
39 2a8143e5 Scott Ullrich
	<description>This wizard will guide you through the initial configuration of pfSense.</description>
40 19fd2947 Scott Ullrich
	<fields>
41 e48fc17d Scott Ullrich
		<field>
42
			<name>Next</name>
43
			<type>submit</type>
44
		</field>
45 19fd2947 Scott Ullrich
	</fields>
46 e2c8c1aa Scott Ullrich
	<stepbeforeformdisplay>
47 2131ed2f Scott Ullrich
		conf_mount_rw();
48
		unlink_if_exists('/conf/trigger_initial_wizard');
49
		conf_mount_ro();
50
	</stepbeforeformdisplay>
51 19fd2947 Scott Ullrich
</step>
52
<step>
53
	<id>2</id>
54 8773b899 Scott Ullrich
	<title>General Information</title>
55 22a11a58 Larry Gilbert
	<description>On this screen you will set the general pfSense parameters.</description>
56 8773b899 Scott Ullrich
	<fields>
57 4de543fa Scott Ullrich
		<field>
58
			<name>Hostname</name>
59
			<type>input</type>
60
			<bindstofield>system->hostname</bindstofield>
61
			<description>EXAMPLE: myserver</description>
62 618e43ca jim-p
			<validate>^[a-z0-9.|-]+$</validate>
63
			<message>Invalid Hostname</message>
64 4de543fa Scott Ullrich
		</field>
65
		<field>
66
			<name>Domain</name>
67
			<type>input</type>
68
			<bindstofield>system->domain</bindstofield>
69
			<description>EXAMPLE: mydomain.com</description>
70 f4da1ccd Scott Ullrich
			<validate>^[a-z0-9.|-]+$</validate>
71 6bb5c9aa Bill Marquette
			<message>Domain name field is invalid</message>
72 dd627071 Scott Ullrich
		</field>
73 8773b899 Scott Ullrich
		<field>
74
			<name>Primary DNS Server</name>
75
			<type>input</type>
76 e48fc17d Scott Ullrich
			<bindstofield>system->dnsserver</bindstofield>
77
			<!-- we must unset the fields because this is an array. -->
78
			<unsetfield>yes</unsetfield>
79 a8df0181 Scott Ullrich
			<arraynum>0</arraynum>
80 618e43ca jim-p
			<validate>^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$</validate>
81
			<message>Primary DNS Server field is invalid</message>
82 dd627071 Scott Ullrich
		</field>
83 8773b899 Scott Ullrich
		<field>
84
			<name>Secondary DNS Server</name>
85
			<type>input</type>
86 e48fc17d Scott Ullrich
			<bindstofield>system->dnsserver</bindstofield>
87 a8df0181 Scott Ullrich
			<arraynum>1</arraynum>
88 618e43ca jim-p
			<validate>^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$</validate>
89
			<message>Secondary DNS Server field is invalid</message>
90 8773b899 Scott Ullrich
		</field>
91 f39fe79e Ermal Lu?i
		<field>
92
			<name>Override DNS</name>
93
			<description>Allow DNS servers to be overridden by DHCP/PPP on WAN</description>
94
			<type>checkbox</type>
95
			<bindstofield>system->dnsallowoverride</bindstofield>
96
		</field>
97 8773b899 Scott Ullrich
		<field>
98
			<name>Next</name>
99
			<type>submit</type>
100
		</field>
101
	</fields>
102 618e43ca jim-p
	<stepsubmitphpaction>
103
		<![CDATA[
104
		if(empty($_POST['hostname']) || !is_hostname($_POST['hostname'])) {
105
			print_info_box_np("Hostname is invalid. Please press back in your browser window and correct.");
106
			die;
107
		}
108
		if(empty($_POST['domain']) || !is_domain($_POST['domain'])) {
109
			print_info_box_np("Domain is invalid. Please press back in your browser window and correct.");
110
			die;
111
		}
112
		if(!empty($_POST['primarydnsserver']) && !is_ipaddr($_POST['primarydnsserver'])) {
113
			print_info_box_np("Primary DNS server is invalid. Please press back in your browser window and correct.");
114
			die;
115
		}
116
		if(!empty($_POST['secondarydnsserver']) && !is_ipaddr($_POST['secondarydnsserver'])) {
117
			print_info_box_np("Second DNS server is invalid. Please press back in your browser window and correct.");
118
			die;
119
		}
120
		]]>
121
	</stepsubmitphpaction>
122 dd627071 Scott Ullrich
</step>
123 8773b899 Scott Ullrich
<step>
124
	<id>3</id>
125 4de543fa Scott Ullrich
	<title>Time Server Information</title>
126 19fd2947 Scott Ullrich
	<description>Please enter the time, date and time zone.</description>
127
	<fields>
128 ac60cb51 Scott Ullrich
		<field>
129 703539b6 Chris Buechler
			<name>Time server hostname</name>
130
			<description>Enter the hostname (FQDN) of the time server.</description>
131 ac60cb51 Scott Ullrich
			<type>input</type>
132 4de543fa Scott Ullrich
			<bindstofield>system->timeservers</bindstofield>
133 ff93a5c1 jim-p
			<validate>^[a-z0-9.|-]+$</validate>
134
			<message>Invalid Time Server Field</message>
135 8773b899 Scott Ullrich
		</field>
136
		<field>
137
			<name>Timezone</name>
138 bd31336e Scott Ullrich
			<type>timezone_select</type>
139
			<bindstofield>system->timezone</bindstofield>
140 8773b899 Scott Ullrich
		</field>
141
		<field>
142
			<name>Next</name>
143
			<type>submit</type>
144 dd627071 Scott Ullrich
		</field>
145 19fd2947 Scott Ullrich
	</fields>
146 ff93a5c1 jim-p
	<stepsubmitphpaction>
147
		<![CDATA[
148
		if(!empty($_POST['timeserverhostname']) && !(is_hostname($_POST['timeserverhostname']) || is_ipaddr($_POST['timeserverhostname']))) {
149
			print_info_box_np("Invalid Time Server. Please press back in your browser window and correct.");
150
			die;
151
		}
152
		]]>
153
	</stepsubmitphpaction>
154 19fd2947 Scott Ullrich
</step>
155 8773b899 Scott Ullrich
<step>
156
	<id>4</id>
157 34b5c5a0 Scott Ullrich
	<disableallfieldsbydefault>true</disableallfieldsbydefault>
158 e48fc17d Scott Ullrich
	<title>Configure WAN Interface</title>
159 8773b899 Scott Ullrich
	<description>On this screen we will configure the Wide Area Network information.</description>
160 34b5c5a0 Scott Ullrich
	<javascriptafterformdisplay>
161 ffe75109 Scott Ullrich
		var selectedItem = 0;
162
		if(document.forms[0].ipaddress.value == 'dhcp') {
163
			selectedItem = 1;
164
			document.forms[0].ipaddress.value = '';
165
		} else if(document.forms[0].ipaddress.value == 'PPPoE') {
166
			selectedItem = 2;
167
			document.forms[0].ipaddress.value = '';
168
		} else if(document.forms[0].ipaddress.value == 'PPTP') {
169
			selectedItem = 3;
170
			document.forms[0].ipaddress.value = '';
171
		} else if(document.forms[0].ipaddress.value == 'BigPond') {
172
			selectedItem = 4;
173
			document.forms[0].ipaddress.value = '';
174
		} else {
175 dd627071 Scott Ullrich
			selectedItem = 0;
176 ffe75109 Scott Ullrich
		}
177 b1919dd0 Scott Ullrich
		document.forms[0].selectedtype.selectedIndex = selectedItem;
178 ffe75109 Scott Ullrich
		enableitems(selectedItem);
179 dd627071 Scott Ullrich
	</javascriptafterformdisplay>
180 8773b899 Scott Ullrich
	<fields>
181 dd627071 Scott Ullrich
		<field>
182 34b5c5a0 Scott Ullrich
			<name>SelectedType</name>
183
			<type>select</type>
184
			<donotdisable>true</donotdisable>
185
			<options>
186
				<option>
187
					<name>Static</name>
188
					<value>Static</value>
189
					<enablefields>ipaddress,subnetmask,gateway</enablefields>
190 dd627071 Scott Ullrich
				</option>
191 34b5c5a0 Scott Ullrich
				<option>
192
					<name>DHCP</name>
193
					<value>dhcp</value>
194 dd627071 Scott Ullrich
					<enablefields>dhcphostname</enablefields>
195 34b5c5a0 Scott Ullrich
				</option>
196
				<option>
197
					<name>PPPoE</name>
198 9e9a6bd1 Scott Ullrich
					<value>pppoe</value>
199 dd627071 Scott Ullrich
					<enablefields>pppoeusername,pppoepassword,pppoeservicename,pppoedialondemand,pppoeidletimeout</enablefields>
200 34b5c5a0 Scott Ullrich
				</option>
201
				<option>
202
					<name>PPTP</name>
203 9e9a6bd1 Scott Ullrich
					<value>pptp</value>
204 34b5c5a0 Scott Ullrich
					<enablefields>pptpusername,pptppassword,pptplocalipaddress,pptplocalsubnet,pptpremoteipaddress,pptpdialondemand,pptpidletimeout
205 dd627071 Scott Ullrich
					</enablefields>
206
				</option>
207 34b5c5a0 Scott Ullrich
			</options>
208
		</field>
209
		<field>
210
			<name>General configuration</name>
211
			<type>listtopic</type>
212
		</field>
213
		<field>
214
			<donotdisable>true</donotdisable>
215
			<name>MAC Address</name>
216
			<bindstofield>interfaces->wan->spoofmac</bindstofield>
217
			<type>input</type>
218 22a11a58 Larry Gilbert
			<description> This field can be used to modify ("spoof") the MAC address of the WAN interface (may be required with some cable connections). Enter a MAC address in the following format: xx:xx:xx:xx:xx:xx or leave blank.</description>
219 85ee0940 jim-p
			<validate>^([0-9a-f]{2}([:-]||$)){6}$</validate>
220
			<message>MAC Address field is invalid</message>
221 dd627071 Scott Ullrich
		</field>
222 8773b899 Scott Ullrich
		<field>
223 34b5c5a0 Scott Ullrich
			<donotdisable>true</donotdisable>
224
			<name>MTU</name>
225
			<type>input</type>
226
			<bindstofield>interfaces->wan->mtu</bindstofield>
227
			<description> If you enter a value in this field, then MSS clamping for TCP connections to the value entered above minus 40 (TCP/IP header size) will be in effect. If you leave this field blank, an MTU of 1492 bytes for PPPoE and 1500 bytes for all other connection types will be assumed.</description>
228
		</field>
229
		<field>
230
			<name>Static IP Configuration</name>
231
			<type>listtopic</type>
232
		</field>
233
		<field>
234
			<name>IP Address</name>
235 4de543fa Scott Ullrich
			<bindstofield>interfaces->wan->ipaddr</bindstofield>
236 8773b899 Scott Ullrich
			<type>input</type>
237 34b5c5a0 Scott Ullrich
			<typehint> / </typehint>
238
			<combinefieldsbegin>true</combinefieldsbegin>
239 85ee0940 jim-p
			<validate>^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$</validate>
240
			<message>IP Address field is invalid</message>
241 8773b899 Scott Ullrich
		</field>
242
		<field>
243 34b5c5a0 Scott Ullrich
			<combinefieldsend>true</combinefieldsend>
244
			<dontdisplayname>true</dontdisplayname>
245 dd627071 Scott Ullrich
			<dontcombinecells>true</dontcombinecells>
246 8773b899 Scott Ullrich
			<name>Subnet Mask</name>
247 4de543fa Scott Ullrich
			<bindstofield>interfaces->wan->subnet</bindstofield>
248 bd31336e Scott Ullrich
			<type>subnet_select</type>
249 8773b899 Scott Ullrich
		</field>
250 34b5c5a0 Scott Ullrich
		<field>
251
			<name>Gateway</name>
252 938957af Scott Ullrich
			<bindstofield>interfaces->wan->gateway</bindstofield>
253 34b5c5a0 Scott Ullrich
			<type>input</type>
254 85ee0940 jim-p
			<validate>^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$</validate>
255
			<message>Gateway IP Address field is invalid</message>
256 dd627071 Scott Ullrich
		</field>
257 34b5c5a0 Scott Ullrich
		<field>
258
			<name>DHCP client configuration</name>
259
			<type>listtopic</type>
260 dd627071 Scott Ullrich
		</field>
261 34b5c5a0 Scott Ullrich
		<field>
262
			<name>DHCP Hostname</name>
263
			<type>input</type>
264
			<bindstofield>interfaces->wan->dhcphostname</bindstofield>
265
			<description> The value in this field is sent as the DHCP client identifier and hostname when requesting a DHCP lease. Some ISPs may require this (for client identification).</description>
266
		</field>
267
		<field>
268
			<name>PPPoE configuration</name>
269
			<type>listtopic</type>
270 dd627071 Scott Ullrich
		</field>
271 34b5c5a0 Scott Ullrich
		<field>
272
			<name>PPPoE Username</name>
273
			<type>input</type>
274 596bc941 Ermal Lu?i
			<bindstofield>interfaces->wan->pppoe_username</bindstofield>
275 34b5c5a0 Scott Ullrich
		</field>
276
		<field>
277
			<name>PPPoE Password</name>
278
			<type>input</type>
279 596bc941 Ermal Lu?i
			<bindstofield>interfaces->wan->pppoe_password</bindstofield>
280 34b5c5a0 Scott Ullrich
		</field>
281
		<field>
282
			<name>PPPoE Service name</name>
283
			<type>input</type>
284
			<description>Hint: this field can usually be left empty</description>
285
		</field>
286
		<field>
287
			<name>PPPoE Dial on demand</name>
288
			<typehint>Enable Dial-On-Demand mode</typehint>
289
			<type>checkbox</type>
290
			<description>This option causes the interface to operate in dial-on-demand mode, allowing you to have a virtual full time connection. The interface is configured, but the actual connection of the link is delayed until qualifying outgoing traffic is detected.</description>
291 dd627071 Scott Ullrich
		</field>
292 34b5c5a0 Scott Ullrich
		<field>
293
			<name>PPPoE Idle timeout</name>
294
			<type>input</type>
295
			<description>If no qualifying outgoing packets are transmitted for the specified number of seconds, the connection is brought down. An idle timeout of zero disables this feature.</description>
296
		</field>
297
		<field>
298
			<name>PPTP configuration</name>
299
			<type>listtopic</type>
300 dd627071 Scott Ullrich
		</field>
301 34b5c5a0 Scott Ullrich
		<field>
302
			<name>PPTP Username</name>
303
			<type>input</type>
304 596bc941 Ermal Lu?i
			<bindstofield>interfaces->wan->pptp_username</bindstofield>
305 34b5c5a0 Scott Ullrich
		</field>
306
		<field>
307
			<name>PPTP Password</name>
308
			<type>input</type>
309 596bc941 Ermal Lu?i
			<bindstofield>interfaces->wan->pptp_password</bindstofield>
310 34b5c5a0 Scott Ullrich
		</field>
311
		<field>
312
			<combinefieldsbegin>true</combinefieldsbegin>
313
			<name>PPTP Local IP Address</name>
314
			<type>input</type>
315
			<typehint> / </typehint>
316
			<bindstofield>pptp->local</bindstofield>
317 85ee0940 jim-p
			<validate>^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$</validate>
318
			<message>PPTP Local IP Address field is invalid</message>
319 34b5c5a0 Scott Ullrich
		</field>
320
		<field>
321
			<combinefieldsend>true</combinefieldsend>
322
			<dontdisplayname>true</dontdisplayname>
323
			<dontcombinecells>true</dontcombinecells>
324
			<name>pptplocalsubnet</name>
325
			<bindstofield>pptp->subnet</bindstofield>
326 bd31336e Scott Ullrich
			<type>subnet_select</type>
327 34b5c5a0 Scott Ullrich
		</field>
328
		<field>
329
			<name>PPTP Remote IP Address</name>
330 59031a49 Scott Ullrich
			<bindstofield>pptp->remote</bindstofield>
331 34b5c5a0 Scott Ullrich
			<type>input</type>
332 85ee0940 jim-p
			<validate>^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$</validate>
333
			<message>PPTP Remote IP Address field is invalid</message>
334 34b5c5a0 Scott Ullrich
		</field>
335
		<field>
336
			<name>PPTP Dial on demand</name>
337
			<typehint>Enable Dial-On-Demand mode</typehint>
338
			<type>checkbox</type>
339 9df3c604 Scott Ullrich
			<bindstofield>pptp->ondemand</bindstofield>			
340 34b5c5a0 Scott Ullrich
			<description>This option causes the interface to operate in dial-on-demand mode, allowing you to have a virtual full time connection. The interface is configured, but the actual connection of the link is delayed until qualifying outgoing traffic is detected.</description>
341 dd627071 Scott Ullrich
		</field>
342 34b5c5a0 Scott Ullrich
		<field>
343
			<name>PPTP Idle timeout</name>
344 ebfcc98d Scott Ullrich
			<type>input</type>			
345 9df3c604 Scott Ullrich
			<bindstofield>pptp->timeout</bindstofield>
346 34b5c5a0 Scott Ullrich
			<description>If no qualifying outgoing packets are transmitted for the specified number of seconds, the connection is brought down. An idle timeout of zero disables this feature.</description>
347
		</field>
348
		<field>
349
			<name>RFC1918 Networks</name>
350
			<type>listtopic</type>
351
		</field>
352
		<field>
353
			<donotdisable>true</donotdisable>
354
			<name>Block RFC1918 Private Networks</name>
355
			<description> When set, this option blocks traffic from IP addresses that are reserved for private networks as per RFC 1918 (10/8, 172.16/12, 192.168/16) as well as loopback addresses (127/8). You should generally leave this option turned on, unless your WAN network lies in such a private address space, too.</description>
356
			<type>checkbox</type>
357
			<bindstofield>interfaces->wan->blockpriv</bindstofield>
358
			<typehint>Block private networks from entering via WAN</typehint>
359
		</field>
360 ca07f232 Scott Ullrich
		<field>
361
			<name>Block bogon networks</name>
362
			<type>listtopic</type>
363 2131ed2f Scott Ullrich
		</field>
364 ca07f232 Scott Ullrich
		<field>
365
			<donotdisable>true</donotdisable>
366
			<name>Block bogon networks</name>
367 22a11a58 Larry Gilbert
			<description>When set, this option blocks traffic from IP addresses that are reserved (but not RFC 1918) or not yet assigned by IANA. Bogons are prefixes that should never appear in the Internet routing table, and obviously should not appear as the source address in any packets you receive.</description>
368 ca07f232 Scott Ullrich
			<type>checkbox</type>
369
			<bindstofield>interfaces->wan->blockbogons</bindstofield>
370 0119fc69 Scott Ullrich
			<typehint>Block non-Internet routed networks from entering via WAN</typehint>
371 2131ed2f Scott Ullrich
		</field>
372 8773b899 Scott Ullrich
		<field>
373
			<name>Next</name>
374
			<type>submit</type>
375 dd627071 Scott Ullrich
		</field>
376 8773b899 Scott Ullrich
	</fields>
377 5fe3b651 jim-p
	<stepsubmitphpaction>
378
		<![CDATA[
379 85ee0940 jim-p
		if(!empty($_POST['mtu']) && ($_POST['mtu'] < 576)) {
380
			print_info_box_np("MTU Must be at least 576 (Per RFC 791). Please press back in your browser window and correct.");
381
			die;
382
		}
383
		if(!empty($_POST['macaddress']) && !is_macaddr($_POST['macaddress'])) {
384
			print_info_box_np("Invalid MAC Address. Please press back in your browser window and correct.");
385
			die;
386
		}
387
		if(!empty($_POST['ipaddress']) && ($_POST['selectedtype'] == "Static") && (!is_ipaddr($_POST['ipaddress']))) {
388
			print_info_box_np("Invalid WAN IP Address. Please press back in your browser window and correct.");
389
			die;
390
		}
391
		if(!empty($_POST['dhcphostname']) && !is_hostname($_POST['dhcphostname'])) {
392
			print_info_box_np("Invalid DHCP Hostname. Please press back in your browser window and correct.");
393
			die;
394
		}
395
		if(!empty($_POST['pptplocalipaddress']) && !is_ipaddr($_POST['pptplocalipaddress'])) {
396
			print_info_box_np("Invalid PPTP Local IP Address. Please press back in your browser window and correct.");
397
			die;
398
		}
399
		if(!empty($_POST['pptpremoteipaddress']) && !is_ipaddr($_POST['pptpremoteipaddress'])) {
400
			print_info_box_np("Invalid PPTP Remopte IP Address. Please press back in your browser window and correct.");
401
			die;
402 5fe3b651 jim-p
		}
403
		]]>
404
	</stepsubmitphpaction>
405 b1919dd0 Scott Ullrich
	<stepsubmitbeforesave>
406 fa6a664d sullrich
		<![CDATA[
407
			if($_POST['selectedtype'] == "Static") { 
408
			
409
			} else {
410
				$_POST['ipaddress'] = $_POST['selectedtype'];
411
				$config['interfaces']['wan']['ipaddr'] = $_POST['selectedtype'];
412
				write_config();
413
				if(!$config['interfaces']['lan']) 
414 95dd7e9d sullrich
					Header("Location: /wizard.php?xml=setup_wizard.xml&stepid=5&next=Next");
415 fa6a664d sullrich
			}
416
		]]>
417 b1919dd0 Scott Ullrich
	</stepsubmitbeforesave>
418 8773b899 Scott Ullrich
</step>
419
<step>
420
	<id>5</id>
421 e48fc17d Scott Ullrich
	<title>Configure LAN Interface</title>
422 8773b899 Scott Ullrich
	<description>On this screen we will configure the Local Area Network information.</description>
423
	<fields>
424
		<field>
425 e48fc17d Scott Ullrich
			<name>LAN IP Address</name>
426 8773b899 Scott Ullrich
			<type>input</type>
427 4de543fa Scott Ullrich
			<bindstofield>interfaces->lan->ipaddr</bindstofield>
428 eb29fd9b Chris Buechler
			<description>Type dhcp if this interface uses DHCP to obtain its IP address.</description>
429 85ee0940 jim-p
			<validate>^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$</validate>
430
			<message>LAN IP Address field is invalid</message>
431 8773b899 Scott Ullrich
		</field>
432
				<field>
433
			<name>Subnet Mask</name>
434 4aea0386 Scott Ullrich
			<type>subnet_select</type>
435 4de543fa Scott Ullrich
			<bindstofield>interfaces->lan->subnet</bindstofield>
436 8773b899 Scott Ullrich
		</field>
437 4de543fa Scott Ullrich
		<field>
438
			<name>Next</name>
439
			<type>submit</type>
440 dd627071 Scott Ullrich
		</field>
441 8773b899 Scott Ullrich
	</fields>
442 4aea0386 Scott Ullrich
	<stepsubmitphpaction>
443 85ee0940 jim-p
		<![CDATA[
444
		if(empty($_POST['lanipaddress']) || !is_ipaddr($_POST['lanipaddress'])) {
445
			print_info_box_np("Invalid LAN IP Address. Please press back in your browser window and correct.");
446
			die;
447
		}
448 f63becab Scott Ullrich
		$ft = split("\.", $_POST['lanipaddress']);
449 4aea0386 Scott Ullrich
		$ft_ip = $ft[0] . "." . $ft[1] . "." . $ft[2] . ".";
450 735ab270 Seth Mos
		$config['dhcpd']['lan']['range']['from'] = $ft_ip . "10";
451 f63becab Scott Ullrich
		$highestip = gen_subnet_max($_POST['lanipaddress'], $config['interfaces']['lan']['subnet']);
452 97737adf Scott Ullrich
		$hi = split("\.", $highestip);
453 735ab270 Seth Mos
		$highestip = $hi[3]-10;
454 97737adf Scott Ullrich
		$config['dhcpd']['lan']['range']['to'] = $ft_ip . $highestip;
455 85ee0940 jim-p
		]]>
456 4aea0386 Scott Ullrich
	</stepsubmitphpaction>
457 8773b899 Scott Ullrich
</step>
458
<step>
459
	<id>6</id>
460 cc0ef90e Scott Ullrich
	<title>Set Admin WebGUI Password</title>
461 22a11a58 Larry Gilbert
	<description>On this screen we will set the admin password, which is used to access the WebGUI and also SSH services if you wish to enable them.</description>
462 8773b899 Scott Ullrich
	<fields>
463
		<field>
464 25a4bcd2 Scott Ullrich
			<name>Admin Password</name>
465 8773b899 Scott Ullrich
			<type>password</type>
466
		</field>
467 4de543fa Scott Ullrich
		<field>
468 25a4bcd2 Scott Ullrich
			<name>Admin Password AGAIN</name>
469 4de543fa Scott Ullrich
			<type>password</type>
470
		</field>
471 8773b899 Scott Ullrich
		<field>
472
			<name>Next</name>
473
			<type>submit</type>
474 dd627071 Scott Ullrich
		</field>
475 8773b899 Scott Ullrich
	</fields>
476 3ed807e4 Scott Ullrich
	<stepsubmitphpaction>
477
	if($_POST['adminpassword'] != "") {
478
		if($_POST['adminpassword'] == $_POST['adminpasswordagain']) {
479 0b31cf3e Matthew Grooms
			$admin_user =&amp; getUserEntryByUID(0);
480
			local_user_set_password($admin_user, $_POST['adminpassword']);
481
			local_user_set($admin_user);
482 3ed807e4 Scott Ullrich
			write_config();
483
		} else {
484
			print_info_box_np("Passwords do not match!  Please press back in your browser window and correct.");
485
			die;
486
		}
487
	}
488
	</stepsubmitphpaction>
489 8773b899 Scott Ullrich
</step>
490
<step>
491
	<id>7</id>
492 2e1c1991 Scott Ullrich
	<title>Reload configuration</title>
493 34b5c5a0 Scott Ullrich
	<disableheader>true</disableheader>
494 7a23e419 Scott Ullrich
	<description>Click 'Reload' to reload pfSense with new changes.  If you changed the password, pfSense will ask you to log in again.</description>
495 8773b899 Scott Ullrich
	<fields>
496
		<field>
497 2e1c1991 Scott Ullrich
			<name>Reload</name>
498 8773b899 Scott Ullrich
			<type>submit</type>
499
		</field>
500
	</fields>
501 4de543fa Scott Ullrich
</step>
502
<step>
503 cc0ef90e Scott Ullrich
	<id>8</id>
504 0b1138de Scott Ullrich
	<title>Reload in progress</title>
505
	<description>A reload is now in progress.  Please wait. &lt;p&gt; The system will automatically try to access $myurl in 120 seconds. &lt;p&gt; You can click on the icon above to access the site more quickly.
506 7f1e27b3 Scott Ullrich
	&lt;meta http-equiv="refresh" content="60; url=$myurl" &gt;</description>
507 34b5c5a0 Scott Ullrich
	<stepafterformdisplay>
508 2131ed2f Scott Ullrich
		reload_all();
509 f16f30cf Chris Buechler
                mwexec_bg("/etc/rc.update_bogons.sh now");
510 dd627071 Scott Ullrich
	</stepafterformdisplay>
511 8773b899 Scott Ullrich
</step>
512 6bb5c9aa Bill Marquette
</pfsensewizard>