-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathconfig.boot
497 lines (495 loc) · 10.8 KB
/
config.boot
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
firewall {
all-ping enable
broadcast-ping disable
group {
network-group LAN_NETS {
network 10.200.0.0/16
network 172.16.1.0/24
}
}
ipv6-receive-redirects disable
ipv6-src-route disable
ip-src-route disable
log-martians disable
modify balance {
rule 10 {
action modify
modify {
lb-group G
}
}
}
name WAN_IN {
default-action drop
description "WAN to internal"
rule 10 {
action accept
description "Allow established/related"
state {
established enable
related enable
}
}
rule 20 {
action drop
description "Drop invalid state"
state {
invalid enable
}
}
}
name WAN_LOCAL {
default-action drop
description "WAN to router"
rule 10 {
action accept
description "Allow established/related"
state {
established enable
related enable
}
}
rule 20 {
action drop
description "Drop invalid state"
state {
invalid enable
}
}
}
options {
mss-clamp {
mss 1340
}
}
receive-redirects disable
send-redirects enable
source-validation disable
syn-cookies enable
}
interfaces {
ethernet eth0 {
description "Internet - WAN"
duplex auto
pppoe 0 {
default-route auto
firewall {
in {
name WAN_IN
}
local {
name WAN_LOCAL
}
out {
}
}
mtu 1492
name-server auto
password --PRIVATE--
user-id --PRIVATE--
}
speed auto
}
ethernet eth1 {
address dhcp
description "Internet - WAN 2"
disable
duplex auto
firewall {
in {
name WAN_IN
}
local {
name WAN_LOCAL
}
}
speed auto
}
ethernet eth2 {
address 172.16.1.1/24
description "Testing LAN"
duplex auto
firewall {
in {
modify balance
}
}
speed auto
}
ethernet eth3 {
address 10.200.1.1/16
description LAN
duplex auto
firewall {
in {
modify balance
}
}
speed auto
}
ethernet eth4 {
duplex auto
speed auto
}
ethernet eth5 {
duplex auto
speed auto
}
ethernet eth6 {
duplex auto
speed auto
}
ethernet eth7 {
duplex auto
speed auto
}
loopback lo {
}
vti vti0 {
address INSIDE_CUSTOMER_GATEWAY_1/30
description "VPC tunnel 1"
mtu 1436
}
vti vti1 {
address INSIDE_CUSTOMER_GATEWAY_2/30
description "VPC tunnel 2"
mtu 1436
}
}
load-balance {
group G {
interface eth1 {
failover-only
route-test {
initial-delay 120
interval 60
type {
ping {
target 8.8.8.8
}
}
}
}
interface pppoe0 {
route {
table 1
}
route-test {
initial-delay 120
interval 60
type {
ping {
target 8.8.8.8
}
}
}
}
}
}
port-forward {
auto-firewall enable
hairpin-nat enable
lan-interface eth3
rule 1 {
description apache80
forward-to {
address 10.200.2.164
port 80
}
original-port 80
protocol tcp_udp
}
rule 2 {
description apache443
forward-to {
address 10.200.1.26
port 443
}
original-port 443
protocol tcp_udp
}
rule 3 {
description tomcat8080
forward-to {
address 10.200.1.26
port 8080
}
original-port 8080
protocol tcp_udp
}
rule 4 {
description tomcat8090
forward-to {
address 10.200.1.26
port 8090
}
original-port 8090
protocol tcp_udp
}
rule 5 {
description MasterMind
forward-to {
address 10.200.1.89
port 5494
}
original-port 5494
protocol tcp_udp
}
rule 6 {
description OpenVpn
forward-to {
address 10.200.1.100
port 1194
}
original-port 1194
protocol tcp_udp
}
rule 7 {
description ifernandez
forward-to {
address 10.200.3.204
port 18080
}
original-port 18080
protocol tcp_udp
}
rule 8 {
description "VPN pptp"
forward-to {
address 10.200.1.17
port 1723
}
original-port 1723
protocol tcp_udp
}
rule 9 {
description test
forward-to {
address 10.200.1.151
port 2000
}
original-port 2000
protocol tcp_udp
}
wan-interface pppoe0
}
protocols {
bgp 65001 {
neighbor INSIDE_VIRTUAL_PRIVATE_GATEWAY_1 {
remote-as 9059
soft-reconfiguration {
inbound
}
timers {
holdtime 30
keepalive 30
}
}
neighbor INSIDE_VIRTUAL_PRIVATE_GATEWAY_2 {
remote-as 9059
soft-reconfiguration {
inbound
}
timers {
holdtime 30
keepalive 30
}
}
network 10.200.0.0/16 {
}
}
static {
table 1 {
interface-route OUTSIDE_VIRTUAL_PRIVATE_GATEWAY_1/32 {
next-hop-interface pppoe0 {
}
}
interface-route OUTSIDE_VIRTUAL_PRIVATE_GATEWAY_2/32 {
next-hop-interface pppoe0 {
}
}
}
}
}
service {
dhcp-server {
disabled false
hostfile-update disable
shared-network-name LAN {
authoritative enable
subnet 172.16.1.0/24 {
default-router 172.16.1.1
dns-server 172.16.1.1
lease 86400
start 172.16.1.38 {
stop 172.16.1.243
}
}
}
shared-network-name Office {
authoritative disable
subnet 10.200.0.0/16 {
default-router 10.200.1.1
dns-server 10.200.1.49
dns-server 10.200.1.50
lease 86400
start 10.200.2.10 {
stop 10.200.2.254
}
}
}
}
dns {
forwarding {
cache-size 150
listen-on eth2
}
}
gui {
https-port 443
}
nat {
rule 5000 {
description "masquerade for WAN"
outbound-interface pppoe0
type masquerade
}
rule 5002 {
description "masquerade for WAN 2"
outbound-interface eth1
type masquerade
}
}
ssh {
port 22
protocol-version v2
}
}
system {
conntrack {
expect-table-size 4096
hash-size 4096
table-size 32768
tcp {
half-open-connections 512
loose enable
max-retrans 3
}
}
host-name ubnt
login {
user admin {
authentication {
encrypted-password --PRIVATE--
plaintext-password ""
}
full-name admin
level admin
}
user ubnt {
authentication {
encrypted-password --PRIVATE--
plaintext-password ""
}
full-name ""
level admin
}
}
name-server 10.200.1.49
name-server 10.200.1.50
name-server 8.8.8.8
ntp {
server 0.ubnt.pool.ntp.org {
}
server 1.ubnt.pool.ntp.org {
}
server 2.ubnt.pool.ntp.org {
}
server 3.ubnt.pool.ntp.org {
}
}
offload {
ipsec enable
ipv4 {
forwarding enable
pppoe enable
}
}
syslog {
global {
facility all {
level notice
}
facility protocols {
level debug
}
}
}
time-zone Europe/Madrid
traffic-analysis {
dpi enable
export enable
}
}
vpn {
ipsec {
auto-firewall-nat-exclude enable
esp-group AWS {
compression disable
lifetime 3600
mode tunnel
pfs enable
proposal 1 {
encryption aes128
hash sha1
}
}
ike-group AWS {
dead-peer-detection {
action restart
interval 15
timeout 30
}
key-exchange ikev1
lifetime 28800
proposal 1 {
dh-group 2
encryption aes128
hash sha1
}
}
ipsec-interfaces {
interface eth0
}
site-to-site {
peer OUTSIDE_VIRTUAL_PRIVATE_GATEWAY_1 {
authentication {
mode pre-shared-secret
pre-shared-secret --PRIVATE--
}
connection-type initiate
description "VPC tunnel 1"
ike-group AWS
local-address OUTSIDE_CUSTOMER_GATEWAY
vti {
bind vti0
esp-group AWS
}
}
peer OUTSIDE_VIRTUAL_PRIVATE_GATEWAY_2 {
authentication {
mode pre-shared-secret
pre-shared-secret --PRIVATE--
}
connection-type initiate
description "VPC tunnel 2"
ike-group AWS
local-address OUTSIDE_CUSTOMER_GATEWAY
vti {
bind vti1
esp-group AWS
}
}
}
}
}