1
|
<?xml version="1.0" encoding="utf-8" ?>
|
2
|
<pfsensewizard>
|
3
|
<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
|
<totalsteps>8</totalsteps>
|
35
|
<step>
|
36
|
<id>1</id>
|
37
|
<title>pfSense Setup Wizard</title>
|
38
|
<disableheader>true</disableheader>
|
39
|
<description>This wizard will guide you through installing pfSense initially.</description>
|
40
|
<fields>
|
41
|
<field>
|
42
|
<name>Next</name>
|
43
|
<type>submit</type>
|
44
|
</field>
|
45
|
</fields>
|
46
|
</step>
|
47
|
<step>
|
48
|
<id>2</id>
|
49
|
<title>General Information</title>
|
50
|
<description>On this screen you will set the General pfSense parameters.</description>
|
51
|
<fields>
|
52
|
<field>
|
53
|
<name>Hostname</name>
|
54
|
<type>input</type>
|
55
|
<bindstofield>system->hostname</bindstofield>
|
56
|
<description>EXAMPLE: myserver</description>
|
57
|
</field>
|
58
|
<field>
|
59
|
<name>Domain</name>
|
60
|
<type>input</type>
|
61
|
<bindstofield>system->domain</bindstofield>
|
62
|
<description>EXAMPLE: mydomain.com</description>
|
63
|
<validate>^[a-z0-9.|-]+$</validate>
|
64
|
<message>Domain name field is invalid</message>
|
65
|
</field>
|
66
|
<field>
|
67
|
<name>Primary DNS Server</name>
|
68
|
<type>input</type>
|
69
|
<bindstofield>system->dnsserver</bindstofield>
|
70
|
<!-- we must unset the fields because this is an array. -->
|
71
|
<unsetfield>yes</unsetfield>
|
72
|
<arraynum>0</arraynum>
|
73
|
</field>
|
74
|
<field>
|
75
|
<name>Secondary DNS Server</name>
|
76
|
<type>input</type>
|
77
|
<bindstofield>system->dnsserver</bindstofield>
|
78
|
<arraynum>1</arraynum>
|
79
|
</field>
|
80
|
<field>
|
81
|
<name>Next</name>
|
82
|
<type>submit</type>
|
83
|
</field>
|
84
|
</fields>
|
85
|
</step>
|
86
|
<step>
|
87
|
<id>3</id>
|
88
|
<title>Time Server Information</title>
|
89
|
<description>Please enter the time, date and time zone.</description>
|
90
|
<fields>
|
91
|
<field>
|
92
|
<name>Time server update frequency</name>
|
93
|
<description>Enter the amount in minutes.</description>
|
94
|
<type>input</type>
|
95
|
<bindstofield>system->time-update-interval</bindstofield>
|
96
|
</field>
|
97
|
<field>
|
98
|
<name>Time server dns name</name>
|
99
|
<description>Enter the name of the time server.</description>
|
100
|
<type>input</type>
|
101
|
<bindstofield>system->timeservers</bindstofield>
|
102
|
</field>
|
103
|
<field>
|
104
|
<name>Timezone</name>
|
105
|
<type>timezone_select</type>
|
106
|
<bindstofield>system->timezone</bindstofield>
|
107
|
</field>
|
108
|
<field>
|
109
|
<name>Next</name>
|
110
|
<type>submit</type>
|
111
|
</field>
|
112
|
</fields>
|
113
|
</step>
|
114
|
<step>
|
115
|
<id>4</id>
|
116
|
<disableallfieldsbydefault>true</disableallfieldsbydefault>
|
117
|
<title>Configure WAN Interface</title>
|
118
|
<description>On this screen we will configure the Wide Area Network information.</description>
|
119
|
<javascriptafterformdisplay>
|
120
|
var selectedItem = 0;
|
121
|
if(document.forms[0].ipaddress.value == 'dhcp') {
|
122
|
selectedItem = 1;
|
123
|
document.forms[0].ipaddress.value = '';
|
124
|
} else if(document.forms[0].ipaddress.value == 'PPPoE') {
|
125
|
selectedItem = 2;
|
126
|
document.forms[0].ipaddress.value = '';
|
127
|
} else if(document.forms[0].ipaddress.value == 'PPTP') {
|
128
|
selectedItem = 3;
|
129
|
document.forms[0].ipaddress.value = '';
|
130
|
} else if(document.forms[0].ipaddress.value == 'BigPond') {
|
131
|
selectedItem = 4;
|
132
|
document.forms[0].ipaddress.value = '';
|
133
|
} else {
|
134
|
selectedItem = 0;
|
135
|
}
|
136
|
document.forms[0].selectedtype.selectedIndex = selectedItem;
|
137
|
enableitems(selectedItem);
|
138
|
</javascriptafterformdisplay>
|
139
|
<fields>
|
140
|
<field>
|
141
|
<name>SelectedType</name>
|
142
|
<type>select</type>
|
143
|
<donotdisable>true</donotdisable>
|
144
|
<options>
|
145
|
<option>
|
146
|
<name>Static</name>
|
147
|
<value>Static</value>
|
148
|
<enablefields>ipaddress,subnetmask,gateway</enablefields>
|
149
|
</option>
|
150
|
<option>
|
151
|
<name>DHCP</name>
|
152
|
<value>dhcp</value>
|
153
|
<enablefields>dhcphostname</enablefields>
|
154
|
</option>
|
155
|
<option>
|
156
|
<name>PPPoE</name>
|
157
|
<value>pppoe</value>
|
158
|
<enablefields>pppoeusername,pppoepassword,pppoeservicename,pppoedialondemand,pppoeidletimeout</enablefields>
|
159
|
</option>
|
160
|
<option>
|
161
|
<name>PPTP</name>
|
162
|
<value>pptp</value>
|
163
|
<enablefields>pptpusername,pptppassword,pptplocalipaddress,pptplocalsubnet,pptpremoteipaddress,pptpdialondemand,pptpidletimeout
|
164
|
</enablefields>
|
165
|
</option>
|
166
|
<option>
|
167
|
<name>BigPond</name>
|
168
|
<value>bigpond</value>
|
169
|
<enablefields>bigpondusername,bigpondpassword,bigpondauthenticationserver,bigpondauthenticationdomain,bigpondminheartbeatinterval</enablefields>
|
170
|
</option>
|
171
|
</options>
|
172
|
</field>
|
173
|
<field>
|
174
|
<name>General configuration</name>
|
175
|
<type>listtopic</type>
|
176
|
</field>
|
177
|
<field>
|
178
|
<donotdisable>true</donotdisable>
|
179
|
<name>MAC Address</name>
|
180
|
<bindstofield>interfaces->wan->spoofmac</bindstofield>
|
181
|
<type>input</type>
|
182
|
<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>
|
183
|
</field>
|
184
|
<field>
|
185
|
<donotdisable>true</donotdisable>
|
186
|
<name>MTU</name>
|
187
|
<type>input</type>
|
188
|
<bindstofield>interfaces->wan->mtu</bindstofield>
|
189
|
<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>
|
190
|
</field>
|
191
|
<field>
|
192
|
<name>Static IP Configuration</name>
|
193
|
<type>listtopic</type>
|
194
|
</field>
|
195
|
<field>
|
196
|
<name>IP Address</name>
|
197
|
<bindstofield>interfaces->wan->ipaddr</bindstofield>
|
198
|
<type>input</type>
|
199
|
<typehint> / </typehint>
|
200
|
<combinefieldsbegin>true</combinefieldsbegin>
|
201
|
</field>
|
202
|
<field>
|
203
|
<combinefieldsend>true</combinefieldsend>
|
204
|
<dontdisplayname>true</dontdisplayname>
|
205
|
<dontcombinecells>true</dontcombinecells>
|
206
|
<name>Subnet Mask</name>
|
207
|
<bindstofield>interfaces->wan->subnet</bindstofield>
|
208
|
<type>subnet_select</type>
|
209
|
</field>
|
210
|
<field>
|
211
|
<name>Gateway</name>
|
212
|
<bindstofield>system->gateway</bindstofield>
|
213
|
<type>input</type>
|
214
|
</field>
|
215
|
<field>
|
216
|
<name>Bandwidth Management (Traffic Shaping)</name>
|
217
|
<type>listtopic</type>
|
218
|
</field>
|
219
|
<field>
|
220
|
<name>Scheduler</name>
|
221
|
<donotdisable>true</donotdisable>
|
222
|
<type>select</type>
|
223
|
<bindstofield>interfaces->wan->schedulertype</bindstofield>
|
224
|
<description>Select which type of queueing you would like to use</description>
|
225
|
<options>
|
226
|
<option><name>Priority Based Queueing</name><value>priq</value></option>
|
227
|
<option><name>Class Based Queueing</name><value>cbq</value></option>
|
228
|
<option><name>Hierarchical Fair Service Curve queueing</name><value>hfsc</value></option>
|
229
|
</options>
|
230
|
</field>
|
231
|
<field>
|
232
|
<combinefieldsbegin>true</combinefieldsbegin>
|
233
|
<donotdisable>true</donotdisable>
|
234
|
<name>Interface Bandwidth Speed</name>
|
235
|
<type>input</type>
|
236
|
<typehint> | </typehint>
|
237
|
<bindstofield>interfaces->wan->bandwidth</bindstofield>
|
238
|
</field>
|
239
|
<field>
|
240
|
<name>Speed Type</name>
|
241
|
<donotdisable>true</donotdisable>
|
242
|
<type>select</type>
|
243
|
<combinefieldsend>true</combinefieldsend>
|
244
|
<dontdisplayname>true</dontdisplayname>
|
245
|
<dontcombinecells>true</dontcombinecells>
|
246
|
<bindstofield>interfaces->wan->bandwidthtype</bindstofield>
|
247
|
<options>
|
248
|
<option>
|
249
|
<name>bit/s</name>
|
250
|
</option>
|
251
|
<option>
|
252
|
<name>Kilobit/s</name>
|
253
|
</option>
|
254
|
<option>
|
255
|
<name>Megabit/s</name>
|
256
|
</option>
|
257
|
<option>
|
258
|
<name>Gigabit/s</name>
|
259
|
</option>
|
260
|
</options>
|
261
|
</field>
|
262
|
<field>
|
263
|
<name>DHCP client configuration</name>
|
264
|
<type>listtopic</type>
|
265
|
</field>
|
266
|
<field>
|
267
|
<name>DHCP Hostname</name>
|
268
|
<type>input</type>
|
269
|
<bindstofield>interfaces->wan->dhcphostname</bindstofield>
|
270
|
<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>
|
271
|
</field>
|
272
|
<field>
|
273
|
<name>PPPoE configuration</name>
|
274
|
<type>listtopic</type>
|
275
|
</field>
|
276
|
<field>
|
277
|
<name>PPPoE Username</name>
|
278
|
<type>input</type>
|
279
|
<bindstofield>pppoe->username</bindstofield>
|
280
|
</field>
|
281
|
<field>
|
282
|
<name>PPPoE Password</name>
|
283
|
<type>input</type>
|
284
|
<bindstofield>pppoe->password</bindstofield>
|
285
|
</field>
|
286
|
<field>
|
287
|
<name>PPPoE Service name</name>
|
288
|
<type>input</type>
|
289
|
<description>Hint: this field can usually be left empty</description>
|
290
|
</field>
|
291
|
<field>
|
292
|
<name>PPPoE Dial on demand</name>
|
293
|
<typehint>Enable Dial-On-Demand mode</typehint>
|
294
|
<type>checkbox</type>
|
295
|
<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>
|
296
|
</field>
|
297
|
<field>
|
298
|
<name>PPPoE Idle timeout</name>
|
299
|
<type>input</type>
|
300
|
<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>
|
301
|
</field>
|
302
|
<field>
|
303
|
<name>PPTP configuration</name>
|
304
|
<type>listtopic</type>
|
305
|
</field>
|
306
|
<field>
|
307
|
<name>PPTP Username</name>
|
308
|
<type>input</type>
|
309
|
<bindstofield>pptp->username</bindstofield>
|
310
|
</field>
|
311
|
<field>
|
312
|
<name>PPTP Password</name>
|
313
|
<type>input</type>
|
314
|
<bindstofield>pptp->password</bindstofield>
|
315
|
</field>
|
316
|
<field>
|
317
|
<combinefieldsbegin>true</combinefieldsbegin>
|
318
|
<name>PPTP Local IP Address</name>
|
319
|
<type>input</type>
|
320
|
<typehint> / </typehint>
|
321
|
<bindstofield>pptp->local</bindstofield>
|
322
|
</field>
|
323
|
<field>
|
324
|
<combinefieldsend>true</combinefieldsend>
|
325
|
<dontdisplayname>true</dontdisplayname>
|
326
|
<dontcombinecells>true</dontcombinecells>
|
327
|
<name>pptplocalsubnet</name>
|
328
|
<bindstofield>pptp->subnet</bindstofield>
|
329
|
<type>subnet_select</type>
|
330
|
</field>
|
331
|
<field>
|
332
|
<name>PPTP Remote IP Address</name>
|
333
|
<bindstofield>pptp->remote</bindstofield>
|
334
|
<type>input</type>
|
335
|
</field>
|
336
|
<field>
|
337
|
<name>PPTP Dial on demand</name>
|
338
|
<typehint>Enable Dial-On-Demand mode</typehint>
|
339
|
<type>checkbox</type>
|
340
|
<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
|
</field>
|
342
|
<field>
|
343
|
<name>PPTP Idle timeout</name>
|
344
|
<type>input</type>
|
345
|
<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>
|
346
|
</field>
|
347
|
<field>
|
348
|
<name>BigPond configuration</name>
|
349
|
<type>listtopic</type>
|
350
|
</field>
|
351
|
<field>
|
352
|
<name>BigPond Username</name>
|
353
|
<type>input</type>
|
354
|
<bindstofield>bigpond->username</bindstofield>
|
355
|
</field>
|
356
|
<field>
|
357
|
<name>BigPond Password</name>
|
358
|
<type>input</type>
|
359
|
<bindstofield>bigpond->password</bindstofield>
|
360
|
</field>
|
361
|
<field>
|
362
|
<name>BigPond Authentication server</name>
|
363
|
<type>input</type>
|
364
|
<bindstofield>bigpond->authserver</bindstofield>
|
365
|
<description>If this field is left empty, the default ("dce-server") is used.</description>
|
366
|
</field>
|
367
|
<field>
|
368
|
<name>BigPond Authentication domain</name>
|
369
|
<type>input</type>
|
370
|
<bindstofield>bigpond->authdomain</bindstofield>
|
371
|
<description>If this field is left empty, the domain name assigned via DHCP will be used. Note: the BigPond client implicitly sets the "Allow DNS server list to be overridden by DHCP/PPP on WAN" on the System: General setup page.</description>
|
372
|
</field>
|
373
|
<field>
|
374
|
<name>BigPond min heartbeat interval</name>
|
375
|
<type>input</type>
|
376
|
<typehint>seconds</typehint>
|
377
|
<bindstofield>bigpond->minheartbeatinterval</bindstofield>
|
378
|
<description> Setting this to a sensible value (e.g. 60 seconds) can protect against DoS attacks.</description>
|
379
|
</field>
|
380
|
<field>
|
381
|
<name>RFC1918 Networks</name>
|
382
|
<type>listtopic</type>
|
383
|
</field>
|
384
|
<field>
|
385
|
<donotdisable>true</donotdisable>
|
386
|
<name>Block RFC1918 Private Networks</name>
|
387
|
<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>
|
388
|
<type>checkbox</type>
|
389
|
<bindstofield>interfaces->wan->blockpriv</bindstofield>
|
390
|
<typehint>Block private networks from entering via WAN</typehint>
|
391
|
</field>
|
392
|
<field>
|
393
|
<name>Next</name>
|
394
|
<type>submit</type>
|
395
|
</field>
|
396
|
</fields>
|
397
|
<stepsubmitbeforesave>
|
398
|
if($_POST['selectedtype'] == "Static") { } else {
|
399
|
$_POST['ipaddress'] = $_POST['selectedtype'];
|
400
|
$config['interfaces']['wan']['ipaddr'] = $_POST['selectedtype'];
|
401
|
write_config();
|
402
|
}
|
403
|
</stepsubmitbeforesave>
|
404
|
</step>
|
405
|
<step>
|
406
|
<id>5</id>
|
407
|
<title>Configure LAN Interface</title>
|
408
|
<description>On this screen we will configure the Local Area Network information.</description>
|
409
|
<fields>
|
410
|
<field>
|
411
|
<name>LAN IP Address</name>
|
412
|
<type>input</type>
|
413
|
<bindstofield>interfaces->lan->ipaddr</bindstofield>
|
414
|
<description>Type dhcp if this interface uses dhcp to obtain its ip address.</description>
|
415
|
</field>
|
416
|
<field>
|
417
|
<name>Subnet Mask</name>
|
418
|
<type>subnet_select</type>
|
419
|
<bindstofield>interfaces->lan->subnet</bindstofield>
|
420
|
</field>
|
421
|
<field>
|
422
|
<name>Next</name>
|
423
|
<type>submit</type>
|
424
|
</field>
|
425
|
</fields>
|
426
|
<stepsubmitphpaction>
|
427
|
$ft = split("\.", $_POST['lanipaddress']);
|
428
|
$ft_ip = $ft[0] . "." . $ft[1] . "." . $ft[2] . ".";
|
429
|
$config['dhcpd']['lan']['range']['from'] = $ft_ip . "50";
|
430
|
$highestip = gen_subnet_max($_POST['lanipaddress'], $config['interfaces']['lan']['subnet']);
|
431
|
$hi = split("\.", $highestip);
|
432
|
$highestip = $hi[3]-1;
|
433
|
$config['dhcpd']['lan']['range']['to'] = $ft_ip . $highestip;
|
434
|
</stepsubmitphpaction>
|
435
|
</step>
|
436
|
<step>
|
437
|
<id>6</id>
|
438
|
<title>Set Admin WebGUI Password</title>
|
439
|
<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.</description>
|
440
|
<fields>
|
441
|
<field>
|
442
|
<name>Admin Password</name>
|
443
|
<type>password</type>
|
444
|
</field>
|
445
|
<field>
|
446
|
<name>Admin Password AGAIN</name>
|
447
|
<type>password</type>
|
448
|
</field>
|
449
|
<field>
|
450
|
<name>Next</name>
|
451
|
<type>submit</type>
|
452
|
</field>
|
453
|
</fields>
|
454
|
<stepsubmitphpaction>
|
455
|
if($_POST['adminpassword'] != "") {
|
456
|
if($_POST['adminpassword'] == $_POST['adminpasswordagain']) {
|
457
|
$fd = popen("/usr/sbin/pw usermod -n root -H 0", "w");
|
458
|
$salt = md5(time());
|
459
|
$crypted_pw = crypt($_POST['adminpassword'],$salt);
|
460
|
fwrite($fd, $crypted_pw);
|
461
|
pclose($fd);
|
462
|
$config['system']['password'] = crypt($_POST['adminpassword']);
|
463
|
write_config();
|
464
|
system_password_configure();
|
465
|
} else {
|
466
|
print_info_box_np("Passwords do not match! Please press back in your browser window and correct.");
|
467
|
die;
|
468
|
}
|
469
|
}
|
470
|
</stepsubmitphpaction>
|
471
|
</step>
|
472
|
<step>
|
473
|
<id>7</id>
|
474
|
<title>Reboot</title>
|
475
|
<disableheader>true</disableheader>
|
476
|
<description>On this screen we will reboot pfSense so your changes will take affect..</description>
|
477
|
<fields>
|
478
|
<field>
|
479
|
<stepsubmitphpaction>/sbin/shutdown -r now</stepsubmitphpaction>
|
480
|
<name>Reboot</name>
|
481
|
<type>submit</type>
|
482
|
</field>
|
483
|
</fields>
|
484
|
</step>
|
485
|
<step>
|
486
|
<id>8</id>
|
487
|
<title>Reload in progress</title>
|
488
|
<description>A reload is now in progress. Please wait. <p> The system will automatically try to access $myurl in 120 seconds. <p> You can click on the icon above to access the site more quickly.
|
489
|
<meta http-equiv="refresh" content="60; url=$myurl" ></description>
|
490
|
<stepafterformdisplay>
|
491
|
reload_all();
|
492
|
</stepafterformdisplay>
|
493
|
</step>
|
494
|
</pfsensewizard>
|