-
Notifications
You must be signed in to change notification settings - Fork 0
/
mdu.yml
540 lines (519 loc) · 12.3 KB
/
mdu.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
###############
# MDU TEMPLATE
###############
#
# This template will create a configuration based on a typical
# basic MDU configuration.
#
# It is broken up into Pre-Auth/Guest and Post-Auth authentication mechisms
# for onboarding new accounts and admitting authorized accounts via multiple
# pre-shared key.
#
###############
#IMPORTANT: Please change these values to to match the target system
<%
wan_interface ||= 'igb0'
lan_interface ||= 'igb3'
%>
###############
# Template begins
###############
# Generate Policies
Policy:
- name: Management
- name: Post-Auth Landing
- name: Premium
- name: Free
- name: Business
- name: Basic
- name: Pre-Auth / Guests
- name: Default
_delete: true
# Subnet Filter to block traffic between VLANs/Subnets
SubnetsFilter:
- name: Block Subnets
policies:
- Basic
- Business
- Free
- Post-Auth Landing
- Pre-Auth / Guests
- Premium
# Enable LLDP on LAN and WAN Interfaces
LadvdOption:
- name: default
active: true
auto_enable_protocols: true
listen_only: false
interfaces:
- <%= lan_interface %>
- <%= wan_interface %>
# Create Pre-Auth/Guest and Post-Auth VLANs and apply to LAN interface
Vlan:
- name: Pre-Auth / Guests
interface: <%= lan_interface %>
tag: 1100
autoincrement_ratio: 8
autoincrement_mode: address
- name: Post-Auth / Accounts
interface: <%= lan_interface %>
tag: 1108
autoincrement_ratio: 1
autoincrement_mode: address
# Apply IP addresses to VLANs
Address:
- name: Pre-Auth / Guests
vlan: Pre-Auth / Guests
span: 1
autoincrement: 64
cidr: 10.0.0.1/30
- name: Post-Auth / Accounts
vlan: Post-Auth / Accounts
span: 1
autoincrement: 110
cidr: 10.0.1.1/24
# Create DHCP Pools for subnets
DhcpPool:
- name: Pre-Auth / Guests
start_ip: 10.0.0.2
end_ip: 10.0.0.254
start_reserved: 0
end_reserved: 0
router_host_nth: 0
- name: Post-Auth / Accounts
start_ip: 10.0.1.2
end_ip: 10.0.110.254
start_reserved: 0
end_reserved: 0
router_host_nth: 0
# Create IP Groups for subnets
IpGroup:
- name: Pre-Auth / Guests
priority: 5
addresses:
- Pre-Auth / Guests
policy: Pre-Auth / Guests
- name: Post-Auth / Accounts
priority: 2
addresses:
- Post-Auth / Accounts
policy: Post-Auth Landing
# Create Radius Server
RadiusServerOption:
- name: Default
active: true
auth_port: 1812
acct_port: 1813
secret: lJCCtI9qMfDe_6R1OLGdXg
radsec_port: 2083
debug_level: normal
min_tls_version: '1.2'
max_tls_version: '1.2'
policies:
- Management
# Create Radius realms for Pre-Auth/Guest and Post-Auth WLANs
RadiusServer:
- name: Pre-Auth / Guests
reuse_vlans: true
vta_timeout_minutes: 60
## VLAN assignment for onboarding/guest network will be per-device
vlan_sharing: device
unlimited_vlans_per_csid_mac: true
rank: 2
realm_admission_logic: or
radius_server_attributes:
- Tunnel-Type
- Tunnel-Medium-Type
- Tunnel-Private-Group-Id
- Ruckus-DPSK
vlans:
- Pre-Auth / Guests
radius_attribute_patterns:
- id: 1
radius_attribute: Called-Station-Id
pattern: Start Here
priority: 0
logic: OR
- name: Post-Auth / Accounts
reuse_vlans: false
vta_timeout_minutes: 60
## VLAN assignment for Tenant/Post-Auth will be per-account
vlan_sharing: account
unlimited_vlans_per_csid_mac: true
rank: 0
realm_admission_logic: or
radius_server_attributes:
- Tunnel-Type
- Tunnel-Medium-Type
- Tunnel-Private-Group-Id
- Ruckus-DPSK
vlans:
- Post-Auth / Accounts
policies:
- Premium
- Free
- Business
- Basic
# Create Account Groups based on plans
AccountGroup:
- name: Free
policy: Free
priority: 4
- name: Basic
policy: Basic
priority: 4
- name: Premium
policy: Premium
priority: 4
- name: Business
policy: Business
priority: 4
# Create Shared Credential Group for guest users
SharedCredentialGroup:
- name: Free
policy: Free
priority: 6
credential: free
min_mac_login_period: 1440
usage_minutes: 60
unlimited_usage_mb_up: true
unlimited_usage_mb_down: true
unlimited_simultaneous_sessions: true
starts_at: !ruby/object:ActiveSupport::TimeWithZone
utc: 2022-10-11 05:00:00.000000000 Z
zone: &1 !ruby/object:ActiveSupport::TimeZone
name: America/Chicago
time: 2022-10-11 00:00:00.000000000 Z
ends_at: !ruby/object:ActiveSupport::TimeWithZone
utc: 2032-10-31 05:00:00.000000000 Z
zone: *1
time: 2032-10-31 00:00:00.000000000 Z
state: active
mon: true
tues: true
wed: true
thurs: true
fri: true
sat: true
sun: true
recurring_method: none
# Create Captive Portal for Splash and Landing
CaptivePortal:
- name: Default Splash
portal_name: default
background_automatic_login: mac
portal_automatic_login: mac_or_cookie
password_reset_method: secret_question
role_attribute: none
shared_credential_groups:
- Free
wan_targets:
- Certificate Validation Hosts
- PayPal
policies:
- Pre-Auth / Guests
LandingPortal:
- name: Default Landing
portal_name: default
unlimited_session_minutes: true
idle_minutes: 20
session_grace_minutes: 15
portal_automatic_login: mac_or_cookie
background_automatic_login: mac
policies:
- Premium
- Free
- Basic
- Business
- name: Post-Auth Landing
portal_name: default
unlimited_session_minutes: true
idle_minutes: 20
session_grace_minutes: 15
portal_automatic_login: mac_or_cookie
background_automatic_login: mac
policies:
- Post-Auth Landing
# Survey question to gather information for Guest users
SurveyQuestion:
- question: Email Address
question_type: email
required: true
position: 1
captive_portals:
- Default Splash
landing_portals:
- Default Landing
- Post-Auth Landing
# Create Billing merchants
Merchant:
- name: Authorize.Net
gateway: AuthorizeNet
store_payment_methods: true
login: 74J3dDPgf
password: 9z8ze9L8CYu2Y85K
signature: 15437467B191351CCB81F9AD6B6A275FF398F3A98314776107995720B1F1CB6F75D9FB275FA3A403EC0B9BE79BAA36C67492FFED73EF2E911379305C671DA2A3
dup_timeout_seconds: 60
- name: Paypal
login: [email protected]
integration: Paypal
dup_timeout_seconds: 60
# Create Plans
TimePlan:
- name: Unlimited
price: 0.0
unlimited_usage_minutes: true
QuotaPlan:
- name: 5GB / 2GB
price: 0.0
usage_mb_up: 2048
usage_mb_down: 5120
- name: 15GB / 7 GB
price: 0.0
usage_mb_up: 7168
usage_mb_down: 15360
- name: 50GB / 25GB
price: 0.0
usage_mb_up: 25600
usage_mb_down: 51200
- name: Unlimited
price: 0.0
unlimited_usage_mb_up: true
unlimited_usage_mb_down: true
UsagePlan:
- name: One Day Free 5GB
account_group: Free
currency: USD
recurring_method: none
variable_recurring_day: true
automatic_login: true
time_plan: Unlimited
quota_plan: 5GB / 2GB
usage_lifetime_time: 1
recurring_retry_grace_minutes: 1440
recurring_fail_limit: 5
lock_devices: true
max_sessions: 3
unlimited_devices: true
usage_lifetime_time_unit: days
max_dedicated_ips: 0
pms_guest_match_operator: OR
recurring_lifetime_time_unit: months
unlimited_recurring_lifetime: true
validation_method: none
validation_grace_minutes: 0
max_party_devices: 0
captive_portals:
- Default Splash
landing_portals:
- Default Landing
merchants:
- Paypal
- name: One Month Basic 50GB
account_group: Basic
currency: USD
recurring_method: monthly
variable_recurring_day: true
automatic_login: true
time_plan: Unlimited
quota_plan: 50GB / 25GB
usage_lifetime_time: 1
recurring_retry_grace_minutes: 1440
recurring_fail_limit: 5
lock_devices: true
max_sessions: 3
unlimited_devices: true
usage_lifetime_time_unit: months
max_dedicated_ips: 0
pms_guest_match_operator: OR
recurring_lifetime_time_unit: months
unlimited_recurring_lifetime: true
validation_method: none
validation_grace_minutes: 0
max_party_devices: 0
base_price: 25.0
captive_portals:
- Default Splash
landing_portals:
- Default Landing
merchants:
- Authorize.Net
- name: One Month Business Class
account_group: Business
currency: USD
recurring_method: monthly
variable_recurring_day: true
automatic_login: true
time_plan: Unlimited
quota_plan: Unlimited
usage_lifetime_time: 1
recurring_retry_grace_minutes: 1440
recurring_fail_limit: 5
lock_devices: true
unlimited_devices: true
unlimited_sessions: true
usage_lifetime_time_unit: months
max_dedicated_ips: 0
pms_guest_match_operator: OR
recurring_lifetime_time_unit: months
unlimited_recurring_lifetime: true
validation_method: none
validation_grace_minutes: 0
max_party_devices: 0
base_price: 150.0
captive_portals:
- Default Splash
landing_portals:
- Default Landing
merchants:
- Authorize.Net
- name: On Demand 50GB
account_group: Premium
currency: USD
recurring_method: on-demand
automatic_login: true
time_plan: Unlimited
quota_plan: 50GB / 25GB
unlimited_usage_lifetime: true
recurring_retry_grace_minutes: 1440
recurring_fail_limit: 5
lock_devices: true
unlimited_devices: true
unlimited_sessions: true
usage_lifetime_time_unit: months
max_dedicated_ips: 0
pms_guest_match_operator: OR
recurring_lifetime_time_unit: months
unlimited_recurring_lifetime: true
validation_method: none
validation_grace_minutes: 0
max_party_devices: 0
base_price: 25.0
captive_portals:
- Default Splash
landing_portals:
- Default Landing
merchants:
- Authorize.Net
- name: One Day 15GB
account_group: Basic
currency: USD
recurring_method: none
variable_recurring_day: true
automatic_login: true
time_plan: Unlimited
quota_plan: 15GB / 7 GB
usage_lifetime_time: 1
recurring_retry_grace_minutes: 1440
recurring_fail_limit: 5
lock_devices: true
max_sessions: 3
unlimited_devices: true
usage_lifetime_time_unit: days
max_dedicated_ips: 0
pms_guest_match_operator: OR
recurring_lifetime_time_unit: months
unlimited_recurring_lifetime: true
validation_method: none
validation_grace_minutes: 0
max_party_devices: 0
base_price: 10.0
captive_portals:
- Default Splash
landing_portals:
- Default Landing
merchants:
- Paypal
# Create Traffic Shaping rules
BandwidthQueue:
- name: Infrastructure
upload_bw: 100
upload_bw_unit: "%"
download_bw: 100
download_bw_unit: "%"
priority: 0
rt_upload_bw_unit: Mbps
rt_download_bw_unit: Mbps
burst_upload_bw_unit: Mbps
burst_download_bw_unit: Mbps
sharing: group
disable_auto_ip_queues: true
policies:
- Management
- name: 3x1 Mbps with burst
upload_bw: 1
upload_bw_unit: Mbps
download_bw: 3
download_bw_unit: Mbps
priority: 0
rt_upload_bw_unit: Mbps
rt_download_bw_unit: Mbps
burst_upload_bw: 2
burst_upload_bw_unit: Mbps
burst_download_bw: 10
burst_download_bw_unit: Mbps
burst_ms: 5000
sharing: ip
policies:
- Free
- name: 20x2 Mbps per account
upload_bw: 2
upload_bw_unit: Mbps
download_bw: 20
download_bw_unit: Mbps
priority: 0
rt_upload_bw_unit: Mbps
rt_download_bw_unit: Mbps
burst_upload_bw_unit: Mbps
burst_download_bw_unit: Mbps
sharing: account
policies:
- Basic
- name: 50x2 Mbps with guarantee
upload_bw: 2
upload_bw_unit: Mbps
download_bw: 50
download_bw_unit: Mbps
priority: 0
rt_upload_bw: 1
rt_upload_bw_unit: Mbps
rt_download_bw: 10
rt_download_bw_unit: Mbps
burst_upload_bw_unit: Mbps
burst_download_bw_unit: Mbps
sharing: account
policies:
- Business
- name: 50x2 Mbps per account
upload_bw: 2
upload_bw_unit: Mbps
download_bw: 50
download_bw_unit: Mbps
priority: 0
rt_upload_bw_unit: Mbps
rt_download_bw_unit: Mbps
burst_upload_bw_unit: Mbps
burst_download_bw_unit: Mbps
sharing: account
policies:
- Premium
- name: 100%
upload_bw: 100
upload_bw_unit: "%"
download_bw: 100
download_bw_unit: "%"
priority: 0
rt_upload_bw_unit: Kbps
rt_download_bw_unit: Kbps
burst_upload_bw_unit: Kbps
burst_download_bw_unit: Kbps
sharing: ip
policies:
- Post-Auth Landing
- Pre-Auth / Guests
Squid:
- name: Cache
_delete: true
########
# Template ends
########