# jan/16/2023 19:52:53 by RouterOS 7.7
# software id = JICF-P2RJ
#
# model = RBD52G-5HacD2HnD
# serial number = xxxxx
/interface bridge
add admin-mac=18:FD:74:D8:9B:8B auto-mac=no comment=defconf igmp-snooping=yes \
name=bridge
/interface wireless
set [ find default-name=wlan1 ] band=2ghz-g/n disabled=no distance=indoors \
frequency=2437 installation=indoor mode=ap-bridge ssid=mm14b-mk \
wireless-protocol=802.11
set [ find default-name=wlan2 ] band=5ghz-n/ac channel-width=20/40/80mhz-XXXX \
disabled=no distance=indoors frequency=auto installation=indoor mode=\
ap-bridge ssid=mm14b-mk wireless-protocol=802.11
/interface pppoe-client
add add-default-route=yes disabled=no interface=ether1 name=internet \
use-peer-dns=yes user=adslppp@telefonicanetpa
/interface wireguard
add listen-port=12345 mtu=1420 name=wireguard-rw
/interface list
add comment=defconf name=WAN
add comment=defconf name=LAN
/interface lte apn
set [ find default=yes ] ip-type=ipv4 use-network-apn=no
/interface wireless security-profiles
set [ find default=yes ] authentication-types=wpa-psk,wpa2-psk mode=\
dynamic-keys supplicant-identity=MikroTik
/ip dhcp-server option
add code=240 name=opch-imagenio value="':::::239.0.2.29:22222'"
/ip hotspot profile
set [ find default=yes ] html-directory=hotspot
/ip pool
add name=dhcp ranges=192.168.88.10-192.168.88.239
add name=iptv-dhcp ranges=192.168.88.241-192.168.88.254
/ip dhcp-server
add address-pool=dhcp interface=bridge name=defconf
/interface bridge port
add bridge=bridge comment=defconf interface=ether2
add bridge=bridge comment=defconf interface=ether3
add bridge=bridge comment=defconf interface=ether4
add bridge=bridge comment=defconf interface=ether5
add bridge=bridge comment=defconf interface=wlan1
add bridge=bridge comment=defconf interface=wlan2
/ip neighbor discovery-settings
set discover-interface-list=LAN
/ip settings
set max-neighbor-entries=8192
/ipv6 settings
set disable-ipv6=yes max-neighbor-entries=8192
/interface list member
add comment=defconf interface=bridge list=LAN
add comment=defconf interface=ether1 list=WAN
add interface=internet list=WAN
/interface ovpn-server server
set auth=sha1,md5
/interface wireguard peers
add allowed-address=192.168.50.2/32 comment=PeerRW interface=wireguard-rw \
public-key="la key"
/ip address
add address=192.168.88.1/24 comment=defconf interface=bridge network=\
192.168.88.0
add address=192.168.1.2/24 interface=ether1 network=192.168.1.0
add address=192.168.50.1/24 interface=wireguard-rw network=192.168.50.0
/ip cloud
set ddns-enabled=yes
/ip dhcp-server lease
add address=192.168.88.2 client-id=1:c:4d:e9:c9:5a:20 mac-address=\
0C:4D:E9:C9:5A:20 server=defconf
add address=192.168.88.3 client-id=1:c8:bc:c8:a1:92:f mac-address=\
C8:BC:C8:A1:92:0F server=defconf
/ip dhcp-server matcher
add address-pool=iptv-dhcp code=60 name=descos server=defconf value="[IAL]"
/ip dhcp-server network
add address=192.168.88.0/24 comment=defconf gateway=192.168.88.1
add address=192.168.88.240/28 comment=iptv-network dhcp-option=opch-imagenio \
dns-server=172.26.23.3 gateway=192.168.88.1 netmask=24
/ip dns
set allow-remote-requests=yes servers=1.1.1.1,1.0.0.1
/ip dns static
add address=192.168.88.1 comment=defconf name=router.lan
/ip 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 ICMP" protocol=icmp
add action=accept chain=input comment=\
"defconf: accept to local loopback (for CAPsMAN)" dst-address=127.0.0.1
add action=accept chain=input comment="vpn: allow wireguard-rw" dst-port=\
12345 protocol=udp
add action=accept chain=input src-address=192.168.50.2
add action=accept chain=input comment="input: allow traffic from HGU" \
in-interface=ether1
add action=drop chain=input comment="defconf: drop all not coming from LAN" \
in-interface-list=!LAN
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=fasttrack-connection chain=forward comment="defconf: fasttrack" \
connection-state=established,related hw-offload=yes
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
/ip firewall nat
add action=masquerade chain=srcnat comment="defconf: masquerade" \
ipsec-policy=out,none out-interface-list=WAN
/ip route
add distance=2 gateway=192.168.1.1
add dst-address=172.23.0.0/16 gateway=192.168.1.1
add dst-address=172.26.0.0/16 gateway=192.168.1.1
/routing igmp-proxy
set query-interval=30s quick-leave=yes
/routing igmp-proxy interface
add alternative-subnets=0.0.0.0/0 interface=ether1 upstream=yes
add interface=bridge
/system clock
set time-zone-name=Europe/Madrid
/system identity
set name=RouterOS
/tool mac-server
set allowed-interface-list=LAN
/tool mac-server mac-winbox
set allowed-interface-list=LAN