Hi,
I have recently purchased a hEX S router for use at home and after spending a few days reading through the doco and forum posts I think I have my config working.
But I am not 100% sure I have everything right and would be grateful if someone with experience would check over what I have done before I connect it to the internet (My main concern is I haven’t secured it enough).
I started by updating the router (to RouterOS v6.46.5 stable) and then reseting it to the default. After which I apply my config below.
Thanks David.
Network Diagram:

Config:
#Setup VLANs
/interface vlan
add interface=bridge name=main-vlan vlan-id=100
add interface=bridge name=iot-vlan vlan-id=101
add interface=bridge name=guest-vlan vlan-id=102
/interface list
add name=VLAN
/interface list member
# add to the exiting list so we maintain access to router
add interface=main-vlan list=LAN
add interface=iot-vlan list=LAN
add interface=guest-vlan list=LAN
# this is our new list
add interface=main-vlan list=VLAN
add interface=iot-vlan list=VLAN
add interface=guest-vlan list=VLAN
# IP Setup
/ip pool
add name=main-pool ranges=192.168.100.10-192.168.100.254
add name=iot-pool ranges=192.168.101.10-192.168.101.254
add name=guest-pool ranges=192.168.102.10-192.168.102.254
/ip address
add address=192.168.100.1/24 interface=main-vlan
add address=192.168.101.1/24 interface=iot-vlan
add address=192.168.102.1/24 interface=guest-vlan
/ip dhcp-server network
#set comment=main-dhcp-network [find comment=defconf]
add address=192.168.100.0/24 gateway=192.168.100.1 comment="main-dhcp-network"
add address=192.168.101.0/24 gateway=192.168.101.1 comment="iot-dhcp-network"
add address=192.168.102.0/24 gateway=192.168.102.1 comment="guest-dhcp-network"
/ip dhcp-server
add address-pool=main-pool interface=main-vlan disabled=no name=main-dhcp
add address-pool=iot-pool interface=iot-vlan disabled=no name=iot-dhcp
add address-pool=guest-pool interface=guest-vlan disabled=no name=guest-dhcp
# Ingress Behavior
/interface bridge port
set pvid=100 frame-types=admit-only-untagged-and-priority-tagged [find bridge=bridge]
set pvid=101 [find interface=ether4]
set frame-types=admit-all [find interface=ether5]
# Egress Behaviour
/interface bridge vlan
add bridge=bridge tagged=bridge untagged=ether2,ether3,ether5,sfp1 vlan-ids=100 comment="main-vlan"
add bridge=bridge untagged=ether4 tagged=bridge,ether5 vlan-ids=101 comment="iot-vlan"
add bridge=bridge tagged=bridge,ether5 vlan-ids=102 comment="guest-vlan"
# enable vlan filtering
/interface bridge
set vlan-filtering=yes [find name="bridge"]
/
#remove default ip addressing
/ip dhcp-server
remove [find name=defconf]
/ip dhcp-server network
remove [find gateway=192.168.88.1]
/ip pool
remove [find name=default-dhcp]
/ip address
remove [find interface=bridge]
/
# Clear and re-set the firewall for ease of ordering
/ip firewall filter
remove [find action!="passthrough"]
/ip firewall filter
#Input Chain
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 chain=input action=accept in-interface-list=VLAN comment="Allow VLAN access to router services"
add chain=input action=accept in-interface=main-vlan comment="Allow main-vlan access to router services"
add chain=input action=drop comment="Drop all other traffic"
#Forward Chain
add chain=forward action=accept comment="defconf: accept in ipsec policy" ipsec-policy=in,ipsec
add chain=forward action=accept comment="defconf: accept out ipsec policy" ipsec-policy=out,ipsec
add action=fasttrack-connection chain=forward comment="defconf: fasttrack" connection-state=established,related
add action=accept chain=forward comment="defconf: accept established,related, untracked" connection-state=established,related,untracked
add action=accept chain=forward connection-state=new in-interface-list=VLAN out-interface-list=WAN comment="VLAN Internet Access Only"
add action=drop chain=forward comment="Drop all other traffic"
#redundant rules from defaults?
#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
/
# Security
# Setup a new administrative account
/user add name=YOUR_UNIQUE_NAME password=YOUR_STRONG_PASSWORD group=full
/user remove admin
# Disable all the configuration methods except ssh and winbox
/ip service enable ssh
/ip service disable telnet,ftp,www,www-ssl,api,api-ssl
# Ensure only winbox MAC Address based access from main-vlan
/ip neighbor discovery-settings set discover-interface-list=main-vlan
/tool mac-server mac-winbox set allowed-interface-list=main-vlan
/tool mac-server set allowed-interface-list=main-vlan
#disable unused wireless related packages
/system package
disable hotspot
disable wireless
## allow viewing resource and usage graphs on main-vlan for each main interface
/tool graphing resource
add allow-address=192.168.100.0/24
/tool graphing interface
add allow-address=192.168.100.0/24 interface=ether1
add allow-address=192.168.100.0/24 interface=main-vlan
add allow-address=192.168.100.0/24 interface=iot-vlan
add allow-address=192.168.100.0/24 interface=guest-vlan
#all done reboot to confirm
/system reboot