-
Notifications
You must be signed in to change notification settings - Fork 1
/
vyos_conf_1_6_18
875 lines (875 loc) · 18.9 KB
/
vyos_conf_1_6_18
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
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
firewall {
all-ping enable
broadcast-ping disable
config-trap enable
group {
network-group NET-BLACKLISTED {
network 1.1.1.1/32
}
network-group NET-DMZ {
network 192.168.10.0/24
}
network-group NET-LAN {
network 192.168.20.0/24
}
network-group NET-MANAGEMENT {
network 192.168.30.0/24
}
network-group NET-WAN {
network 73.97.167.0/24
}
}
ipv6-receive-redirects disable
ipv6-src-route disable
ip-src-route disable
log-martians enable
name DMZ-IN {
default-action drop
enable-default-log
rule 1000 {
action drop
source {
group {
network-group NET-BLACKLISTED
}
}
}
rule 1001 {
action drop
destination {
group {
network-group NET-BLACKLISTED
}
}
}
rule 1010 {
action accept
state {
established enable
related enable
}
}
rule 1011 {
action drop
log enable
state {
invalid enable
}
}
}
name DMZ-LOCAL {
default-action drop
enable-default-log
rule 1000 {
action drop
source {
group {
network-group NET-BLACKLISTED
}
}
}
rule 1010 {
action accept
state {
established enable
related enable
}
}
rule 1011 {
action drop
state {
invalid enable
}
}
rule 1020 {
action accept
icmp {
type-name echo-request
}
protocol icmp
state {
new enable
}
}
rule 1030 {
action accept
destination {
port 67
}
protocol udp
state {
new enable
}
}
rule 1040 {
action accept
destination {
port 53
}
protocol tcp_udp
state {
new enable
}
}
rule 1050 {
action accept
destination {
port 123
}
protocol udp
state {
new enable
}
}
rule 1100 {
action drop
destination {
port 22
}
protocol tcp
recent {
count 3
time 90
}
source {
group {
network-group NET-MANAGEMENT
}
}
state {
new enable
}
}
rule 1101 {
action accept
destination {
port 22
}
protocol tcp
source {
group {
network-group NET-MANAGEMENT
}
}
state {
new enable
}
}
rule 1110 {
action accept
destination {
port 161
}
protocol udp
source {
group {
network-group NET-MANAGEMENT
}
}
state {
new enable
}
}
}
name DMZ-OUT {
default-action drop
enable-default-log
rule 1000 {
action drop
source {
group {
network-group NET-BLACKLISTED
}
}
}
rule 1001 {
action drop
destination {
group {
network-group NET-BLACKLISTED
}
}
}
rule 1010 {
action accept
state {
established enable
related enable
}
}
rule 1011 {
action drop
log enable
state {
invalid enable
}
}
rule 1020 {
action accept
icmp {
type-name echo-request
}
protocol icmp
state {
new enable
}
}
rule 1100 {
action accept
source {
group {
network-group NET-LAN
}
}
state {
new enable
}
}
rule 1101 {
action accept
source {
group {
network-group NET-MANAGEMENT
}
}
state {
new enable
}
}
rule 4000 {
action accept
destination {
address 192.168.10.2
port 80,443,6501
}
protocol tcp
state {
new enable
}
}
}
name LAN-IN {
default-action drop
enable-default-log
rule 1000 {
action drop
source {
group {
network-group NET-BLACKLISTED
}
}
}
rule 1001 {
action drop
destination {
group {
network-group NET-BLACKLISTED
}
}
}
rule 1010 {
action accept
state {
established enable
related enable
}
}
rule 1011 {
action drop
log enable
state {
invalid enable
}
}
rule 9000 {
action accept
source {
group {
network-group NET-LAN
}
}
state {
new enable
}
}
}
name LAN-LOCAL {
default-action drop
enable-default-log
rule 1000 {
action drop
source {
group {
network-group NET-BLACKLISTED
}
}
}
rule 1010 {
action accept
state {
established enable
related enable
}
}
rule 1011 {
action drop
state {
invalid enable
}
}
rule 1020 {
action accept
protocol icmp
state {
new enable
}
}
rule 1030 {
action accept
destination {
port 67
}
protocol udp
state {
new enable
}
}
rule 1040 {
action accept
destination {
port 53
}
protocol tcp_udp
state {
new enable
}
}
rule 1050 {
action accept
destination {
port 123
}
protocol udp
state {
new enable
}
}
rule 1100 {
action drop
destination {
port 22
}
protocol tcp
recent {
count 3
time 90
}
source {
group {
network-group NET-MANAGEMENT
}
}
state {
new enable
}
}
rule 1101 {
action accept
destination {
port 22
}
protocol tcp
source {
group {
network-group NET-MANAGEMENT
}
}
state {
new enable
}
}
rule 1110 {
action accept
destination {
port 161
}
protocol udp
source {
group {
network-group NET-MANAGEMENT
}
}
state {
new enable
}
}
}
name LAN-OUT {
default-action drop
enable-default-log
rule 1000 {
action drop
source {
group {
network-group NET-BLACKLISTED
}
}
}
rule 1001 {
action drop
destination {
group {
network-group NET-BLACKLISTED
}
}
}
rule 1010 {
action accept
state {
established enable
related enable
}
}
rule 1011 {
action drop
log enable
state {
invalid enable
}
}
rule 1020 {
action accept
icmp {
type-name echo-request
}
protocol icmp
state {
new enable
}
}
}
name WAN-LOCAL {
default-action drop
enable-default-log
rule 40 {
action accept
protocol esp
}
rule 41 {
action accept
destination {
port 500
}
protocol udp
}
rule 42 {
action accept
destination {
port 4500
}
protocol udp
}
rule 43 {
action accept
destination {
port 1701
}
ipsec {
match-ipsec
}
protocol udp
}
rule 1000 {
action drop
source {
group {
network-group NET-BLACKLISTED
}
}
}
rule 1010 {
action accept
state {
established enable
related enable
}
}
rule 1011 {
action drop
state {
invalid enable
}
}
rule 1020 {
action accept
icmp {
type-name echo-request
}
protocol icmp
state {
new enable
}
}
rule 1100 {
action drop
destination {
port 22
}
protocol tcp
recent {
count 3
time 90
}
source {
group {
network-group NET-MANAGEMENT
}
}
state {
new enable
}
}
rule 1101 {
action accept
destination {
port 22
}
protocol tcp
source {
group {
network-group NET-MANAGEMENT
}
}
state {
new enable
}
}
rule 1110 {
action accept
destination {
port 161
}
protocol udp
source {
group {
network-group NET-MANAGEMENT
}
}
state {
new enable
}
}
}
receive-redirects disable
send-redirects disable
source-validation disable
state-policy {
established {
action accept
}
invalid {
action drop
log {
enable
}
}
related {
action accept
}
}
syn-cookies enable
twa-hazards-protection disable
}
interfaces {
ethernet eth1 {
address 192.168.10.1/24
description Vlan10Server
duplex auto
firewall {
in {
name DMZ-IN
}
local {
name DMZ-LOCAL
}
out {
name DMZ-OUT
}
}
hw-id 52:54:00:28:f3:02
smp_affinity auto
speed auto
}
ethernet eth2 {
address 192.168.20.1/24
description Vlan20Client
duplex auto
firewall {
in {
name LAN-IN
}
out {
name LAN-OUT
}
}
hw-id 52:54:00:0d:39:44
smp_affinity auto
speed auto
}
ethernet eth3 {
address 192.168.30.1/24
description Vlan30MGMT
duplex auto
firewall {
}
hw-id 52:54:00:18:0e:49
smp_affinity auto
speed auto
}
ethernet eth4 {
address dhcp
description OUTSIDE
duplex auto
firewall {
local {
name WAN-LOCAL
}
}
hw-id 52:54:00:0a:e0:64
smp_affinity auto
speed auto
}
loopback lo {
}
}
nat {
destination {
rule 20 {
description "forward to rpi"
destination {
address 73.19.44.153
port 80,443
}
inbound-interface any
protocol tcp
translation {
address 192.168.10.2
}
}
}
source {
rule 100 {
outbound-interface eth4
source {
address 192.168.0.0/16
}
translation {
address masquerade
}
}
rule 110 {
description "NAT Reflection: INSIDE"
destination {
address 192.168.0.0/16
}
outbound-interface eth1
source {
address 192.168.0.0/16
}
translation {
address masquerade
}
}
rule 111 {
description "NAT Reflection: INSIDE2"
destination {
address 192.168.0.0/16
}
outbound-interface eth2
source {
address 192.168.0.0/16
}
translation {
address masquerade
}
}
rule 112 {
description "NAT Reflection: INSIDE3"
destination {
address 192.168.00.0/16
}
outbound-interface eth3
source {
address 192.168.0.0/16
}
translation {
address masquerade
}
}
}
}
protocols {
static {
route 10.0.0.0/8 {
blackhole {
distance 254
}
}
route 172.16.0.0/12 {
blackhole {
distance 254
}
}
route 192.168.0.0/16 {
blackhole {
distance 254
}
}
}
}
service {
dhcp-server {
disabled false
shared-network-name LAN {
authoritative enable
subnet 192.168.20.0/24 {
default-router 192.168.20.1
dns-server 192.168.20.1
domain-name int-net
lease 86400
start 192.168.20.40 {
stop 192.168.20.254
}
static-mapping rrubuntu {
ip-address 192.168.20.10
mac-address 3c:97:0e:1a:2b:c8
}
}
}
}
dns {
forwarding {
cache-size 0
listen-on eth2
listen-on eth1
listen-on eth3
name-server 8.8.8.8
name-server 8.8.4.4
}
}
ssh {
port 22
}
}
system {
config-management {
commit-revisions 20
}
console {
device ttyS0 {
speed 9600
}
}
host-name vyos
login {
user eris {
authentication {
encrypted-password ****************
plaintext-password ****************
public-keys eris@wherever {
key ****************
type ssh-rsa
}
}
full-name Eris
level admin
}
}
ntp {
server 0.pool.ntp.org {
}
server 1.pool.ntp.org {
}
server 2.pool.ntp.org {
}
}
package {
auto-sync 1
repository community {
components main
distribution helium
password ****************
url http://packages.vyos.net/vyos
username ""
}
}
syslog {
global {
facility all {
level notice
}
facility protocols {
level debug
}
}
}
time-zone UTC
}
vpn {
ipsec {
ike-group IKE_POLICY {
dead-peer-detection {
action clear
interval 30
timeout 90
}
key-exchange ikev2
lifetime 3600
proposal 1 {
dh-group 14
encryption aes256
hash sha256
}
}
ipsec-interfaces {
interface eth4
}
nat-networks {
allowed-network 0.0.0.0/0 {
}
}
nat-traversal enable
}
l2tp {
remote-access {
authentication {
local-users {
username bobert51 {
password ****************
}
username nick {
password ****************
}
}
mode local
}
client-ip-pool {
start 192.168.20.242
stop 192.168.20.250
}
description "VPN for labbing and remote admin"
dns-servers {
server-1 8.8.8.8
server-2 8.8.4.4
}
ipsec-settings {
authentication {
mode pre-shared-secret
pre-shared-secret ****************
}
ike-lifetime 3600
}
outside-address 73.19.44.153
}
}
}