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
| # feb/14/2022 14:58:03 by RouterOS 6.49.2
# software id = HCL6-9J1X
#
# model = RB4011iGS+5HacQ2HnD
# serial number = 96890AC2EC81
/interface bridge
add name=bridge-guest
add admin-mac=74:4D:28:11:64:F0 auto-mac=no igmp-snooping=yes name=\
bridge-local protocol-mode=none
/interface ethernet
set [ find default-name=ether1 ] arp=proxy-arp l2mtu=1598 loop-protect=off
set [ find default-name=ether2 ] l2mtu=1598
/interface wireless
set [ find default-name=wlan1 ] band=5ghz-a/n/ac channel-width=\
20/40/80mhz-XXXX country=netherlands disabled=no distance=indoors \
frequency=auto installation=indoor mode=ap-bridge secondary-frequency=\
auto ssid=MikroTik5 station-roaming=enabled wds-default-bridge=\
bridge-local wireless-protocol=802.11 wps-mode=push-button-virtual-only
set [ find default-name=wlan2 ] band=2ghz-b/g/n channel-width=20/40mhz-XX \
country=netherlands disabled=no distance=indoors frequency=2452 \
installation=indoor mode=ap-bridge ssid=MikroTik2 station-roaming=enabled \
wireless-protocol=802.11 wps-mode=push-button-virtual-only
/interface vlan
add interface=ether1 name=vlan1.4 vlan-id=4
add interface=ether1 loop-protect=off name=vlan1.6 vlan-id=6
/interface pppoe-client
add add-default-route=yes allow=pap disabled=no interface=vlan1.6 \
keepalive-timeout=20 max-mru=1500 max-mtu=1500 name=pppoe-client \
password=1234 user=1234@provider
/interface ethernet switch port
set 0 default-vlan-id=0
set 1 default-vlan-id=0
set 2 default-vlan-id=0
set 3 default-vlan-id=0
set 4 default-vlan-id=0
set 5 default-vlan-id=0
set 6 default-vlan-id=0
set 7 default-vlan-id=0
set 8 default-vlan-id=0
set 9 default-vlan-id=0
set 10 default-vlan-id=0
set 11 default-vlan-id=0
/interface list
add comment=defconf name=WAN
add comment=defconf name=LAN
add name=VLAN
/interface wireless security-profiles
set [ find default=yes ] authentication-types=wpa2-psk eap-methods="" mode=\
dynamic-keys supplicant-identity=MikroTik wpa-pre-shared-key=xxxxx \
wpa2-pre-shared-key=xxxxx
add authentication-types=wpa2-psk eap-methods="" management-protection=\
allowed mode=dynamic-keys name=profile-guest supplicant-identity="" \
wpa2-pre-shared-key=xxxxxx
/interface wireless
add disabled=no keepalive-frames=disabled mac-address=76:4D:28:11:64:FA \
master-interface=wlan2 multicast-buffering=disabled name=wlan-guest \
security-profile=profile-guest ssid=Vuijk-Guest vlan-id=100 vlan-mode=\
use-tag wds-cost-range=0 wds-default-cost=0 wps-mode=disabled
/interface vlan
add interface=wlan-guest name=vlan-guest-100 vlan-id=100
/ip dhcp-client option
add code=60 name=option60-vendorclass value="'IPTV_RG'"
/ip dhcp-server option
add code=60 name=option60-vendorclass value="'IPTV_RG'"
add code=28 name=option28-broadcast value="'192.168.10.255'"
/ip dhcp-server option sets
add name=IPTV options=option60-vendorclass,option28-broadcast
/ip kid-control
add name=kid1
/ip pool
add name=dhcp ranges=192.168.10.10-192.168.10.254
add name=dhcp_pool4 ranges=10.10.10.2-10.10.10.254
add name=dhcp_pool5 ranges=10.10.10.20-10.10.10.254
/ip dhcp-server
add address-pool=dhcp disabled=no interface=bridge-local lease-time=1h30m \
name=dhcp-local
add address-pool=dhcp_pool5 disabled=no interface=bridge-guest lease-time=1d \
name=dhcp-guest
/ppp profile
set *0 only-one=yes use-compression=yes use-ipv6=no use-upnp=no
add name=default-ipv6 only-one=yes use-compression=yes use-upnp=no
add bridge=bridge-local local-address=dhcp name=pptp-profile remote-address=\
dhcp use-encryption=yes
/routing bgp instance
set default disabled=yes
/tool user-manager customer
set admin access=\
own-routers,own-users,own-profiles,own-limits,config-payment-gw
/user group
set full policy="local,telnet,ssh,ftp,reboot,read,write,policy,test,winbox,pas\
sword,web,sniff,sensitive,api,romon,dude,tikapp"
/interface bridge port
add bridge=bridge-local comment=defconf interface=ether2
add bridge=bridge-local comment=defconf interface=ether3
add bridge=bridge-local comment=defconf interface=ether4
add bridge=bridge-local comment=defconf interface=ether5
add bridge=bridge-local comment=defconf interface=ether6
add bridge=bridge-local comment=defconf interface=ether7
add bridge=bridge-local comment=defconf interface=ether8
add bridge=bridge-local comment=defconf interface=ether9
add bridge=bridge-local comment=defconf interface=ether10
add bridge=bridge-local comment=defconf interface=sfp-sfpplus1
add bridge=bridge-local comment=defconf interface=wlan1
add bridge=bridge-local comment=defconf interface=wlan2
add bridge=bridge-guest interface=vlan-guest-100
add bridge=bridge-guest interface=wlan-guest
/ip neighbor discovery-settings
set discover-interface-list=LAN
/interface detect-internet
set detect-interface-list=all
/interface list member
add comment=defconf interface=bridge-local list=LAN
add comment=defconf interface=ether1 list=WAN
add interface=vlan-guest-100 list=VLAN
add interface=bridge-guest list=VLAN
add interface=wlan-guest list=VLAN
/interface pptp-server server
set default-profile=pptp-profile enabled=yes
/interface wireless access-list
add comment="Meross 1" interface=wlan2 mac-address=48:E1:E9:14:68:A1
add comment="Meross 2" interface=wlan2 mac-address=48:E1:E9:14:7A:3C
add comment="Garage plug" interface=wlan2 mac-address=BC:DD:C2:95:C7:9A
add comment="Raspberry pi zero" interface=wlan2 mac-address=24:62:AB:41:5D:00
add comment="Spare Meross" interface=wlan2 mac-address=48:E1:E9:14:79:10
add comment=Vaillant interface=wlan2 mac-address=70:EE:50:2D:DD:7E
/ip address
add address=192.168.88.1/24 comment=defconf disabled=yes interface=\
bridge-local network=192.168.88.0
add address=192.168.10.1/24 interface=bridge-local network=192.168.10.0
add address=10.10.10.1/24 interface=bridge-guest network=10.10.10.0
/ip arp
add address=192.168.10.33 interface=bridge-local mac-address=\
00:E0:4C:36:02:2C
/ip dhcp-client
add comment=defconf disabled=no interface=ether1 use-peer-dns=no
add default-route-distance=210 dhcp-options=option60-vendorclass disabled=no \
interface=vlan1.4 use-peer-dns=no use-peer-ntp=no
/ip dhcp-server config
set store-leases-disk=15m
/ip dhcp-server lease
add address=192.168.10.13 client-id=1:68:5:ca:2d:99:90 mac-address=\
68:05:CA:2D:99:90 server=dhcp-local
add address=192.168.10.252 comment="Decoder KPN" dhcp-option-set=IPTV \
mac-address=00:02:9B:F7:0E:68 server=dhcp-local
add address=192.168.10.19 client-id=1:f6:b0:14:51:a9:e mac-address=\
F6:B0:14:51:A9:0E server=dhcp-local
add address=192.168.10.17 client-id=1:34:7e:5c:36:fa:8 mac-address=\
34:7E:5C:36:FA:08 server=dhcp-local
add address=192.168.10.24 client-id=1:84:57:33:ae:d:5b mac-address=\
84:57:33:AE:0D:5B server=dhcp-local
add address=192.168.10.25 client-id=1:4:d9:f5:f3:c4:34 comment=XenoPC \
mac-address=04:D9:F5:F3:C4:34 server=dhcp-local
add address=192.168.10.32 client-id=1:dc:a6:32:14:98:60 comment="Raspberry 4" \
dhcp-option=option60-vendorclass mac-address=DC:A6:32:14:98:60 server=\
dhcp-local
add address=192.168.10.41 always-broadcast=yes comment=NEST mac-address=\
64:16:66:A5:CD:83
add address=192.168.10.33 client-id=1:0:e0:4c:36:2:2c comment=\
"Raspberry pi Zero pihole" mac-address=00:E0:4C:36:02:2C server=\
dhcp-local
/ip dhcp-server network
add address=10.10.10.0/24 gateway=10.10.10.1
add address=192.168.10.0/24 gateway=192.168.10.1 netmask=24
/ip dns
set allow-remote-requests=yes cache-max-ttl=1d servers=1.1.1.1,1.0.0.1
/ip dns static
add address=192.168.10.1 comment=defconf name=router.lan
/ip firewall filter
add action=accept chain=forward comment="IPTV multicast" dst-address=\
224.0.0.0/8 in-interface=vlan1.4 protocol=udp
add action=accept chain=input comment="IPTV multicast" dst-address=\
224.0.0.0/8 in-interface=vlan1.4 protocol=igmp
add action=accept chain=input comment=VPN dst-port=1723 protocol=tcp
add action=accept chain=input comment=VPN protocol=gre
add action=accept chain=input comment=\
"defconf: accept established,related,untracked" connection-state=\
established,related,untracked
add action=accept chain=forward comment="VLAN 100 guest" in-interface-list=\
VLAN out-interface=ether1
add action=fasttrack-connection chain=forward comment="defconf: fasttrack" \
connection-state=established,related
add action=drop chain=input comment="defconf: drop invalid" connection-state=\
invalid
add action=accept chain=input comment="defconf: accept ICMP" protocol=icmp
add action=accept chain=input in-interface=pppoe-client protocol=icmp
add action=accept chain=input connection-state=related
add action=accept chain=input connection-state=established
add action=reject chain=input in-interface=pppoe-client protocol=tcp \
reject-with=icmp-port-unreachable
add action=reject chain=input in-interface=pppoe-client protocol=udp \
reject-with=icmp-port-unreachable
add action=accept chain=input comment=\
"defconf: accept to local loopback (for CAPsMAN)" dst-address=127.0.0.1
add action=accept chain=forward comment="defconf: accept in ipsec policy" \
ipsec-policy=in,ipsec
add action=accept chain=forward comment="defconf: accept out ipsec policy" \
ipsec-policy=out,ipsec
add action=accept chain=forward comment=\
"defconf: accept established,related, untracked" connection-state=\
established,related,untracked
add action=drop chain=forward comment="defconf: drop invalid" \
connection-state=invalid
add action=drop chain=forward comment=\
"defconf: drop all from WAN not DSTNATed" connection-nat-state=!dstnat \
connection-state=new in-interface-list=WAN
add action=drop chain=input comment="defconf: drop all not coming from LAN" \
in-interface-list=!LAN
/ip firewall nat
add action=masquerade chain=srcnat comment="defconf: masquerade" \
ipsec-policy=out,none out-interface-list=WAN
add action=masquerade chain=srcnat comment="Needed for IPTV" out-interface=\
vlan1.4
add action=src-nat chain=srcnat comment=\
"Hairpin NAT, internal ip's are now WAN ip's" dst-address=192.168.10.0/24 \
src-address=192.168.10.0/24 to-addresses=PASSWORD
add action=masquerade chain=srcnat comment="Needed for internet" \
out-interface=pppoe-client src-address=192.168.10.0/24
add action=dst-nat chain=dstnat comment=RASP4_4GB_Domoticz_192.168.10.32 \
dst-address=PASSWORD dst-port=8086 protocol=tcp to-addresses=\
192.168.10.32 to-ports=8086
add action=dst-nat chain=dstnat comment="NAS Jail FAMP" dst-address=\
PASSWORD dst-port=10000,80,8080 protocol=tcp to-addresses=\
192.168.10.50 to-ports=0-10000
add action=dst-nat chain=dstnat comment=RASP_Zero_PiHole_192.168.10.33 \
dst-address=PASSWORD dst-port=8084 protocol=tcp to-addresses=\
192.168.10.33 to-ports=80
add action=dst-nat chain=dstnat comment=PLEX dst-address=PASSWORD \
dst-port=32400,13210 protocol=tcp to-addresses=192.168.10.49 to-ports=\
32400
add action=dst-nat chain=dstnat comment=SABNZB dst-address=PASSWORD \
dst-port=8090 protocol=tcp to-addresses=192.168.10.13 to-ports=8090
add action=dst-nat chain=dstnat comment=RASP4_VNC_external_IP disabled=yes \
dst-address=PASSWORD dst-port=8087 protocol=tcp to-addresses=\
192.168.10.32 to-ports=8087
add action=dst-nat chain=dstnat comment=RASP4_VPN_external_IP dst-address=\
PASSWORD dst-port=51820,1194 protocol=udp to-addresses=192.168.10.32
add action=dst-nat chain=dstnat comment="vSmart Vaillant" dst-address=\
PASSWORD dst-port=25050 protocol=tcp to-addresses=192.168.10.50
add action=dst-nat chain=dstnat comment="vSmart Vaillant" dst-address=\
PASSWORD dst-port=25050 protocol=udp to-addresses=192.168.10.50
add action=masquerade chain=srcnat comment="Needed for IPTV" disabled=yes \
dst-address=213.75.112.0/21 out-interface=vlan1.4
add action=masquerade chain=srcnat comment="Needed for IPTV" disabled=yes \
dst-address=217.166.0.0/16 out-interface=vlan1.4
/ipv6 firewall address-list
add address=::/128 comment="defconf: unspecified address" list=bad_ipv6
add address=::1/128 comment="defconf: lo" list=bad_ipv6
add address=fec0::/10 comment="defconf: site-local" list=bad_ipv6
add address=::ffff:0.0.0.0/96 comment="defconf: ipv4-mapped" list=bad_ipv6
add address=::/96 comment="defconf: ipv4 compat" list=bad_ipv6
add address=100::/64 comment="defconf: discard only " list=bad_ipv6
add address=2001:db8::/32 comment="defconf: documentation" list=bad_ipv6
add address=2001:10::/28 comment="defconf: ORCHID" list=bad_ipv6
add address=3ffe::/16 comment="defconf: 6bone" list=bad_ipv6
add address=::224.0.0.0/100 comment="defconf: other" list=bad_ipv6
add address=::127.0.0.0/104 comment="defconf: other" list=bad_ipv6
add address=::/104 comment="defconf: other" list=bad_ipv6
add address=::255.0.0.0/104 comment="defconf: other" list=bad_ipv6
/ipv6 firewall filter
add action=accept chain=input comment=\
"defconf: accept established,related,untracked" connection-state=\
established,related,untracked
add action=drop chain=input comment="defconf: drop invalid" connection-state=\
invalid
add action=accept chain=input comment="defconf: accept ICMPv6" protocol=\
icmpv6
add action=accept chain=input comment="defconf: accept UDP traceroute" port=\
33434-33534 protocol=udp
add action=accept chain=input comment=\
"defconf: accept DHCPv6-Client prefix delegation." dst-port=546 protocol=\
udp src-address=fe80::/10
add action=accept chain=input comment="defconf: accept IKE" dst-port=500,4500 \
protocol=udp
add action=accept chain=input comment="defconf: accept ipsec AH" protocol=\
ipsec-ah
add action=accept chain=input comment="defconf: accept ipsec ESP" protocol=\
ipsec-esp
add action=accept chain=input comment=\
"defconf: accept all that matches ipsec policy" ipsec-policy=in,ipsec
add action=drop chain=input comment=\
"defconf: drop everything else not coming from LAN" in-interface-list=\
!LAN
add action=accept chain=forward comment=\
"defconf: accept established,related,untracked" connection-state=\
established,related,untracked
add action=drop chain=forward comment="defconf: drop invalid" \
connection-state=invalid
add action=drop chain=forward comment=\
"defconf: drop packets with bad src ipv6" src-address-list=bad_ipv6
add action=drop chain=forward comment=\
"defconf: drop packets with bad dst ipv6" dst-address-list=bad_ipv6
add action=drop chain=forward comment="defconf: rfc4890 drop hop-limit=1" \
hop-limit=equal:1 protocol=icmpv6
add action=accept chain=forward comment="defconf: accept ICMPv6" protocol=\
icmpv6
add action=accept chain=forward comment="defconf: accept HIP" protocol=139
add action=accept chain=forward comment="defconf: accept IKE" dst-port=\
500,4500 protocol=udp
add action=accept chain=forward comment="defconf: accept ipsec AH" protocol=\
ipsec-ah
add action=accept chain=forward comment="defconf: accept ipsec ESP" protocol=\
ipsec-esp
add action=accept chain=forward comment=\
"defconf: accept all that matches ipsec policy" ipsec-policy=in,ipsec
add action=drop chain=forward comment=\
"defconf: drop everything else not coming from LAN" in-interface-list=\
!LAN
/ppp secret
add name=ppppp password=ppppp profile=pptp-profile service=pptp
/routing igmp-proxy
set quick-leave=yes
/routing igmp-proxy interface
add alternative-subnets=0.0.0.0/0 interface=vlan1.4 upstream=yes
add interface=bridge-local
/system clock
set time-zone-name=Europe/Amsterdam
/system leds
add interface=wlan2 leds="wlan2_signal1-led,wlan2_signal2-led,wlan2_signal3-le\
d,wlan2_signal4-led,wlan2_signal5-led" type=wireless-signal-strength
add interface=wlan2 leds=wlan2_tx-led type=interface-transmit
add interface=wlan2 leds=wlan2_rx-led type=interface-receive
/tool mac-server
set allowed-interface-list=LAN
/tool mac-server mac-winbox
set allowed-interface-list=LAN
/tool user-manager database
set db-path=user-manager |