shows empty.
# 2024-03-29 11:18:42 by RouterOS 7.14.1
#
# model = RBD52G-5HacD2HnD
/caps-man channel
add band=2ghz-g/n control-channel-width=20mhz extension-channel=disabled name=2.4ghz reselect-interval=30m save-selected=yes tx-power=17
add band=5ghz-n/ac control-channel-width=20mhz extension-channel=XXXX name=5ghz reselect-interval=30m save-selected=yes
/interface bridge
add admin-mac=48:8F:5A:4F:18:FB arp=proxy-arp auto-mac=no comment=defconf name=bridge port-cost-mode=short
/interface wireless
# managed by CAPsMAN
# channel: 2447/20-Ce/gn(14dBm), SSID: al, CAPsMAN forwarding
set [ find default-name=wlan1 ] band=2ghz-b/g/n channel-width=20/40mhz-XX country=israel distance=indoors frequency=auto installation=indoor keepalive-frames=disabled mode=ap-bridge multicast-buffering=disabled multicast-helper=disabled ssid=al-router-2.4G wireless-protocol=802.11 wmm-support=enabled wps-mode=disabled
# managed by CAPsMAN
# channel: 5260/20-Ceee/ac/DP(17dBm), SSID: al, CAPsMAN forwarding
set [ find default-name=wlan2 ] band=5ghz-a/n/ac channel-width=20/40/80mhz-XXXX country=israel distance=indoors frequency=auto installation=indoor keepalive-frames=disabled mode=ap-bridge multicast-buffering=disabled multicast-helper=disabled ssid=al-router-5G wireless-protocol=802.11 wmm-support=enabled
/caps-man datapath
add bridge=bridge name=common
/caps-man rates
add basic=12Mbps name="no b" supported=12Mbps,18Mbps,24Mbps,36Mbps,48Mbps,54Mbps
/caps-man security
add authentication-types=wpa2-psk disable-pmkid=yes encryption=aes-ccm group-encryption=aes-ccm group-key-update=1h name=common
/caps-man configuration
add channel=2.4ghz country=israel datapath=common distance=indoors hw-protection-mode=rts-cts installation=any name=2.4ghz rates="no b" security=common ssid=al
add channel=5ghz country=israel datapath=common distance=indoors hw-protection-mode=rts-cts installation=any name=5ghz rates="no b" security=common ssid=al
add channel=2.4ghz country=israel datapath=common distance=indoors hw-protection-mode=rts-cts installation=indoor name="2.4ghz: slave" rates="no b" security=common ssid=al-2.4
/caps-man interface
add channel.extension-channel=XX .frequency=2412,2437,2462 configuration=2.4ghz disabled=no l2mtu=1600 mac-address=08:55:31:45:83:D8 master-interface=none name=2.4-cap-1 radio-mac=08:55:31:45:83:D8 radio-name=0855314583D8
add configuration="2.4ghz: slave" configuration.installation=any disabled=no l2mtu=1600 mac-address=0A:55:31:45:83:D8 master-interface=2.4-cap-1 name=2.4-cap-1-1 radio-mac=00:00:00:00:00:00 radio-name=0A55314583D8
add channel.extension-channel=Ce .frequency=2422,2447 configuration=2.4ghz disabled=no l2mtu=1600 mac-address=48:8F:5A:4F:18:FF master-interface=none name=2.4-router-1 radio-mac=48:8F:5A:4F:18:FF radio-name=488F5A4F18FF
add configuration="2.4ghz: slave" configuration.installation=any disabled=no l2mtu=1600 mac-address=4A:8F:5A:4F:18:FF master-interface=2.4-router-1 name=2.4-router-1-1 radio-mac=00:00:00:00:00:00 radio-name=4A8F5A4F18FF
add channel.control-channel-width=20mhz .extension-channel=Ceee .frequency=5180 .tx-power=25 configuration=5ghz disabled=no l2mtu=1600 mac-address=08:55:31:45:83:D9 master-interface=none name=5-cap-1 radio-mac=08:55:31:45:83:D9 radio-name=0855314583D9
add channel.extension-channel=Ceee .frequency=5260 configuration=5ghz disabled=no l2mtu=1600 mac-address=48:8F:5A:4F:19:00 master-interface=none name=5-router-1 radio-mac=48:8F:5A:4F:19:00 radio-name=488F5A4F1900
/interface list
add comment=defconf name=WAN
add comment=defconf name=LAN
add name=5ghz
add name=2.4ghz
/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 group-key-update=1h mode=dynamic-keys supplicant-identity=MikroTik
/ip ipsec peer
add name=l2tpserver passive=yes
/ip ipsec proposal
set [ find default=yes ] auth-algorithms=sha256 enc-algorithms=3des
/ip pool
add name=dhcp ranges=10.0.5.25-10.0.5.254
add name=ovpn ranges=10.0.5.18-10.0.5.24
/ip dhcp-server
add address-pool=dhcp interface=bridge lease-script=":local scriptName \"dhcp2dns\"\n:do {\n :local scriptSrc [ /system script get [ find name=\$scriptName ] source ]\n :local scriptObj [ :parse \$scriptSrc ]\n \$scriptObj leaseBound=\$leaseBound leaseServerName=\$leaseServerName\_leaseActIP=\$leaseActIP leaseActMAC=\$leaseActMAC\n} on-error={ :log warning \"DHCP server '\$leaseServerName' lease script\_error\" };" lease-time=10m name=defconf
/ip smb users
set [ find default=yes ] disabled=yes
/ppp profile
add dns-server=10.0.5.17 interface-list=LAN local-address=10.0.5.17 name=ovpn remote-address=ovpn use-encryption=yes
/queue tree
add comment="Uplink QoS" max-limit=105M name=QoS_ether1 parent=ether1 queue=wireless-default
add comment="Queue Priority 1" name="IP Precedence 7. Network Control (Top Priority) - ether1" packet-mark=ip_precedence_7 parent=QoS_ether1 priority=1 queue=wireless-default
add comment="Queue Priority 2" name="IP Precedence 6. Internetwork Control (High Priority) - ether1" packet-mark=ip_precedence_6 parent=QoS_ether1 priority=2 queue=wireless-default
add comment="Queue Priority 3" name="IP Precedence 5. Voice (Medium-High Priority) - ether1" packet-mark=ip_precedence_5 parent=QoS_ether1 priority=3 queue=wireless-default
add comment="Queue Priority 4" name="IP Precedence 4. Interactive Video (Medium Priority) - ether1" packet-mark=ip_precedence_4 parent=QoS_ether1 priority=4 queue=wireless-default
add comment="Queue Priority 5" name="IP Precedence 3. Critical Data or Call Signaling (Medium-Low Priority) - ether1" packet-mark=ip_precedence_3 parent=QoS_ether1 priority=5 queue=wireless-default
add comment="Queue Priority 6" name="IP Precedence 0. Best Effort (Low Priority) - ether1" packet-mark=no-mark parent=QoS_ether1 priority=6 queue=wireless-default
add comment="Queue Priority 7" name="IP Precedence 2. Background (Very Low Priority) - ether1" packet-mark=ip_precedence_2 parent=QoS_ether1 priority=7 queue=wireless-default
add comment="Queue Priority 8" name="IP Precedence 1. Scavenger (Bottom Priority) - ether1" packet-mark=ip_precedence_1 parent=QoS_ether1 queue=wireless-default
add comment="Downlink QoS" max-limit=990M name=QoS_bridge parent=bridge queue=wireless-default
add comment="Queue Priority 1" name="IP Precedence 7. Network Control (Top Priority) - bridge" packet-mark=ip_precedence_7 parent=QoS_bridge priority=1 queue=wireless-default
add comment="Queue Priority 2" name="IP Precedence 6. Internetwork Control (High Priority) - bridge" packet-mark=ip_precedence_6 parent=QoS_bridge priority=2 queue=wireless-default
add comment="Queue Priority 3" name="IP Precedence 5. Voice (Medium-High Priority) - bridge" packet-mark=ip_precedence_5 parent=QoS_bridge priority=3 queue=wireless-default
add comment="Queue Priority 4" name="IP Precedence 4. Interactive Video (Medium Priority) - bridge" packet-mark=ip_precedence_4 parent=QoS_bridge priority=4 queue=wireless-default
add comment="Queue Priority 5" name="IP Precedence 3. Critical Data or Call Signaling (Medium-Low Priority) - bridge" packet-mark=ip_precedence_3 parent=QoS_bridge priority=5 queue=wireless-default
add comment="Queue Priority 6" name="IP Precedence 0. Best Effort (Low Priority) - bridge" packet-mark=no-mark parent=QoS_bridge priority=6 queue=wireless-default
add comment="Queue Priority 7" name="IP Precedence 2. Background (Very Low Priority) - bridge" packet-mark=ip_precedence_2 parent=QoS_bridge priority=7 queue=wireless-default
add comment="Queue Priority 8" name="IP Precedence 1. Scavenger (Bottom Priority) - bridge" packet-mark=ip_precedence_1 parent=QoS_bridge queue=wireless-default
/routing bgp template
set default disabled=no output.network=bgp-networks
/routing ospf instance
add disabled=no name=default-v2
/routing ospf area
add disabled=yes instance=default-v2 name=backbone-v2
/caps-man access-list
add action=accept allow-signal-out-of-range=3s comment="5ghz: nice strong signal" disabled=no interface=5ghz signal-range=-76..120 ssid-regexp="" time=0s-1d,sun,mon,tue,wed,thu,fri,sat
add action=accept allow-signal-out-of-range=10s comment="2.4ghz: client specifically wants 2.4ghz" disabled=no signal-range=-76..120 ssid-regexp=al-2.4 time=0s-1d,sun,mon,tue,wed,thu,fri,sat
add action=accept allow-signal-out-of-range=3s comment="2.4ghz: client is probably too far for 5ghz" disabled=no interface=2.4ghz signal-range=-76..-56 ssid-regexp="" time=0s-1d,sun,mon,tue,wed,thu,fri,sat
add action=accept allow-signal-out-of-range=3s comment="2.4ghz: client should know better" disabled=no interface=2.4ghz signal-range=-76..120 ssid-regexp="" time=0s-1d,sun,mon,tue,wed,thu,fri,sat
add action=reject allow-signal-out-of-range=10s disabled=no signal-range=-120..120 ssid-regexp="" time=0s-1d,sun,mon,tue,wed,thu,fri,sat
/caps-man manager
set ca-certificate=CAPsMAN-CA-488F5A4F18FA certificate=CAPsMAN-488F5A4F18FA enabled=yes require-peer-certificate=yes upgrade-policy=require-same-version
/caps-man manager interface
add disabled=no interface=bridge
/caps-man provisioning
add action=create-enabled hw-supported-modes=g master-configuration=2.4ghz name-format=prefix-identity name-prefix=2.4 slave-configurations="2.4ghz: slave"
add action=create-enabled hw-supported-modes=ac master-configuration=5ghz name-format=prefix-identity name-prefix=5
/interface bridge port
add bridge=bridge comment=defconf ingress-filtering=no interface=ether2 internal-path-cost=10 path-cost=10
add bridge=bridge comment=defconf ingress-filtering=no interface=ether3 internal-path-cost=10 path-cost=10
add bridge=bridge comment=defconf ingress-filtering=no interface=ether4 internal-path-cost=10 path-cost=10
add bridge=bridge comment=defconf ingress-filtering=no interface=ether5 internal-path-cost=10 path-cost=10
/ip firewall connection tracking
set udp-timeout=10s
/ip neighbor discovery-settings
set discover-interface-list=none
/ip settings
set max-neighbor-entries=8192
/ipv6 settings
set disable-ipv6=yes max-neighbor-entries=8192
/interface l2tp-server server
set authentication=mschap1,mschap2 default-profile=default use-ipsec=required
/interface list member
add comment=defconf interface=bridge list=LAN
add comment=defconf interface=ether1 list=WAN
add interface=2.4-cap-1 list=2.4ghz
add interface=5-cap-1 list=5ghz
add interface=2.4-router-1 list=2.4ghz
add interface=5-router-1 list=5ghz
/interface ovpn-server server
set auth=sha1 certificate=server cipher=blowfish128,aes128-cbc,aes192-cbc,aes256-cbc default-profile=ovpn enabled=yes port=443
/interface wireless cap
#
set bridge=bridge caps-man-addresses=127.0.0.1 certificate=CAPsMAN-488F5A4F18FA discovery-interfaces=bridge enabled=yes interfaces=wlan2,wlan1 lock-to-caps-man=yes
/ip address
add address=10.0.5.1/24 comment=defconf interface=ether2 network=10.0.5.0
/ip dhcp-client
add comment=defconf interface=ether1
/ip dhcp-server network
add address=10.0.5.0/24 comment=defconf domain=lan gateway=10.0.5.1 netmask=24
/ip dns
set allow-remote-requests=yes
/ip dns static
add address=10.0.5.1 comment=defconf name=router.lan
add address=10.0.5.4 name=printer.lan
add address=10.0.5.3 name=sip.lan
add address=10.0.5.5 name=nas.lan
add address=10.0.5.46 comment=defconf-08:55:31:45:83:D6 name=cap.lan ttl=10m
/ip firewall address-list
add address=10.0.5.4 list=lan-only
/ip firewall filter
add action=accept chain=input comment="Allow OpenVPN" dst-port=443 protocol=tcp
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" disabled=yes protocol=icmp
add action=accept chain=input comment="defconf: accept to local loopback (for CAPsMAN)" dst-address=127.0.0.1
add action=drop chain=input comment="defconf: drop all not coming from LAN" in-interface-list=!LAN
add action=drop chain=forward comment="block untrusted local clients from accessing WAN" out-interface-list=WAN src-address-list=lan-only
add action=drop chain=forward comment="block the printer by MAC too, just in case" out-interface-list=WAN src-mac-address=30:CD:A7:1E:63:02
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="bypass fasttrack for non-zero DSCP" connection-state=established,related dscp=!0
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 mangle
add action=set-priority chain=postrouting comment="respect DSCP tagging" new-priority=from-dscp-high-3-bits passthrough=yes
add action=set-priority chain=postrouting comment="prioritize ACKs" new-priority=6 packet-size=0-123 passthrough=yes protocol=tcp tcp-flags=ack
add action=accept chain=postrouting comment="precedence 0 - best effort (low priority) (default)" priority=0
add action=mark-packet chain=postrouting comment="IP Precedence (aka Packet Priority) 6 - Internetwork Control (High Priority) (apply packet mark ip_precedence_6)" new-packet-mark=ip_precedence_6 passthrough=no priority=6
add action=mark-packet chain=postrouting comment="IP Precedence (aka Packet Priority) 1 - Scavenger (Bottom Priority) (apply packet mark ip_precedence_1)" new-packet-mark=ip_precedence_1 passthrough=no priority=1
add action=mark-packet chain=postrouting comment="IP Precedence (aka Packet Priority) 2 - Background (Very Low Priority) (apply packet mark ip_precedence_2)" new-packet-mark=ip_precedence_2 passthrough=no priority=2
add action=mark-packet chain=postrouting comment="IP Precedence (aka Packet Priority) 3 - Critical Data or Call Signaling (Medium-Low Priority) (apply packet mark ip_precedence_3)" new-packet-mark=ip_precedence_3 passthrough=no priority=3
add action=mark-packet chain=postrouting comment="IP Precedence (aka Packet Priority) 4 - Interactive Video (Medium Priority) (apply packet mark ip_precedence_4)" new-packet-mark=ip_precedence_4 passthrough=no priority=4
add action=mark-packet chain=postrouting comment="IP Precedence (aka Packet Priority) 5 - Voice (Medium-High Priority) (apply packet mark ip_precedence_5)" new-packet-mark=ip_precedence_5 passthrough=no priority=5
add action=mark-packet chain=postrouting comment="IP Precedence (aka Packet Priority) 7 - Network Control (Top Priority) (apply packet mark ip_precedence_7)" new-packet-mark=ip_precedence_7 passthrough=no priority=7
/ip firewall nat
add action=masquerade chain=srcnat comment="defconf: masquerade" ipsec-policy=out,none out-interface-list=WAN
/ip firewall service-port
set sip ports=5060,5061,5065
/ip ipsec identity
add generate-policy=port-override peer=l2tpserver
/ip ipsec policy
set 0 dst-address=0.0.0.0/0 src-address=0.0.0.0/0
/ip service
set telnet disabled=yes
set ftp disabled=yes
set www disabled=yes
set www-ssl certificate=webfig disabled=no port=444
set api disabled=yes
set api-ssl disabled=yes
/ip smb shares
set [ find default=yes ] directory=/flash/pub
/ip ssh
set strong-crypto=yes
/ip traffic-flow
set enabled=yes
/ip traffic-flow target
add dst-address=0.0.0.0 port=1234 version=5
/ip upnp
set enabled=yes
/ip upnp interfaces
add interface=bridge type=internal
add interface=ether1 type=external
/ppp secret
add name=admin profile=ovpn
add name=admin profile=*2 remote-address=10.0.9.1 service=l2tp
/routing bfd configuration
add disabled=no
/system clock
set time-zone-name=Asia/Jerusalem
/system identity
set name=router
/system note
set show-at-login=no
/system ntp client
set enabled=yes
/system ntp client servers
add address=pool.ntp.org
/system script
add comment="reflect dhcp leases in dns" dont-require-permissions=no name=dhcp2dns owner=admin policy=ftp,reboot,read,write,policy,test,password,sniff,sensitive,romon source="###\
\n# Script entry point\
\n#\
\n# Expected environment variables:\
\n# leaseBound 1 = lease bound, 0 = lease removed\
\n# leaseServerName Name of DHCP server\
\n# leaseActIP IP address of DHCP client\
\n# leaseActMAC MAC address of DHCP client\
\n###\
\n\
\n:local LogPrefix \"DHCP2DNS (\$leaseServerName)\"\
\n\
\n# \"a.b.c.d\" -> \"a-b-c-d\" for IP addresses used as replacement for missing host names\
\n:local ip2Host do={\
\n :local outStr\
\n :for i from=0 to=([:len \$inStr] - 1) do={\
\n :local tmp [:pick \$inStr \$i];\
\n :if (\$tmp =\".\") do={\
\n :set tmp \"-\"\
\n }\
\n :set outStr (\$outStr . \$tmp)\
\n }\
\n :return \$outStr\
\n}\
\n\
\n:local mapHostName do={\
\n# param: name\
\n# max length = 63\
\n# allowed chars a-z,0-9,-\
\n :local allowedChars \"abcdefghijklmnopqrstuvwxyz0123456789-\";\
\n :local numChars [:len \$name];\
\n :if (\$numChars > 63) do={:set numChars 63};\
\n :local result \"\";\
\n\
\n :for i from=0 to=(\$numChars - 1) do={\
\n :local char [:pick \$name \$i];\
\n :if ([:find \$allowedChars \$char] < 0) do={:set char \"-\"};\
\n :set result (\$result . \$char);\
\n }\
\n :return \$result;\
\n}\
\n\
\n:local lowerCase do={\
\n# param: entry\
\n :local lower \"abcdefghijklmnopqrstuvwxyz\";\
\n :local upper \"ABCDEFGHIJKLMNOPQRSTUVWXYZ\";\
\n :local result \"\";\
\n :for i from=0 to=([:len \$entry] - 1) do={\
\n :local char [:pick \$entry \$i];\
\n :local pos [:find \$upper \$char];\
\n :if (\$pos > -1) do={:set char [:pick \$lower \$pos]};\
\n :set result (\$result . \$char);\
\n }\
\n :return \$result;\
\n}\
\n\
\n:local token \"\$leaseServerName-\$leaseActMAC\";\
\n\
\n:if ( [ :len \$leaseActIP ] <= 0 ) do={\
\n :log error \"\$LogPrefix: empty lease address\"\
\n :error \"empty lease address\"\
\n}\
\n\
\n:if ( \$leaseBound = 1 ) do={\
\n\
\n# new DHCP lease added\
\n# :log info \"\$LogPrefix: new lease for \$token\"\
\n /ip dhcp-server\
\n :local dnsttl [ get [ find name=\$leaseServerName ] lease-time ]\
\n network\
\n :local domain [ get [ find \$leaseActIP in address ] domain ]\
\n :if ( [ :len \$domain ] <= 0 ) do={ :set domain \"lan\" }\
\n# :log info \"\$LogPrefix: DNS domain is \$domain\"\
\n\
\n :local hostname \"\"\
\n :do {\
\n :set hostname [/ip dhcp-server lease get value-name=host-name [find mac-address=\$leaseActMAC and server=\$leaseServerName]]\
\n } on-error={ :log warning \"\$LogPrefix: failed to retrieve hostname for \$token\" }\
\n# :log info \"\$LogPrefix: DHCP hostname is \$hostname\"\
\n\
\n#Hostname cleanup\
\n :if ( [ :len \$hostname ] <= 0 ) do={\
\n :set hostname [ \$ip2Host inStr=\$leaseActIP ]\
\n :log info \"\$LogPrefix: Empty hostname for '\$leaseActIP', using generated host name '\$hostname'\"\
\n }\
\n :set hostname [\$lowerCase entry=\$hostname]\
\n :set hostname [\$mapHostName name=\$hostname]\
\n# :log info \"\$LogPrefix: Clean hostname for FQDN is \$hostname\";\
\n\
\n :if ( [ :len \$domain ] <= 0 ) do={\
\n :log warning \"\$LogPrefix: Empty domainname for '\$leaseActIP', cannot create static DNS name\"\
\n :error \"Empty domainname for '\$leaseActIP'\"\
\n }\
\n\
\n :local fqdn (\$hostname . \".\" . \$domain)\
\n# :log info \"\$LogPrefix: FQDN for DNS is \$fqdn\"\
\n\
\n :if ([/ip dhcp-server lease get [find mac-address=\$leaseActMAC and server=\$leaseServerName]]) do={\
\n :log info message=\"\$LogPrefix: \$leaseActMAC -> \$hostname\"\
\n :do {\
\n :local old [/ip dns static find name=\$fqdn comment~\"^\$leaseServerName-\"]\
\n :if ( \$old != \"\" ) do {\
\n :log info \"\$logPrefix: removing existing record \$old\"\
\n /ip dns static remove \$old\
\n :log info \"\$logPrefix: done\"\
\n }\
\n /ip dns static add address=\$leaseActIP name=\$fqdn ttl=\$dnsttl comment=\$token;\
\n } on-error={:log error message=\"\$LogPrefix: Failure during dns registration of \$fqdn with \$leaseActIP\"}\
\n }\
\n\
\n} else={\
\n\
\n# DHCP lease removed\
\n :local record [/ip dns static find comment=\$token]\
\n :if ( \$record != \"\" ) do={\
\n :log info \"\$logPrefix: removing \$record\"\
\n /ip dns static remove \$record\
\n :log info \"\$logPrefix: done\"\
\n }\
\n}\
\n"
/tool bandwidth-server
set enabled=no
/tool graphing interface
add interface=ether1
add allow-address=10.0.5.110/32 interface=bridge
/tool graphing queue
add
/tool graphing resource
add
/tool mac-server
set allowed-interface-list=none
/tool mac-server mac-winbox
set allowed-interface-list=none
/tool mac-server ping
set enabled=no