-
Notifications
You must be signed in to change notification settings - Fork 2
/
f17gw.settings
1882 lines (1630 loc) · 69.4 KB
/
f17gw.settings
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
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
#!/bin/sh
# Edgerouter X
# stop after any errors
set -xe
uci import system <<EOF
EOF
uci add system system
uci set system.@system[-1]=system
uci set system.@system[-1].compat_version=1.1
uci set system.@system[-1].hostname='f17gw'
uci set system.@system[-1].zonename='UTC'
uci set system.@system[-1].timezone='UTC'
uci set system.@system[-1].conloglevel='8'
uci set system.@system[-1].klogconloglevel='8'
uci set system.@system[-1].cronloglevel='0'
uci set system.@system[-1].log_ip='10.7.11.10'
uci set system.@system[-1].log_proto='tcp'
uci set system.@system[-1].log_port='514'
uci set system.@system[-1].log_size='128'
uci set system.@system[-1].log_buffer_size='64'
uci set system.@system[-1].log_remote='1'
uci set system.@system[-1].location='Falckensteinstraße'
uci set system.@system[-1].latitude='52.497618743398135'
uci set system.@system[-1].longitude='13.441156148912176'
uci set system.ntp=timeserver
uci set system.ntp.use_dhcp='0'
uci add_list system.ntp.server='0.de.pool.ntp.org'
uci add_list system.ntp.server='1.de.pool.ntp.org'
uci add_list system.ntp.server='2.de.pool.ntp.org'
uci commit system
uci import watchcat <<EOF
EOF
uci add watchcat watchcat
uci set watchcat.@watchcat[-1]=watchcat
uci set watchcat.@watchcat[-1].mode='ping'
uci set watchcat.@watchcat[-1].forcedelay='300'
uci set watchcat.@watchcat[-1].period='30m'
uci set watchcat.@watchcat[-1].pingperiod='5m'
uci set watchcat.@watchcat[-1].pinghosts='10.7.11.2'
uci commit watchcat.watchcat
uci import dropbear <<EOF
EOF
uci add dropbear dropbear
uci set dropbear.@dropbear[-1]=dropbear
uci set dropbear.@dropbear[-1].Port='22'
uci set dropbear.@dropbear[-1].PasswordAuth='0'
uci set dropbear.@dropbear[-1].RootPasswordAuth='0'
uci commit dropbear
cat <<'EOF' > /etc/dropbear/authorized_keys
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIHwK3f7YB4qmDKgnZ6yKaQlLEdDAFaVbNREiE2gyHwSN simon@imaginator.com
EOF
chmod 0600 /etc/dropbear/authorized_keys
uci import network <<EOF
EOF
uci set network.loopback=interface
uci set network.loopback.device='lo'
uci set network.loopback.proto='static'
uci set network.loopback.ipaddr='127.0.0.1'
uci set network.loopback.netmask='255.0.0.0'
uci set network.lan=interface
uci set network.lan.proto='static'
uci set network.lan.device='eth0.2'
uci add_list network.lan.ip6class='pyur6'
uci set network.lan.delegate='0'
uci set network.lan.igmp_snooping='1'
uci set network.lan.ip6assign='64'
uci set network.lan.ip6ifaceid='::1'
uci set network.lan.ip6weight='10'
uci set network.lan.ipaddr='10.7.11.1'
uci set network.lan.netmask='255.255.255.0'
uci add_list network.lan.dns_search='imagilan.imaginator.com'
uci set network.freifunk=interface
uci set network.freifunk.device='eth0.40'
uci set network.freifunk.proto='dhcp'
uci set network.freifunk.metric='20'
uci set network.freifunk.peerdns='0'
uci set network.freifunk6=interface
uci set network.freifunk6.proto='dhcpv6'
uci set network.freifunk6.device='eth0.40'
uci set network.freifunk6.reqaddress='try'
uci set network.freifunk6.reqprefix='62'
uci set network.freifunk6.metric='21'
uci set network.freifunk6.peerdns='0'
uci set network.pyur4=interface
uci set network.pyur4.device='eth4'
uci set network.pyur4.proto='dhcp'
uci set network.pyur4.broadcast='1'
uci set network.pyur4.peerdns='0'
uci set network.pyur4.metric='10'
uci set network.pyur6=interface
uci set network.pyur6.device='@pyur4'
uci set network.pyur6.proto='dhcpv6'
uci set network.pyur6.reqaddress='try'
uci set network.pyur6.hostname='f17gw6'
uci set network.pyur6.reqprefix='auto'
uci set network.pyur6.peerdns='0'
uci set network.pyur6.metric='11'
uci set network.iot=interface
uci set network.iot.proto='static'
uci set network.iot.device='eth0.5'
uci add_list network.iot.ip6class='pyur6'
uci set network.iot.delegate='0'
uci set network.iot.igmp_snooping='1'
uci set network.iot.ip6assign='64'
uci set network.iot.ip6weight='20'
uci set network.iot.ipaddr='10.7.9.1'
uci set network.iot.netmask='255.255.255.0'
uci set network.iot.ip6ifaceid='::1'
uci set network.splash=interface
uci set network.splash.proto='static'
uci set network.splash.device='eth0.6'
uci set network.splash.ipaddr='10.7.100.1'
uci set network.splash.netmask='255.255.255.0'
uci set network.splash.defaultroute='0'
uci set network.splash.delegate='0'
uci set network.henet=interface
uci set network.henet.proto='6in4'
uci set network.henet.peeraddr='216.66.86.114'
uci set network.henet.ip6addr='2001:470:6c:20a::2/64'
uci set network.henet.tunnelid='${henet_f17_tunnelid}'
uci set network.henet.username='${henet_f17_username}'
uci add_list network.henet.ip6prefix='2001:470:5155::/48'
uci set network.henet.password='${henet_f17_password}'
uci set network.henet.metric='31'
uci set network.henet.mtu='1480'
uci set network.henet.auto='0'
uci set network.wg0='interface'
uci set network.wg0.proto='wireguard'
uci set network.wg0.listen_port='12321'
uci add_list network.wg0.addresses='10.7.8.1/24'
uci set network.wg0.private_key='${wg_f17gw_private_key}'
uci set network.wg_simonphone=wireguard_wg0
uci set network.wg_simonphone.description='Simon Mobile'
uci set network.wg_simonphone.public_key='${wg_simonphone_public_key}'
uci set network.wg_simonphone.persistent_keepalive='25'
uci add_list network.wg_simonphone.allowed_ips='10.7.8.4/32'
uci set network.wg_simonphone.route_allowed_ips='1'
uci set network.wg_tablet=wireguard_wg0
uci set network.wg_tablet.description='OpenHAB Tablet'
uci set network.wg_tablet.public_key='${wg_tablet_public_key}'
uci set network.wg_tablet.persistent_keepalive='25'
uci add_list network.wg_tablet.allowed_ips='10.7.8.5/32'
uci set network.wg_tablet.route_allowed_ips='1'
uci set network.wg_furrow=wireguard_wg0
uci set network.wg_furrow.description='furrow'
uci set network.wg_furrow.public_key='${wg_furrow_public_key}'
uci set network.wg_furrow.persistent_keepalive='25'
uci add_list network.wg_furrow.allowed_ips='10.7.8.7/32'
uci set network.wg_furrow.route_allowed_ips='1'
uci set network.wg_windows=wireguard_wg0
uci set network.wg_windows.description='windows'
uci set network.wg_windows.public_key='${wg_windows_public_key}'
uci set network.wg_windows.persistent_keepalive='25'
uci add_list network.wg_windows.allowed_ips='10.7.8.8/32'
uci set network.wg_windows.route_allowed_ips='1'
uci add network route
uci set network.@route[-1].target='10.31.167.192/27' # Freifunk management network
uci set network.@route[-1].gateway='10.36.189.1'
uci set network.@route[-1].interface='freifunk'
uci commit network.@route[-1]
uci add network route6
uci set network.@route6[-1].target='2001:bf7:830:b001::/64' # Freifunk management network
uci set network.@route6[-1].gateway='2001:bf7:830:b000::1'
uci set network.@route6[-1].interface='freifunk6'
uci commit network.@route6[-1]
uci commit network
uci set luci.sauth.sessiontime="36000000"
uci commit luci
# f17 free wifi slash page
uci set uhttpd.splash=uhttpd
uci add_list uhttpd.splash.listen_http='0.0.0.0:81'
uci add_list uhttpd.splash.listen_http='[::]:81'
uci set uhttpd.splash.home='/splash'
uci commit uhttpd.splash
uci import ddns <<EOF
EOF
uci add ddns global
uci set ddns.global=ddns
uci set ddns.global.date_format='%F %R'
uci set ddns.global.log_lines='250'
uci set ddns.global.allow_local_ip='0'
uci set ddns.global.use_curl='1'
uci commit ddns.global
uci add ddns service
uci set ddns.@service[-1]=service
uci set ddns.@service[-1].cacert='/etc/ssl/certs/ca-certificates.crt'
uci set ddns.@service[-1].check_interval='5'
uci set ddns.@service[-1].check_unit='minutes'
uci set ddns.@service[-1].domain='${f17gw_ddns4_domain}'
uci set ddns.@service[-1].enabled='0'
uci set ddns.@service[-1].force_interval='5'
uci set ddns.@service[-1].force_unit='minutes'
uci set ddns.@service[-1].interface='pyur4' # hotplug events only on network (not interfaces)
uci set ddns.@service[-1].ip_interface='eth4'
uci set ddns.@service[-1].ip_source='interface' # using ip_source=interface due to bind_ip issues in curl
uci set ddns.@service[-1].lookup_host='${f17gw_ddns4_domain}'
uci set ddns.@service[-1].password='${f17gw_ddns4_password}'
uci set ddns.@service[-1].retry_count='0'
uci set ddns.@service[-1].retry_interval='5'
uci set ddns.@service[-1].retry_unit='minutes'
uci set ddns.@service[-1].service_name='he.net'
uci set ddns.@service[-1].use_https='1'
uci set ddns.@service[-1].use_ipv6='0'
uci set ddns.@service[-1].use_logfile='0'
uci set ddns.@service[-1].use_syslog='1'
uci set ddns.@service[-1].username='${f17gw_ddns4_username}'
uci commit ddns.@service[-1]
uci add ddns service
uci set ddns.@service[-1]=service
uci set ddns.@service[-1].cacert='/etc/ssl/certs/ca-certificates.crt'
uci set ddns.@service[-1].check_interval='5'
uci set ddns.@service[-1].check_unit='minutes'
uci set ddns.@service[-1].domain='${f17gw_ddns6_domain}'
uci set ddns.@service[-1].enabled='1'
uci set ddns.@service[-1].force_interval='5'
uci set ddns.@service[-1].force_unit='minutes'
uci set ddns.@service[-1].interface='pyur6' # hotplug events only on network (not interfaces)
uci set ddns.@service[-1].ip_interface='eth4'
uci set ddns.@service[-1].ip_source='interface'
uci set ddns.@service[-1].lookup_host='${f17gw_ddns6_domain}'
uci set ddns.@service[-1].password='${f17gw_ddns6_password}'
uci set ddns.@service[-1].retry_count='0'
uci set ddns.@service[-1].retry_interval='5'
uci set ddns.@service[-1].retry_unit='minutes'
uci set ddns.@service[-1].service_name='he.net'
uci set ddns.@service[-1].use_https='1'
uci set ddns.@service[-1].use_ipv6='1'
uci set ddns.@service[-1].use_logfile='0'
uci set ddns.@service[-1].use_syslog='1'
uci set ddns.@service[-1].username='${f17gw_ddns6_username}'
uci commit ddns.@service[-1]
service ddns enable || true
uci import softflowd<<EOF
EOF
uci add softflowd softflowd
uci set softflowd.@softflowd[-1]=softflowd
uci set softflowd.@softflowd[-1].enabled='1'
uci set softflowd.@softflowd[-1].interface='eth0.4'
uci set softflowd.@softflowd[-1].timeout='maxlife=60'
uci set softflowd.@softflowd[-1].max_flows='8192'
uci set softflowd.@softflowd[-1].host_port='10.7.11.1:2055'
uci set softflowd.@softflowd[-1].pid_file='/var/run/softflowd.pid'
uci set softflowd.@softflowd[-1].control_socket='/var/run/softflowd.ctl'
uci set softflowd.@softflowd[-1].export_version='9'
uci set softflowd.@softflowd[-1].tracking_level='full'
uci set softflowd.@softflowd[-1].track_ipv6='1'
uci set softflowd.@softflowd[-1].sampling_rate='1'
uci commit softflowd.@softflowd[-1]
service softflowd disable || true
uci import prometheus-node-exporter-lua<<EOF
EOF
uci set prometheus-node-exporter-lua.main=prometheus-node-exporter-lua
uci set prometheus-node-exporter-lua.main.listen_interface='lan'
uci set prometheus-node-exporter-lua.main.listen_port='9100'
uci commit prometheus-node-exporter-lua
service prometheus-node-exporter-lua enable || true
uci import firewall <<EOF
EOF
uci add firewall defaults
uci set firewall.@defaults[-1]=defaults
uci set firewall.@defaults[-1].input='REJECT'
uci set firewall.@defaults[-1].output='REJECT'
uci set firewall.@defaults[-1].forward='REJECT'
uci set firewall.@defaults[-1].drop_invalid=1
uci commit firewall.@defaults[-1]
# A zone section groups one or more interfaces and serves as a source or destination for forwardings,
# rules and redirects. Masquerading (NAT) of outgoing traffic is controlled on a per-zone basis.
# Note that masquerading is defined on the outgoing interface.
# INPUT rules for a zone describe what happens to traffic trying to reach the router itself through an interface in that zone.
# OUTPUT rules for a zone describe what happens to traffic originating from the router itself going through an interface in that zone.
# FORWARD rules for a zone describe what happens to traffic passing between different interfaces in that zone.
uci add firewall zone
uci set firewall.@zone[-1]=zone
uci set firewall.@zone[-1].name='lan'
uci add_list firewall.@zone[-1].network='lan'
uci add_list firewall.@zone[-1].network='wg0'
uci set firewall.@zone[-1].input='ACCEPT'
uci set firewall.@zone[-1].output='ACCEPT'
uci set firewall.@zone[-1].forward='ACCEPT'
uci set firewall.@zone[-1].log='1'
uci commit firewall.@zone[-1]
uci add firewall zone
uci set firewall.@zone[-1]=zone
uci set firewall.@zone[-1].name='freifunk'
uci add_list firewall.@zone[-1].network='freifunk'
uci add_list firewall.@zone[-1].network='freifunk6'
uci set firewall.@zone[-1].masq='1'
uci set firewall.@zone[-1].input='ACCEPT'
uci set firewall.@zone[-1].output='ACCEPT'
uci set firewall.@zone[-1].forward='ACCEPT'
uci set firewall.@zone[-1].log='1'
uci commit firewall.@zone[-1]
uci add firewall zone
uci set firewall.@zone[-1]=zone
uci set firewall.@zone[-1].name='iot'
uci add_list firewall.@zone[-1].network='iot'
uci set firewall.@zone[-1].input='ACCEPT'
uci set firewall.@zone[-1].output='ACCEPT'
uci set firewall.@zone[-1].forward='DROP'
uci set firewall.@zone[-1].log='1'
uci commit firewall.@zone[-1]
uci add firewall zone
uci set firewall.@zone[-1]=zone
uci set firewall.@zone[-1].name='splash'
uci add_list firewall.@zone[-1].network='splash'
uci set firewall.@zone[-1].input='ACCEPT'
uci set firewall.@zone[-1].output='ACCEPT'
uci set firewall.@zone[-1].forward='DROP'
uci set firewall.@zone[-1].log='1'
uci commit firewall.@zone[-1]
uci add firewall zone
uci set firewall.@zone[-1]=zone
uci set firewall.@zone[-1].name='pyur'
uci add_list firewall.@zone[-1].network='pyur4'
uci add_list firewall.@zone[-1].network='pyur6'
uci set firewall.@zone[-1].masq='1'
uci set firewall.@zone[-1].input='DROP'
uci set firewall.@zone[-1].output='ACCEPT'
uci set firewall.@zone[-1].forward='DROP'
uci set firewall.@zone[-1].log='1'
uci commit firewall.@zone[-1]
uci add firewall forwarding
uci set firewall.@forwarding[-1]=forwarding
uci set firewall.@forwarding[-1].src='pyur'
uci set firewall.@forwarding[-1].dest='pyur'
uci commit firewall.@forwarding[-1]
# Port forwardings (DNAT) are defined by redirect sections.
# All incoming traffic on the specified source zone which matches the given rules will be directed to the specified internal host.
# Redirects are also commonly known as “port forwarding”, and “virtual servers”.
# Port ranges are specified as start:stop, for instance 6666:6670. This is similar to the iptables syntax.
uci add firewall redirect
uci set firewall.@redirect[-1].src='pyur'
uci set firewall.@redirect[-1].name='logs from cable modem'
uci set firewall.@redirect[-1].src_ip='192.168.100.1'
uci set firewall.@redirect[-1].target='DNAT'
uci set firewall.@redirect[-1].dest='lan'
uci set firewall.@redirect[-1].dest_ip='10.7.11.10'
uci set firewall.@redirect[-1].src_dport='514'
uci commit firewall.@redirect[-1]
# fix to stop vpn traffic leaving and entering home network
uci add firewall redirect
uci set firewall.@redirect[-1]=redirect
uci set firewall.@redirect[-1].target='DNAT'
uci set firewall.@redirect[-1].name='wireguard'
uci set firewall.@redirect[-1].src='lan'
uci set firewall.@redirect[-1].dest='pyur'
uci set firewall.@redirect[-1].proto='udp'
uci set firewall.@redirect[-1].src_dport='12321'
uci set firewall.@redirect[-1].dest_ip='10.7.11.1'
uci set firewall.@redirect[-1].dest_port='12321'
uci set firewall.@redirect[-1].reflection=1
uci commit firewall.@redirect[-1]
# show a splah page for F17 Free Wifi
# uci add firewall redirect
# uci set firewall.@redirect[-1]=redirect
# uci set firewall.@redirect[-1].target='DNAT'
# uci set firewall.@redirect[-1].name='slash'
# uci set firewall.@redirect[-1].src='splash'
# uci set firewall.@redirect[-1].src_dport='80'
# uci set firewall.@redirect[-1].dest_ip='10.7.100.1'
# uci set firewall.@redirect[-1].dest_port='81'
# uci commit firewall.@redirect[-1]
# Rules
# Sections of the type rule can be used to define basic accept or reject rules to allow or restrict access to specific ports or hosts.
# If src and dest are given, the rule matches forwarded traffic
# If only src is given, the rule matches incoming traffic
# If only dest is given, the rule matches outgoing traffic
# If neither src nor dest are given, the rule defaults to an outgoing traffic rule
###############################################################################
# never lock ourselves out
###############################################################################
uci add firewall rule
uci set firewall.@rule[-1]=rule
uci set firewall.@rule[-1].name='anywhere to router:22'
uci set firewall.@rule[-1].src='*'
uci set firewall.@rule[-1].dest_port='22'
uci set firewall.@rule[-1].proto='tcp'
uci set firewall.@rule[-1].target='ACCEPT'
uci commit firewall.@rule[-1]
uci add firewall rule
uci set firewall.@rule[-1].name='ssh from anywhere'
uci add_list firewall.@rule[-1].proto='tcp'
uci set firewall.@rule[-1].src='pyur'
uci set firewall.@rule[-1].dest_port='22'
uci set firewall.@rule[-1].target='ACCEPT'
uci commit firewall.@rule[-1]
uci add firewall rule
uci set firewall.@rule[-1]=rule
uci set firewall.@rule[-1].name='anywhere to router:53'
uci set firewall.@rule[-1].src='*'
uci set firewall.@rule[-1].dest_port='53'
uci set firewall.@rule[-1].target='ACCEPT'
uci commit firewall.@rule[-1]
uci add firewall rule
uci set firewall.@rule[-1]=rule
uci set firewall.@rule[-1].name='Allow-Ping'
uci set firewall.@rule[-1].src='*'
uci set firewall.@rule[-1].family='any'
uci set firewall.@rule[-1].proto='icmp'
uci set firewall.@rule[-1].icmp_type='echo-request'
uci set firewall.@rule[-1].target='ACCEPT'
uci commit firewall.@rule[-1]
uci add firewall rule
uci set firewall.@rule[-1]=rule
uci set firewall.@rule[-1].name='wireguard'
uci set firewall.@rule[-1].enabled='1'
uci set firewall.@rule[-1].src='*'
uci set firewall.@rule[-1].proto='udp'
uci set firewall.@rule[-1].dest_port='12321'
uci set firewall.@rule[-1].target='ACCEPT'
uci commit firewall.@rule[-1]
###############################################################################
# WAN specific rules
###############################################################################
uci add firewall rule
uci set firewall.@rule[-1]=rule
uci set firewall.@rule[-1].name='WAN IPv6 input from WAN'
uci set firewall.@rule[-1].src='pyur'
uci set firewall.@rule[-1].proto='icmp'
uci add_list firewall.@rule[-1].icmp_type='echo-request'
uci add_list firewall.@rule[-1].icmp_type='echo-reply'
uci add_list firewall.@rule[-1].icmp_type='destination-unreachable'
uci add_list firewall.@rule[-1].icmp_type='packet-too-big'
uci add_list firewall.@rule[-1].icmp_type='time-exceeded'
uci add_list firewall.@rule[-1].icmp_type='bad-header'
uci add_list firewall.@rule[-1].icmp_type='unknown-header-type'
uci add_list firewall.@rule[-1].icmp_type='router-solicitation'
uci add_list firewall.@rule[-1].icmp_type='neighbour-solicitation'
uci add_list firewall.@rule[-1].icmp_type='router-advertisement'
uci add_list firewall.@rule[-1].icmp_type='neighbour-advertisement'
uci set firewall.@rule[-1].limit='1000/sec'
uci set firewall.@rule[-1].family='ipv6'
uci set firewall.@rule[-1].target='ACCEPT'
uci commit firewall.@rule[-1]
uci add firewall rule
uci set firewall.@rule[-1]=rule
uci set firewall.@rule[-1].name='WAN Forward ICMPv6 from wan to lan'
uci set firewall.@rule[-1].src='pyur'
uci set firewall.@rule[-1].dest='*'
uci set firewall.@rule[-1].proto='icmp'
uci add_list firewall.@rule[-1].icmp_type='echo-request'
uci add_list firewall.@rule[-1].icmp_type='echo-reply'
uci add_list firewall.@rule[-1].icmp_type='destination-unreachable'
uci add_list firewall.@rule[-1].icmp_type='packet-too-big'
uci add_list firewall.@rule[-1].icmp_type='time-exceeded'
uci add_list firewall.@rule[-1].icmp_type='bad-header'
uci add_list firewall.@rule[-1].icmp_type='unknown-header-type'
uci set firewall.@rule[-1].limit='1000/sec'
uci set firewall.@rule[-1].family='ipv6'
uci set firewall.@rule[-1].target='ACCEPT'
uci commit firewall.@rule[-1]
uci add firewall rule
uci set firewall.@rule[-1]=rule
uci set firewall.@rule[-1].name='WAN Allow-ICMPv6-LAN-output'
uci set firewall.@rule[-1].src='*'
uci set firewall.@rule[-1].dest='pyur'
uci set firewall.@rule[-1].proto='icmp'
uci add_list firewall.@rule[-1].icmp_type='echo-request'
uci add_list firewall.@rule[-1].icmp_type='echo-reply'
uci add_list firewall.@rule[-1].icmp_type='destination-unreachable'
uci add_list firewall.@rule[-1].icmp_type='packet-too-big'
uci add_list firewall.@rule[-1].icmp_type='time-exceeded'
uci add_list firewall.@rule[-1].icmp_type='bad-header'
uci add_list firewall.@rule[-1].icmp_type='unknown-header-type'
uci set firewall.@rule[-1].limit='1000/sec'
uci set firewall.@rule[-1].family='ipv6'
uci set firewall.@rule[-1].target='ACCEPT'
uci commit firewall.@rule[-1]
uci add firewall rule
uci set firewall.@rule[-1]=rule
uci set firewall.@rule[-1].name='WAN DHCPv6 requests'
uci set firewall.@rule[-1].src_ip='fe80::/10'
uci set firewall.@rule[-1].src_port='546'
uci set firewall.@rule[-1].dest='pyur'
uci set firewall.@rule[-1].dest_ip='ff02::1:2'
uci set firewall.@rule[-1].dest_port='547'
uci set firewall.@rule[-1].proto='udp'
uci set firewall.@rule[-1].family='ipv6'
uci set firewall.@rule[-1].target='ACCEPT'
uci commit firewall.@rule[-1]
uci add firewall rule
uci set firewall.@rule[-1]=rule
uci set firewall.@rule[-1].name='WAN DHCPv6 replies'
uci set firewall.@rule[-1].src='pyur'
uci set firewall.@rule[-1].src_ip='fe80::/10'
uci set firewall.@rule[-1].src_port='547'
uci set firewall.@rule[-1].dest_ip='fe80::/10'
uci set firewall.@rule[-1].dest_port='546'
uci set firewall.@rule[-1].proto='udp'
uci set firewall.@rule[-1].family='ipv6'
uci set firewall.@rule[-1].target='ACCEPT'
uci commit firewall.@rule[-1]
uci add firewall rule
uci set firewall.@rule[-1]=rule
uci set firewall.@rule[-1].name='WAN ICMP Input'
uci set firewall.@rule[-1].src='pyur'
uci set firewall.@rule[-1].family='ipv6'
uci set firewall.@rule[-1].proto='icmp'
uci add_list firewall.@rule[-1].icmp_type='echo-request'
uci add_list firewall.@rule[-1].icmp_type='echo-reply'
uci add_list firewall.@rule[-1].icmp_type='destination-unreachable'
uci add_list firewall.@rule[-1].icmp_type='packet-too-big'
uci add_list firewall.@rule[-1].icmp_type='time-exceeded'
uci add_list firewall.@rule[-1].icmp_type='bad-header'
uci add_list firewall.@rule[-1].icmp_type='unknown-header-type'
uci add_list firewall.@rule[-1].icmp_type='router-solicitation'
uci add_list firewall.@rule[-1].icmp_type='neighbour-solicitation'
uci add_list firewall.@rule[-1].icmp_type='router-advertisement'
uci add_list firewall.@rule[-1].icmp_type='neighbour-advertisement'
uci set firewall.@rule[-1].target='ACCEPT'
uci commit firewall.@rule[-1]
uci add firewall rule
uci set firewall.@rule[-1]=rule
uci set firewall.@rule[-1].name='WAN ICMP6 Forward'
uci set firewall.@rule[-1].src='pyur'
uci set firewall.@rule[-1].family='ipv6'
uci set firewall.@rule[-1].proto='icmp'
uci add_list firewall.@rule[-1].icmp_type='echo-request'
uci add_list firewall.@rule[-1].icmp_type='echo-reply'
uci add_list firewall.@rule[-1].icmp_type='destination-unreachable'
uci add_list firewall.@rule[-1].icmp_type='packet-too-big'
uci add_list firewall.@rule[-1].icmp_type='time-exceeded'
uci add_list firewall.@rule[-1].icmp_type='bad-header'
uci add_list firewall.@rule[-1].icmp_type='unknown-header-type'
uci set firewall.@rule[-1].target='ACCEPT'
uci commit firewall.@rule[-1]
###############################################################################
# lan zone specific rules
###############################################################################
uci add firewall forwarding
uci set firewall.@forwarding[-1]=forwarding
uci set firewall.@forwarding[-1].src='lan'
uci set firewall.@forwarding[-1].dest='lan'
uci commit firewall.@forwarding[-1]
uci add firewall forwarding
uci set firewall.@forwarding[-1]=forwarding
uci set firewall.@forwarding[-1].src='lan'
uci set firewall.@forwarding[-1].dest='freifunk'
uci commit firewall.@forwarding[-1]
uci add firewall forwarding
uci set firewall.@forwarding[-1]=forwarding
uci set firewall.@forwarding[-1].src='lan'
uci set firewall.@forwarding[-1].dest='iot'
uci commit firewall.@forwarding[-1]
uci add firewall forwarding
uci set firewall.@forwarding[-1]=forwarding
uci set firewall.@forwarding[-1].src='lan'
uci set firewall.@forwarding[-1].dest='pyur'
uci commit firewall.@forwarding[-1]
uci add firewall rule
uci set firewall.@rule[-1]=rule
uci set firewall.@rule[-1].name='WAN IPv6 input from LAN'
uci set firewall.@rule[-1].src='lan'
uci set firewall.@rule[-1].proto='icmp'
uci add_list firewall.@rule[-1].icmp_type='echo-request'
uci add_list firewall.@rule[-1].icmp_type='echo-reply'
uci add_list firewall.@rule[-1].icmp_type='destination-unreachable'
uci add_list firewall.@rule[-1].icmp_type='packet-too-big'
uci add_list firewall.@rule[-1].icmp_type='time-exceeded'
uci add_list firewall.@rule[-1].icmp_type='bad-header'
uci add_list firewall.@rule[-1].icmp_type='unknown-header-type'
uci add_list firewall.@rule[-1].icmp_type='router-solicitation'
uci add_list firewall.@rule[-1].icmp_type='neighbour-solicitation'
uci add_list firewall.@rule[-1].icmp_type='router-advertisement'
uci add_list firewall.@rule[-1].icmp_type='neighbour-advertisement'
uci set firewall.@rule[-1].limit='1000/sec'
uci set firewall.@rule[-1].family='ipv6'
uci set firewall.@rule[-1].target='ACCEPT'
uci commit firewall.@rule[-1]
uci add firewall rule
uci set firewall.@rule[-1]=rule
uci set firewall.@rule[-1].name='lan DHCPv4 requests'
uci set firewall.@rule[-1].src='lan'
uci set firewall.@rule[-1].dest_port='67-68'
uci set firewall.@rule[-1].proto='udp'
uci set firewall.@rule[-1].family='ipv4'
uci set firewall.@rule[-1].target='ACCEPT'
uci commit firewall.@rule[-1]
uci add firewall rule
uci set firewall.@rule[-1]=rule
uci set firewall.@rule[-1].name='lan DHCPv6 requests'
uci set firewall.@rule[-1].src='lan'
uci set firewall.@rule[-1].proto='udp'
uci set firewall.@rule[-1].src_ip='fe80::/10'
uci set firewall.@rule[-1].src_port='546'
uci set firewall.@rule[-1].dest_ip='ff02::1:2'
uci set firewall.@rule[-1].dest_port='547'
uci set firewall.@rule[-1].family='ipv6'
uci set firewall.@rule[-1].target='ACCEPT'
uci commit firewall.@rule[-1]
uci add firewall rule
uci set firewall.@rule[-1]=rule
uci set firewall.@rule[-1].name='lan prometheus'
uci set firewall.@rule[-1].src='lan'
uci set firewall.@rule[-1].dest_port='9100'
uci set firewall.@rule[-1].proto='tcp'
uci set firewall.@rule[-1].family='any'
uci set firewall.@rule[-1].target='ACCEPT'
uci commit firewall.@rule[-1]
uci add firewall rule
uci set firewall.@rule[-1]=rule
uci set firewall.@rule[-1].name='lan IGMP from lan'
uci set firewall.@rule[-1].src='lan'
uci set firewall.@rule[-1].proto='igmp'
uci set firewall.@rule[-1].target='ACCEPT'
uci commit firewall.@rule[-1]
uci add firewall rule
uci set firewall.@rule[-1]=rule
uci set firewall.@rule[-1].name='lan Multicast to LAN'
uci set firewall.@rule[-1].src='lan'
uci set firewall.@rule[-1].proto='udp'
uci set firewall.@rule[-1].family='ipv4'
uci set firewall.@rule[-1].dest_ip='224.0.0.0/4'
uci set firewall.@rule[-1].target='ACCEPT'
uci commit firewall.@rule[-1]
uci add firewall rule
uci set firewall.@rule[-1]=rule
uci set firewall.@rule[-1].name='anywhere to hosts:80'
uci set firewall.@rule[-1].src='*'
uci set firewall.@rule[-1].dest='lan'
uci set firewall.@rule[-1].dest_port='80'
uci add_list firewall.@rule[-1].dest_ip='10.7.11.10' # bunker from IoT hosts that only speak ipv4
uci add_list firewall.@rule[-1].dest_ip='::5243/::ffff:ffff:ffff:ffff' # ln
uci add_list firewall.@rule[-1].dest_ip='::ef43/::ffff:ffff:ffff:ffff' # bunker
uci set firewall.@rule[-1].proto='tcp'
uci set firewall.@rule[-1].target='ACCEPT'
uci commit firewall.@rule[-1]
uci add firewall rule
uci set firewall.@rule[-1]=rule
uci set firewall.@rule[-1].name='anywhere to hosts:443'
uci set firewall.@rule[-1].src='*'
uci set firewall.@rule[-1].dest='lan'
uci set firewall.@rule[-1].dest_port='443'
uci add_list firewall.@rule[-1].dest_ip='10.7.11.10' # bunker from IoT hosts that only speak ipv4
uci add_list firewall.@rule[-1].dest_ip='::5243/::ffff:ffff:ffff:ffff' # ln
uci add_list firewall.@rule[-1].dest_ip='::ef43/::ffff:ffff:ffff:ffff' # bunker
uci set firewall.@rule[-1].proto='tcp'
uci set firewall.@rule[-1].target='ACCEPT'
uci commit firewall.@rule[-1]
uci add firewall rule
uci set firewall.@rule[-1]=rule
uci set firewall.@rule[-1].name='anywhere to Plex'
uci set firewall.@rule[-1].src='*'
uci set firewall.@rule[-1].dest='lan'
uci set firewall.@rule[-1].dest_port='32400' # plex
uci add_list firewall.@rule[-1].dest_ip='10.7.11.10'
uci add_list firewall.@rule[-1].dest_ip='::ef43/::ffff:ffff:ffff:ffff' # http://blog.dupondje.be/?p=17
uci set firewall.@rule[-1].proto='tcp'
uci set firewall.@rule[-1].target='ACCEPT'
uci commit firewall.@rule[-1]
uci add firewall rule
uci set firewall.@rule[-1]=rule
uci set firewall.@rule[-1].name='anywhere to lightning'
uci set firewall.@rule[-1].src='*'
uci set firewall.@rule[-1].dest='lan'
uci set firewall.@rule[-1].dest_port='8333'
uci add_list firewall.@rule[-1].dest_ip='10.7.11.10' # bunker from IoT hosts that only speak ipv4
uci add_list firewall.@rule[-1].dest_ip='::5243/::ffff:ffff:ffff:ffff' # ln
uci add_list firewall.@rule[-1].dest_ip='::ef43/::ffff:ffff:ffff:ffff' # bunker
uci set firewall.@rule[-1].proto='tcp'
uci set firewall.@rule[-1].target='ACCEPT'
uci commit firewall.@rule[-1]
uci add firewall rule
uci set firewall.@rule[-1]=rule
uci set firewall.@rule[-1].name='anywhere to lightning'
uci set firewall.@rule[-1].src='*'
uci set firewall.@rule[-1].dest='lan'
uci set firewall.@rule[-1].dest_port='9735'
uci add_list firewall.@rule[-1].dest_ip='10.7.11.10' # bunker from IoT hosts that only speak ipv4
uci add_list firewall.@rule[-1].dest_ip='::5243/::ffff:ffff:ffff:ffff' # ln
uci add_list firewall.@rule[-1].dest_ip='::ef43/::ffff:ffff:ffff:ffff' # bunker
uci set firewall.@rule[-1].proto='tcp'
uci set firewall.@rule[-1].target='ACCEPT'
uci commit firewall.@rule[-1]
###############################################################################
# Freifunk zone specific rules
###############################################################################
uci add firewall forwarding
uci set firewall.@forwarding[-1]=forwarding
uci set firewall.@forwarding[-1].src='freifunk'
uci set firewall.@forwarding[-1].dest='freifunk'
uci commit firewall.@forwarding[-1]
uci add firewall rule
uci set firewall.@rule[-1]=rule
uci set firewall.@rule[-1].name='freifunk web'
uci set firewall.@rule[-1].enabled='1'
uci set firewall.@rule[-1].src='freifunk'
uci add_list firewall.@rule[-1].proto='tcp'
uci add_list firewall.@rule[-1].proto='udp'
uci set firewall.@rule[-1].dest_port='80'
uci set firewall.@rule[-1].target='ACCEPT'
uci commit firewall.@rule[-1]
###############################################################################
# IoT zone specific rules
###############################################################################
uci add firewall forwarding
uci set firewall.@forwarding[-1]=forwarding
uci set firewall.@forwarding[-1].src='iot'
uci set firewall.@forwarding[-1].dest='freifunk'
uci commit firewall.@forwarding[-1]
uci add firewall forwarding
uci set firewall.@forwarding[-1]=forwarding
uci set firewall.@forwarding[-1].src='iot'
uci set firewall.@forwarding[-1].dest='pyur'
uci commit firewall.@forwarding[-1]
uci add firewall nat
uci set firewall.@nat[-1]=nat
uci set firewall.@nat[-1].name='imagiSuck Roborock S7 / Home Assistant discovery fix'
uci set firewall.@nat[-1].src='iot'
uci set firewall.@nat[-1].dest_ip='10.7.9.50'
uci set firewall.@nat[-1].target='SNAT'
uci set firewall.@nat[-1].snat_ip='10.7.9.1'
uci commit firewall.@nat[-1]
uci add firewall rule
uci set firewall.@rule[-1]=rule
uci set firewall.@rule[-1].name='IoT DHCP inbound'
uci set firewall.@rule[-1].proto='udp'
uci set firewall.@rule[-1].src='iot'
uci set firewall.@rule[-1].src_port='68'
uci set firewall.@rule[-1].dest_port='67'
uci set firewall.@rule[-1].target='ACCEPT'
uci commit firewall.@rule[-1]
uci add firewall rule
uci set firewall.@rule[-1]=rule
uci set firewall.@rule[-1].name='IoT DHCP outbound'
uci set firewall.@rule[-1].proto='udp'
uci set firewall.@rule[-1].dest='iot'
uci set firewall.@rule[-1].src_port='67'
uci set firewall.@rule[-1].dest_port='68'
uci set firewall.@rule[-1].target='ACCEPT'
uci commit firewall.@rule[-1]
uci add firewall rule
uci set firewall.@rule[-1]=rule
uci set firewall.@rule[-1].name='IoT NTP outbound' # all other zones can outbound by default, not IoT
uci set firewall.@rule[-1].src='iot'
uci set firewall.@rule[-1].dest='pyur'
uci set firewall.@rule[-1].proto='udp'
uci set firewall.@rule[-1].dest_port='123'
uci set firewall.@rule[-1].target='ACCEPT'
uci commit firewall.@rule[-1]
uci add firewall rule
uci set firewall.@rule[-1].name='syslog'
uci add_list firewall.@rule[-1].proto='tcp'
uci add_list firewall.@rule[-1].proto='udp'
uci set firewall.@rule[-1].src='iot'
uci set firewall.@rule[-1].dest='lan'
uci add_list firewall.@rule[-1].dest_ip='10.7.11.10'
uci add_list firewall.@rule[-1].dest_ip='::ef43/::ffff:ffff:ffff:ffff' # bunker
uci set firewall.@rule[-1].dest_port='514'
uci set firewall.@rule[-1].target='ACCEPT'
uci commit firewall.@rule[-1]
uci add firewall rule
uci set firewall.@rule[-1].name='mqtt'
uci add_list firewall.@rule[-1].proto='tcp'
uci set firewall.@rule[-1].src='iot'
uci set firewall.@rule[-1].dest='lan'
uci add_list firewall.@rule[-1].dest_ip='10.7.11.10'
uci set firewall.@rule[-1].dest_port='1883'
uci set firewall.@rule[-1].target='ACCEPT'
uci commit firewall.@rule[-1]
uci add firewall rule
uci set firewall.@rule[-1].name='tablets to homeassistant web'
uci add_list firewall.@rule[-1].proto='tcp'
uci set firewall.@rule[-1].src='iot'
uci set firewall.@rule[-1].dest='lan'
uci add_list firewall.@rule[-1].dest_ip='10.7.11.142'
uci set firewall.@rule[-1].dest_port='8123'
uci set firewall.@rule[-1].target='ACCEPT'
uci commit firewall.@rule[-1]
uci add firewall rule
uci set firewall.@rule[-1].name='multicast into iot network'
uci add_list firewall.@rule[-1].proto='udp'
uci set firewall.@rule[-1].src='iot'
uci set firewall.@rule[-1].dest='iot'
uci add_list firewall.@rule[-1].dest_ip='224.0.0.251'
uci set firewall.@rule[-1].target='ACCEPT'
uci commit firewall.@rule[-1]
service firewall enable || true
uci import unbound <<EOF
EOF
uci add unbound unbound
uci set unbound.@unbound[-1]=unbound
uci set unbound.@unbound[-1].manual_conf='1'
uci set unbound.@unbound[-1].enabled='1'
uci set unbound.@unbound[-1].trigger_interface='pyur4'
uci commit unbound
service unbound enable || true
cat <<'EOF' > /etc/unbound/unbound.conf
# forward all queries for imagilan.imaginator.com to a nameserver at 127.0.0.1
# forward all queries for 7.10.in-addr.arpa to a nameserver at 127.0.0.1
# forward all other queries to cloudflare-dns.com
# returns ipv4 and ipv6 addresses to requests on the LAN interface
# returns only ipv6 addresses to requests on the WAN interface
# private-address: define the private addresses used in private-domain
# private-domain: Allow this domain, and all its subdomains to contain private addresses.
# domain-insecure: disable dnssec for this domain
server:
interface: 0.0.0.0
interface: ::0
access-control: ::0/0 allow
access-control: 0.0.0.0/0 allow
do-not-query-localhost: no
use-syslog: yes
interface-automatic: yes
edns-buffer-size: 1472
verbosity: 3
log-queries: yes
log-replies: yes
edns-buffer-size: 1200
# Allow plex.direct to return local addresses, otherwise Plex will fail
private-domain: "plex.direct"
# private-domain: "imagilan.imaginator.com."
# private-address: "10.0.0.0/8"
# domain-insecure: "imagilan.imaginator.com."
# domain-insecure: "7.10.in-addr.arpa."
local-zone: "imagilan.imaginator.com." transparent
local-data: "imagilan.imaginator.com. 3600 IN NS f17gw.dyndns.imaginator.com."
local-data: "imagilan.imaginator.com. 3600 SOA f17gw.dyndns.imaginator.com. nobody.invalid. 1 3600 600 36000 60"
remote-control:
control-enable: no
forward-zone:
name: "imagilan.imaginator.com."
forward-addr: 127.0.0.1@5355
forward-zone:
name: "7.10.in-addr.arpa."
forward-addr: 127.0.0.1@5355
forward-zone:
name: "olsr."
forward-addr: 10.36.189.1
forward-zone:
name: "31.10.in-addr.arpa."
forward-addr: 10.36.189.1
forward-zone:
name: "."
forward-tls-upstream: no
forward-addr: 1.1.1.1@53 #cloudflare-dns.com
forward-addr: 1.0.0.1@53 #cloudflare-dns.com
forward-addr: 2606:4700:4700::1111@53 #cloudflare-dns.com
forward-addr: 2606:4700:4700::1001@53 #cloudflare-dns.com
EOF
service unbound disable
uci import dhcp <<EOF
EOF
uci add dhcp dnsmasq
uci set dhcp.@dnsmasq[-1]=dnsmasq
uci set dhcp.@dnsmasq[-1].add_local_fqdn='0'
uci set dhcp.@dnsmasq[-1].add_local_hostname='0'
uci set dhcp.@dnsmasq[-1].add_wan_fqdn='4' # creates hostnames like eth0-4.f17gw.imagilan.imaginator.com
uci set dhcp.@dnsmasq[-1].authoritative='1' # speed up DHCP lease queries
uci set dhcp.@dnsmasq[-1].domain='imagilan.imaginator.com' # DNS domain handed out to DHCP clients
uci set dhcp.@dnsmasq[-1].expandhosts='1' # Add the local domain part to names found in /etc/hosts
uci set dhcp.@dnsmasq[-1].localuse='1' #
uci set dhcp.@dnsmasq[-1].logqueries='0'
uci set dhcp.@dnsmasq[-1].port='53'
uci set dhcp.@dnsmasq[-1].rapid_commit='1'
uci commit dhcp.@dnsmasq[-1]
uci set dhcp.lan=dhcp
uci set dhcp.lan.interface='lan'
uci add_list dhcp.lan.dhcp_option='114,urn:ietf:params:capport:unrestricted'
uci add_list dhcp.lan.dhcp_option='option:dns-server,10.7.11.1'
uci add_list dhcp.lan.dhcp_option='option:log-server,10.7.11.10'
uci add_list dhcp.lan.domain='imagilan.imaginator.com'
uci set dhcp.lan.master='1'
uci set dhcp.lan.leasetime='1h'
uci set dhcp.lan.ra='server'
uci set dhcp.lan.start='100'
uci commit dhcp.lan
uci set dhcp.iot=dhcp
uci set dhcp.iot.interface='iot'
uci add_list dhcp.iot.dhcp_option='114,urn:ietf:params:capport:unrestricted'
uci add_list dhcp.iot.dhcp_option='option:dns-server,10.7.9.1'