Free RouterOS configuration generator (browser-based, no account)

Hi there,

Thanks very much for this tool! This is amazing so far, I was just wondering if you have plans to add WiFi 7 specific configuration for the be lite and be3 Media? For example, things like using mld, using 5ghz-be, 6ghz-be (where applicable)? It would be a great addition!

I’ve just tried the multi-device configuration.
1x RB5009, 1x CAP AX, 1x SSID Home, 1x SSID Guest (VLAN100)
Now I don’t understand the VLAN configuration that’s generated. Surely the port to which the AP is connected on the RB5009 is also relevant, given the distinction between trunk and access ports? Can this be configured somewhere? And what happens if there’s another device connected to ETH2 on the cap AX (a CAM, for example) – does that change the configuration in any way?

Thanks, that unlocks my country too.

This will probably add more complexity to your code base, but because your generator allows selecting devices with precise model, it would be great if the generated VLAN configuration for devices such as the RB3011 or hAP ac²/ac³ uses the proper way (/interface ethernet switch) that still allows hardware offload, instead of bridge VLAN filtering. See:

Basic VLAN switching | RouterOS Manual
Switch Chip Features | RouterOS Manual

I did another multi-device with RB5009 as router and RB760iGS as switch.

Added vlans before adding any devices.

Then added RB5009 and pressed configure, so I could configure the VLANS and set up second Trunk.

One thing that isn't obvious to me is how does the tool realize what is connected to the other end of a trunk link? Then it could verify that both ends of the trunk link are configured consistently (especially important when hybrid links are involved).

The thing that I don't understand is why are multiple vlan interfaces created on the router configured as as switch. Here is the RB760iGS portion I don't understand. I wanted vlan 110 to be the management vlan, and that's the only /interface/vlan I expected to see, but here is what is on the RB760iGS

/interface vlan
add name=vlan110-trusted vlan-id=110 interface=bridge comment="management"
add name=vlan120-home vlan-id=120 interface=bridge
add name=vlan130-guest vlan-id=130 interface=bridge
add name=vlan140-iot vlan-id=140 interface=bridge
add name=vlan150-work vlan-id=150 interface=bridge

What is the purpose of vlan interfaces for 120,130,140 and 150?

Here's the generated .rsc

Generated config for RB5009 router + RB760iGS switch
# Test lab for MikroTik
# 2 devices. Each block below belongs on a DIFFERENT device.
# Do not paste this whole file into one router.

# ======================================================================
# gw-01  (RB5009UG+S+IN)
# ======================================================================
# MikroTik RouterOS v7 configuration
# Device:  RB5009UG+S+IN (RB5009UG+S+IN)
# Role:    home
# Created: 2026-08-25 06:05 UTC with the eXtreme Hosting MikroTik Configurator
#          https://extremehosting.nl/configurator/en/mikrotik/
# Syntax:  https://manual.mikrotik.com/docs/introduction
#
# Apply on a device WITHOUT configuration (/system reset-configuration no-defaults=yes skip-backup=yes),
# with Safe Mode active (Ctrl+X in the terminal). Review every line before pasting.

/interface bridge
add name=bridge protocol-mode=rstp comment="genconf"

/interface vlan
add name=vlan110-trusted vlan-id=110 interface=bridge comment="management"
add name=vlan120-home vlan-id=120 interface=bridge
add name=vlan130-guest vlan-id=130 interface=bridge
add name=vlan140-iot vlan-id=140 interface=bridge
add name=vlan150-work vlan-id=150 interface=bridge

/interface list
add name=WAN comment="genconf"
add name=LAN comment="genconf"

/interface list member
add list=WAN interface=ether1 comment="genconf"
add list=LAN interface=bridge comment="genconf"
add list=LAN interface=vlan110-trusted comment="genconf"
add list=LAN interface=vlan120-home comment="genconf"
add list=LAN interface=vlan130-guest comment="genconf"
add list=LAN interface=vlan140-iot comment="genconf"
add list=LAN interface=vlan150-work comment="genconf"

/interface bridge port
add bridge=bridge interface=ether2 comment="genconf" frame-types=admit-only-vlan-tagged ingress-filtering=yes
add bridge=bridge interface=ether3 comment="genconf" pvid=120 frame-types=admit-only-untagged-and-priority-tagged ingress-filtering=yes
add bridge=bridge interface=ether4 comment="genconf" pvid=120 frame-types=admit-only-untagged-and-priority-tagged ingress-filtering=yes
add bridge=bridge interface=ether5 comment="genconf" pvid=140 frame-types=admit-only-untagged-and-priority-tagged ingress-filtering=yes
add bridge=bridge interface=ether6 comment="genconf" pvid=130 frame-types=admit-only-untagged-and-priority-tagged ingress-filtering=yes
add bridge=bridge interface=ether7 comment="genconf" pvid=150 frame-types=admit-only-untagged-and-priority-tagged ingress-filtering=yes
add bridge=bridge interface=ether8 comment="genconf" pvid=110 frame-types=admit-only-untagged-and-priority-tagged ingress-filtering=yes
add bridge=bridge interface=sfp-sfpplus1 comment="genconf" frame-types=admit-only-vlan-tagged ingress-filtering=yes

/interface bridge vlan
add bridge=bridge vlan-ids=110 tagged=bridge,ether2,sfp-sfpplus1 untagged=ether8 comment="vlan110-trusted"
add bridge=bridge vlan-ids=120 tagged=bridge,ether2,sfp-sfpplus1 untagged=ether3,ether4 comment="vlan120-home"
add bridge=bridge vlan-ids=130 tagged=bridge,ether2,sfp-sfpplus1 untagged=ether6 comment="vlan130-guest"
add bridge=bridge vlan-ids=140 tagged=bridge,ether2,sfp-sfpplus1 untagged=ether5 comment="vlan140-iot"
add bridge=bridge vlan-ids=150 tagged=bridge,ether2,sfp-sfpplus1 untagged=ether7 comment="vlan150-work"

/interface bridge
set bridge vlan-filtering=yes

/ip pool
add name=pool-vlan110-trusted ranges=192.168.110.10-192.168.110.254
add name=pool-vlan120-home ranges=192.168.120.10-192.168.120.254
add name=pool-vlan130-guest ranges=192.168.130.10-192.168.130.254
add name=pool-vlan140-iot ranges=192.168.140.10-192.168.140.254
add name=pool-vlan150-work ranges=192.168.150.10-192.168.150.254
add name=dhcp ranges=192.168.200.10-192.168.200.254

/ip dhcp-server
add name=dhcp-vlan110-trusted interface=vlan110-trusted address-pool=pool-vlan110-trusted lease-time=1d
add name=dhcp-vlan120-home interface=vlan120-home address-pool=pool-vlan120-home lease-time=1d
add name=dhcp-vlan130-guest interface=vlan130-guest address-pool=pool-vlan130-guest lease-time=1d
add name=dhcp-vlan140-iot interface=vlan140-iot address-pool=pool-vlan140-iot lease-time=1d
add name=dhcp-vlan150-work interface=vlan150-work address-pool=pool-vlan150-work lease-time=1d

/ip dhcp-server network
add address=192.168.110.0/24 gateway=192.168.110.1 dns-server=192.168.110.1 comment="vlan110-trusted"
add address=192.168.120.0/24 gateway=192.168.120.1 dns-server=192.168.120.1 comment="vlan120-home"
add address=192.168.130.0/24 gateway=192.168.130.1 dns-server=192.168.130.1 comment="vlan130-guest"
add address=192.168.140.0/24 gateway=192.168.140.1 dns-server=192.168.140.1 comment="vlan140-iot"
add address=192.168.150.0/24 gateway=192.168.150.1 dns-server=192.168.150.1 comment="vlan150-work"

/ip dhcp-client
add interface=ether1 add-default-route=yes default-route-distance=1 use-peer-dns=yes use-peer-ntp=no comment="WAN1"

/ip dhcp-server
add name=genconf interface=bridge address-pool=dhcp lease-time=1d

/ip dhcp-server network
add address=192.168.200.0/24 gateway=192.168.200.1 dns-server=192.168.200.1 comment="genconf"

/ip address
add address=192.168.110.1/24 interface=vlan110-trusted comment="vlan110-trusted"
add address=192.168.120.1/24 interface=vlan120-home comment="vlan120-home"
add address=192.168.130.1/24 interface=vlan130-guest comment="vlan130-guest"
add address=192.168.140.1/24 interface=vlan140-iot comment="vlan140-iot"
add address=192.168.150.1/24 interface=vlan150-work comment="vlan150-work"
add address=192.168.200.1/24 interface=bridge comment="genconf"

/ipv6 settings
set disable-ipv6=no accept-router-advertisements=no

/ipv6 dhcp-client
add interface=ether1 request=prefix pool-name=ipv6-pool pool-prefix-length=64 prefix-hint=::/56 add-default-route=yes use-peer-dns=no comment="IPv6 prefix delegation"

/ipv6 address
add address=::1/64 from-pool=ipv6-pool interface=bridge advertise=yes comment="bridge"
add address=::1/64 from-pool=ipv6-pool interface=vlan110-trusted advertise=yes comment="vlan110-trusted"
add address=::1/64 from-pool=ipv6-pool interface=vlan120-home advertise=yes comment="vlan120-home"
add address=::1/64 from-pool=ipv6-pool interface=vlan130-guest advertise=yes comment="vlan130-guest"
add address=::1/64 from-pool=ipv6-pool interface=vlan140-iot advertise=yes comment="vlan140-iot"
add address=::1/64 from-pool=ipv6-pool interface=vlan150-work advertise=yes comment="vlan150-work"

/ipv6 nd
set [ find default=yes ] interface=all advertise-dns=self managed-address-configuration=no other-configuration=no

/ip dns
set allow-remote-requests=yes cache-size=4096 servers=9.9.9.9,149.112.112.112

/ip firewall address-list
add list=bad_ipv4 address=127.0.0.0/8 comment="genconf: RFC6890"
add list=bad_ipv4 address=192.0.0.0/24 comment="genconf: RFC6890"
add list=bad_ipv4 address=192.0.2.0/24 comment="genconf: RFC6890 documentation"
add list=bad_ipv4 address=198.51.100.0/24 comment="genconf: RFC6890 documentation"
add list=bad_ipv4 address=203.0.113.0/24 comment="genconf: RFC6890 documentation"
add list=bad_ipv4 address=240.0.0.0/4 comment="genconf: RFC6890 reserved"
add list=not_global_ipv4 address=0.0.0.0/8 comment="genconf: RFC6890"
add list=not_global_ipv4 address=10.0.0.0/8 comment="genconf: RFC6890"
add list=not_global_ipv4 address=100.64.0.0/10 comment="genconf: RFC6890"
add list=not_global_ipv4 address=169.254.0.0/16 comment="genconf: RFC6890"
add list=not_global_ipv4 address=172.16.0.0/12 comment="genconf: RFC6890"
add list=not_global_ipv4 address=192.0.0.0/29 comment="genconf: RFC6890"
add list=not_global_ipv4 address=192.168.0.0/16 comment="genconf: RFC6890"
add list=not_global_ipv4 address=198.18.0.0/15 comment="genconf: RFC6890 benchmark"
add list=not_global_ipv4 address=255.255.255.255/32 comment="genconf: RFC6890"
add list=bad_src_ipv4 address=224.0.0.0/4 comment="genconf: multicast"
add list=bad_src_ipv4 address=255.255.255.255/32 comment="genconf: RFC6890"
add list=bad_dst_ipv4 address=0.0.0.0/8 comment="genconf: RFC6890"
add list=bad_dst_ipv4 address=224.0.0.0/4 comment="genconf: RFC6890"

/ip firewall raw
add action=accept chain=prerouting comment="genconf: accept DHCP discover" dst-address=255.255.255.255 dst-port=67 in-interface-list=LAN protocol=udp src-address=0.0.0.0 src-port=68
add action=drop chain=prerouting comment="genconf: drop bogon IP's" src-address-list=bad_ipv4
add action=drop chain=prerouting comment="genconf: drop bogon IP's" dst-address-list=bad_ipv4 in-interface-list=WAN
add action=drop chain=prerouting comment="genconf: drop bogon IP's" src-address-list=bad_src_ipv4
add action=drop chain=prerouting comment="genconf: drop bogon IP's" dst-address-list=bad_dst_ipv4 in-interface-list=WAN
add action=drop chain=prerouting comment="genconf: drop non global from WAN" src-address-list=not_global_ipv4 in-interface-list=WAN
add action=drop chain=prerouting comment="genconf: drop bad UDP" port=0 protocol=udp

/ip firewall filter
add chain=input action=accept connection-state=established,related,untracked comment="genconf: accept established,related,untracked"
add chain=input action=drop connection-state=invalid comment="genconf: drop invalid"
add chain=input action=accept protocol=icmp comment="genconf: accept ICMP"
add chain=input action=accept dst-address=127.0.0.1 comment="genconf: accept to local loopback (for CAPsMAN)"
add chain=input action=drop protocol=udp dst-port=53 in-interface-list=WAN comment="drop DNS from WAN (no open resolver)"
add chain=input action=drop protocol=tcp dst-port=53 in-interface-list=WAN comment="drop DNS from WAN (no open resolver)"
add chain=input action=drop in-interface-list=!LAN comment="genconf: drop all not coming from LAN"
add chain=forward action=accept ipsec-policy=in,ipsec comment="genconf: accept in ipsec policy"
add chain=forward action=accept ipsec-policy=out,ipsec comment="genconf: accept out ipsec policy"
add chain=forward action=fasttrack-connection connection-state=established,related hw-offload=yes comment="genconf: fasttrack"
add chain=forward action=accept connection-state=established,related,untracked comment="genconf: accept established,related, untracked"
add chain=forward action=drop connection-state=invalid comment="genconf: drop invalid"
add chain=forward action=drop in-interface=vlan110-trusted out-interface-list=!WAN connection-state=new comment="isolate vlan110-trusted: internet only"
add chain=forward action=drop in-interface=vlan120-home out-interface-list=!WAN connection-state=new comment="isolate vlan120-home: internet only"
add chain=forward action=drop in-interface=vlan130-guest out-interface-list=!WAN connection-state=new comment="isolate vlan130-guest: internet only"
add chain=forward action=drop in-interface=vlan140-iot out-interface-list=!WAN connection-state=new comment="isolate vlan140-iot: internet only"
add chain=forward action=drop in-interface=vlan150-work out-interface-list=!WAN connection-state=new comment="isolate vlan150-work: internet only"
add chain=forward action=drop connection-state=new connection-nat-state=!dstnat in-interface-list=WAN comment="genconf: drop all from WAN not DSTNATed"

/ip firewall nat
add chain=srcnat action=masquerade out-interface-list=WAN ipsec-policy=out,none comment="genconf: masquerade"

/ipv6 firewall address-list
add list=bad_ipv6 address=::/128 comment="genconf: unspecified address"
add list=bad_ipv6 address=::1/128 comment="genconf: lo"
add list=bad_ipv6 address=fec0::/10 comment="genconf: site-local"
add list=bad_ipv6 address=::ffff:0.0.0.0/96 comment="genconf: ipv4-mapped"
add list=bad_ipv6 address=::/96 comment="genconf: ipv4 compat"
add list=bad_ipv6 address=100::/64 comment="genconf: discard only"
add list=bad_ipv6 address=2001:db8::/32 comment="genconf: documentation"
add list=bad_ipv6 address=2001:10::/28 comment="genconf: ORCHID"
add list=bad_ipv6 address=3ffe::/16 comment="genconf: 6bone"

/ipv6 firewall filter
add chain=input action=accept connection-state=established,related,untracked comment="genconf: accept established,related,untracked"
add chain=input action=drop connection-state=invalid comment="genconf: drop invalid"
add chain=input action=accept protocol=icmpv6 comment="genconf: accept ICMPv6"
add chain=input action=accept protocol=udp port=33434-33534 comment="genconf: accept UDP traceroute"
add chain=input action=accept protocol=udp dst-port=546 src-address=fe80::/10 comment="genconf: accept DHCPv6-Client prefix delegation."
add chain=input action=accept protocol=udp dst-port=500,4500 comment="genconf: accept IKE"
add chain=input action=accept protocol=ipsec-ah comment="genconf: accept ipsec AH"
add chain=input action=accept protocol=ipsec-esp comment="genconf: accept ipsec ESP"
add chain=input action=accept ipsec-policy=in,ipsec comment="genconf: accept all that matches ipsec policy"
add chain=input action=drop in-interface-list=!LAN comment="genconf: drop everything else not coming from LAN"
add chain=forward action=accept connection-state=established,related,untracked comment="genconf: accept established,related,untracked"
add chain=forward action=drop connection-state=invalid comment="genconf: drop invalid"
add chain=forward action=drop src-address-list=bad_ipv6 comment="genconf: drop packets with bad src ipv6"
add chain=forward action=drop dst-address-list=bad_ipv6 comment="genconf: drop packets with bad dst ipv6"
add chain=forward action=drop protocol=icmpv6 hop-limit=equal:1 comment="genconf: rfc4890 drop hop-limit=1"
add chain=forward action=accept protocol=icmpv6 comment="genconf: accept ICMPv6"
add chain=forward action=accept protocol=139 comment="genconf: accept HIP"
add chain=forward action=accept protocol=udp dst-port=500,4500 comment="genconf: accept IKE"
add chain=forward action=accept protocol=ipsec-ah comment="genconf: accept ipsec AH"
add chain=forward action=accept protocol=ipsec-esp comment="genconf: accept ipsec ESP"
add chain=forward action=accept ipsec-policy=in,ipsec comment="genconf: accept all that matches ipsec policy"
add chain=forward action=drop in-interface=vlan110-trusted out-interface-list=!WAN comment="isolate vlan110-trusted (IPv6)"
add chain=forward action=drop in-interface=vlan120-home out-interface-list=!WAN comment="isolate vlan120-home (IPv6)"
add chain=forward action=drop in-interface=vlan130-guest out-interface-list=!WAN comment="isolate vlan130-guest (IPv6)"
add chain=forward action=drop in-interface=vlan140-iot out-interface-list=!WAN comment="isolate vlan140-iot (IPv6)"
add chain=forward action=drop in-interface=vlan150-work out-interface-list=!WAN comment="isolate vlan150-work (IPv6)"
add chain=forward action=drop in-interface-list=!LAN comment="genconf: drop everything else not coming from LAN"

/system clock
set time-zone-name=America/New_York time-zone-autodetect=no

/system ntp client
set enabled=yes mode=unicast servers=nl.pool.ntp.org,time.cloudflare.com

/system package update
set channel=stable

/system routerboard settings
set auto-upgrade=yes

/ip service
set winbox disabled=no address=192.168.200.0/24,192.168.110.0/24
set ssh disabled=no address=192.168.200.0/24,192.168.110.0/24
set www disabled=yes
set www-ssl disabled=yes
set api disabled=yes
set api-ssl disabled=yes
set ftp disabled=yes
set telnet disabled=yes

/ip ssh
set strong-crypto=yes

/tool mac-server
set allowed-interface-list=none

/tool mac-server mac-winbox
set allowed-interface-list=LAN

/tool mac-server ping
set enabled=no

/ip neighbor discovery-settings
set discover-interface-list=LAN

/tool bandwidth-server
set enabled=no

/system identity
set name=RB5009

/user
set admin password=demochangeme

# ======================================================================
# gw-02  (hEX S)
# ======================================================================
# MikroTik RouterOS v7 configuration
# Device:  hEX S (RB760iGS)
# Role:    switch
# Created: 2026-08-25 06:05 UTC with the eXtreme Hosting MikroTik Configurator
#          https://extremehosting.nl/configurator/en/mikrotik/
# Syntax:  https://manual.mikrotik.com/docs/introduction
#
# Apply on a device WITHOUT configuration (/system reset-configuration no-defaults=yes skip-backup=yes),
# with Safe Mode active (Ctrl+X in the terminal). Review every line before pasting.

/interface bridge
add name=bridge protocol-mode=rstp comment="genconf"

/interface vlan
add name=vlan110-trusted vlan-id=110 interface=bridge comment="management"
add name=vlan120-home vlan-id=120 interface=bridge
add name=vlan130-guest vlan-id=130 interface=bridge
add name=vlan140-iot vlan-id=140 interface=bridge
add name=vlan150-work vlan-id=150 interface=bridge

/interface list
add name=WAN comment="genconf"
add name=LAN comment="genconf"

/interface list member
add list=LAN interface=bridge comment="genconf"
add list=LAN interface=vlan110-trusted comment="genconf"
add list=LAN interface=vlan120-home comment="genconf"
add list=LAN interface=vlan130-guest comment="genconf"
add list=LAN interface=vlan140-iot comment="genconf"
add list=LAN interface=vlan150-work comment="genconf"

/interface bridge port
add bridge=bridge interface=ether1 comment="genconf" frame-types=admit-only-vlan-tagged ingress-filtering=yes
add bridge=bridge interface=ether2 comment="genconf" pvid=120 frame-types=admit-only-untagged-and-priority-tagged ingress-filtering=yes
add bridge=bridge interface=ether3 comment="genconf" pvid=120 frame-types=admit-only-untagged-and-priority-tagged ingress-filtering=yes
add bridge=bridge interface=ether4 comment="genconf" pvid=150 frame-types=admit-only-untagged-and-priority-tagged ingress-filtering=yes
add bridge=bridge interface=ether5 comment="genconf" pvid=110 frame-types=admit-only-untagged-and-priority-tagged ingress-filtering=yes
add bridge=bridge interface=sfp1 comment="genconf" frame-types=admit-only-vlan-tagged ingress-filtering=yes

/interface bridge vlan
add bridge=bridge vlan-ids=110 tagged=bridge,ether1,sfp1 untagged=ether5 comment="vlan110-trusted"
add bridge=bridge vlan-ids=120 tagged=bridge,ether1,sfp1 untagged=ether2,ether3 comment="vlan120-home"
add bridge=bridge vlan-ids=130 tagged=bridge,ether1,sfp1 comment="vlan130-guest"
add bridge=bridge vlan-ids=140 tagged=bridge,ether1,sfp1 comment="vlan140-iot"
add bridge=bridge vlan-ids=150 tagged=bridge,ether1,sfp1 untagged=ether4 comment="vlan150-work"

/interface bridge
set bridge vlan-filtering=yes

/ip address
add address=192.168.110.2/24 interface=vlan110-trusted comment="vlan110-trusted"
add address=192.168.110.3/24 interface=bridge comment="genconf"

/ip firewall filter
add chain=input action=accept connection-state=established,related,untracked comment="genconf: accept established,related,untracked"
add chain=input action=drop connection-state=invalid comment="genconf: drop invalid"
add chain=input action=accept protocol=icmp comment="genconf: accept ICMP"
add chain=input action=accept dst-address=127.0.0.1 comment="genconf: accept to local loopback (for CAPsMAN)"
add chain=input action=drop in-interface-list=!LAN comment="genconf: drop all not coming from LAN"

/ip route
add dst-address=0.0.0.0/0 gateway=192.168.110.1 comment="default via the existing router"

/system clock
set time-zone-name=America/New_York time-zone-autodetect=no

/system ntp client
set enabled=yes mode=unicast servers=nl.pool.ntp.org,time.cloudflare.com

/system package update
set channel=stable

/system routerboard settings
set auto-upgrade=yes

/ip service
set winbox disabled=no address=192.168.110.0/24,192.168.110.0/24
set ssh disabled=no address=192.168.110.0/24,192.168.110.0/24
set www disabled=yes
set www-ssl disabled=yes
set api disabled=yes
set api-ssl disabled=yes
set ftp disabled=yes
set telnet disabled=yes

/ip ssh
set strong-crypto=yes

/tool mac-server
set allowed-interface-list=none

/tool mac-server mac-winbox
set allowed-interface-list=LAN

/tool mac-server ping
set enabled=no

/ip neighbor discovery-settings
set discover-interface-list=LAN

/tool bandwidth-server
set enabled=no

/system identity
set name=RB760-switch

/user
set admin password=demochangeme

Another point regarding the firewall. This generated rule is not needed and only wastes CPU resources:

/ip firewall raw
add action=accept chain=prerouting comment="genconf: accept DHCP discover" dst-address=255.255.255.255 dst-port=67 in-interface-list=LAN protocol=udp src-address=0.0.0.0 src-port=68

DHCPv4 in RouterOS is unaffected by whatever you put in the firewall. There is no need to explicitly allow DHCP traffic.

@duxgavin Thanks, and your question found a real bug rather than just a missing feature.

We were emitting 5ghz-ax on Wi-Fi 7 hardware. It works, and it quietly caps a board you bought for 802.11be a generation short. That is fixed now, and the band follows the hardware:

hAP be3 Media   add name=ch-5ghz band=5ghz-be
                add name=ch-24ghz band=2ghz-be
                add name=ch-6ghz band=6ghz-be
hAP be lite     add name=ch-5ghz band=5ghz-be
                add name=ch-24ghz band=2ghz-be

Wi-Fi 6 devices are untouched and still get -ax, with a test to keep it that way.

Two more things came out of checking your question against the spec sheets:

  • The be³ Media was missing its 6 GHz radio entirely in our device catalogue. It is triple band, and we had it listed as 2.4 and 5 only, so the third radio was simply never configured. Now present.
  • The be lite had the wrong port count. It is one 2.5G and three 1G, we had three ports total.

The 320 MHz channel width is also now offered, since that is the other half of what Wi-Fi 7 is for.

On MLO, I want to be straight with you rather than ship a guess. The documentation describes the mechanism, affiliated interfaces sharing an mld-interface so they act as one logical AP MLD, all radios on the same device, all sharing an SSID, and mld-name set when you create the MLD interface manually. What it does not give is a complete worked example of creating it, and I have neither board on my desk to test against. Inventing that syntax and shipping it to people who then paste it into a router is exactly the sort of thing this tool should not do.

So if you have one of these in hand, two things would let me build it properly:

  1. /interface wifi print detail from the device, so I can confirm the radio names. Ours are currently a guess from the spec sheet and the generated script says so in the header. In particular I do not know whether the 6 GHz radio on the be³ Media enumerates as wifi3 or something else.
  2. A working MLO configuration if you have one, or even the exact commands you used.

Give me those and MLO goes in properly, tested against something real rather than against my reading of a manual page.

@roe1974 Two replies in one, and I owe you a correction on the first.

On connection-state=new, you were right and my checking was worse than yours. I looked at the default configuration scripts MikroTik publishes on the documentation site and at the Building Advanced Firewall page, found the matcher present in all of them, and said I could not reproduce your claim. You went and ran /system default-configuration print on actual hardware on 7.21.5. That is the authoritative source and the published files are evidently stale against shipping firmware. I should have asked for that command rather than trusting the website copies, so thank you for going and getting it.

We are still keeping the matcher, for the reason we agreed on: our output is meant to be edited, and if someone moves or deletes the established-accept above it, the version without connection-state=new starts dropping the return traffic of outbound connections. But it is now a deliberate divergence from the current default rather than us thinking we matched it, and that is a better place to be.

On the multi-device VLAN configuration, you found two real bugs. I rebuilt your exact setup, RB5009 plus cAP ax with Home and Guest on VLAN 100.

The first is the one you were circling. The cAP ax was trunking on ether2, and leaving ether1 as an untagged access port. ether1 is the PoE-in port the cable from the router actually goes into, so plugged in normally the tagged guest SSID had nowhere to go. Cause: the port defaults treat the first port as a WAN uplink, so for an access point in a site the port list arrived without ether1 in it at all and the trunk landed on whatever was left. Fixed, the uplink is now the first port:

add bridge=bridge interface=ether1 frame-types=admit-only-vlan-tagged ingress-filtering=yes
add bridge=bridge interface=ether2 pvid=100 frame-types=admit-only-untagged-and-priority-tagged

The second you did not ask about but your site exposed it. Wired ports take the first VLAN in the site table, and your only VLAN was the guest one, so every wired port on every device was landing on the guest network. That looks like a working configuration and is a security problem. There is now an error that says so and tells you to put a VLAN for the main network at the top, or take the isolation off.

On your actual question, you have identified something the tool genuinely does not model yet. Which port on the RB5009 the AP is plugged into is not known to the generator. It picks a trunk and hopes, which is exactly as unsatisfying as it sounds. Same for your camera on the cAP's ether2: today it becomes an access port on the site's first VLAN, which may or may not be what you want.

What you can do now is open that device with the Configure button in the site list, which gives you the full advanced editor for it, and set the port assignment yourself under VLANs. The site settings still apply to everything you do not override.

What we should do is model the links properly, so you say "this port faces that device" once and both ends are configured to agree. That was already on the list as the next step for multi-device mode and your post is the argument for doing it sooner. If you have a view on how you would want to enter that, I would rather hear it before building it than after.

@CGGXANNX Both good, and they land differently: you are right about the switch chips, and the manual disagrees with you about DHCP.

On hardware offload you are correct, and it was worse than a missing feature. From the Switch Chip Features page:

"For 88E6393X, 88E6191X, 88E6190, MT7621, MT7531, EN7523, RTL8367 switch chips, the VLAN table is configured through bridge HW vlan-filtering using the /interface/bridge menu. For other switches with VLAN table support, see VLAN Table and configure the VLAN table using the /interface/ethernet/switch/vlan menu."

RB3011 and hAP ac²/ac³ are in that "other" group, so what we generate takes the VLAN traffic off the switch chip and into the CPU. On an RB3011 that is the difference between wire speed and software forwarding, and we said nothing about it.

The generator now says so. Pick one of those boards, turn VLANs on, and it tells you the VLAN table on this chip lives in /interface ethernet switch, that bridge filtering works but disables hardware offload, and that the switch-chip route is the one for full throughput. Ten of the models we carry are marked: hAP, hAP ac, hAP ac lite, hAP ac², hAP ac³, hEX PoE, hEX PoE lite, PowerBox Pro and OmniTIK 5 PoE ac.

Two things I found while doing it that are worth knowing.

First, I could not derive this from our own data. Our catalogue stores the chip from the vendor spec table, and for the hAP ac² that says IPQ-4018, which is the SoC. The switch is an Atheros8327. So the list is curated by hand from the manual's device table rather than computed, which means it is only as complete as that table.

Second, and it cuts against generating the switch-menu configuration everywhere: on IPQ-PPE boards such as the hAP ax³ and cAP ax, and on the QCA8386 in the hAP be³ Media, the capability table shows no VLAN table in the switch chip at all. On those, VLANs are CPU-bound no matter which menu you use. So this is not a simple two-way split, and generating /interface ethernet switch vlan for everything would be wrong.

As for producing that configuration rather than only warning about it: you predicted it adds complexity to the code base and you are right, it is a second VLAN emission model living beside the current one. It is worth doing for that family, but I would rather ship an honest warning today than a half-tested second path, so that is the order.

On the DHCP raw rule, the manual answers it directly. The line immediately above that rule on the Building Advanced Firewall page:

"accept DHCP discovery - most of the DHCP packets are not seen by an IP firewall, but some of them are, so make sure that they are accepted."

So your premise is mostly right and the conclusion does not follow: most DHCP bypasses the IP firewall, but not all of it, which is exactly why MikroTik put the rule in. We copied it from there verbatim.

That said, I did go and trace our own raw chain rather than just quote the manual at you, and I could not construct a case where removing it breaks DHCP on the LAN. A discover has source 0.0.0.0 and destination 255.255.255.255, and none of our bogon drops match that on a LAN interface: the destination lists are WAN-scoped since the multicast fix, and 0.0.0.0 is not in any source list. So in our specific rule set it may well be doing nothing. We are keeping it, because MikroTik say some DHCP packets do reach the firewall and one accept rule is a cheap way to not find out which ones the hard way, but you were not wrong that it earns its place less than it looks.

On this manual page, under the "RouterBoard - Switch-chip description" table you'll get a more complete list of what switch chip is used on which devices, minus the CCR/CRS devices that have their own Marvell Prestera page.

Switch Chip Features | RouterOS Manual

You'll find hAP ac² listed with Atheros8327 and RB3011 with QCA8337.

The manual is inadequate in many places, and this DHCP thing is one of such things. Here you can find a discussion about DHCP & Firewall, with real tests and further discussion:

Should DHCP discover 0.0.0.0:68->255.255.255.255:67 be allowed in the Router? - RouterOS / General - MikroTik community forum

You can also do a web (internet) search about DHCP and raw socket for more.

@Buckeye You are right, those four interfaces do nothing, and the honest answer to "what is their purpose" is that they had none.

A /interface vlan on the bridge exists so the device can hold an address in that VLAN. On your router that is every VLAN, because it routes them all. On the switch it is only the management VLAN: the tagging is done entirely by the bridge VLAN table, and an interface with no address on it is clutter that invites exactly the question you asked. We were emitting one per VLAN regardless of whether the device had any presence in it.

Your switch now gets:

/interface vlan
add name=vlan110-trusted vlan-id=110 interface=bridge comment="management"

and nothing else, while the bridge VLAN table still carries all five VLANs and tags them exactly as before. The router is unchanged, since it does need an interface in each. The /interface list member entries followed the same mistake and are cleaned up with it.

Chasing that turned up a second bug behind it, which is the more interesting one. Our importer learned VLANs only from /interface vlan. So once the switch stopped emitting them, importing that switch config lost every layer-2 VLAN: it would come back knowing only VLAN 110 and would quietly drop the rest of the bridge VLAN table on the way out. That is a bug that has been there all along for any real switch configuration written the normal way, we simply never generated one before to trip over it. The importer now reads the bridge VLAN table as well, takes the name from the row comment where there is one, and marks them as having no address.

On trunk links and both ends agreeing, you and roe1974 have converged on the same gap from different directions. Nothing models what is on the other end of a link. The tool picks a trunk per device and hopes, which is why you had to go into Configure and set the second trunk by hand.

Your framing of it as a verification problem is the useful part, and I think it is the stronger half. Even before the tool can configure both ends from one statement, it could check the ones you have configured: the VLANs tagged on the RB5009 port facing the switch should match what the switch expects on its uplink, and a hybrid link with a native VLAN on one side and not the other is exactly the sort of thing that works until it does not. The site checks already catch VLAN ids that exist on one device and not another, which is the same class of problem one level up.

So the plan is to model the links, and the first thing that gets built on top is the consistency check rather than the configuration generation. If you have a preference for how you would want to state "this port faces that device", now is a good moment to say so.

@CGGXANNX I read the thread you linked, and you are right. I was wrong to answer you by quoting the manual.

The demonstration in there settles it: drop rules on the DHCP ports in raw and in filter, input and output, with logging on, and DHCP carries on working while the rules count the packets. pe1chl's explanation of why is the part that makes it click, that it is the same mechanism the packet sniffer uses and it is a Linux behaviour rather than anything MikroTik invented. bratislav's point that MAC telnet and ping over UDP 20561 do the same is a useful thing to know as well.

So the manual's line about "most of the DHCP packets are not seen by an IP firewall, but some of them are" is simply not true, and I repeated it at you as though it settled the matter. It did not, and I should have tested rather than cited. I had even said in the same reply that I could not construct a case where removing the rule broke anything in our rule set, which was the moment to go and check instead of leaning on the document.

The rule is gone from generated configurations. The raw block now starts at the bogon rules. Anyone importing a configuration that has the rule keeps it, because we do not delete things people are already running, but we no longer emit it ourselves. The reasoning is written into the source next to where it used to be, with the credit, so nobody puts it back in a year on the grounds that the manual has it.

On the switch chips, thank you for pointing at that same table, and you are right that it is more complete than I gave it credit for. I had used it for the ten boards we carry that appear in the Atheros8327 and QCA8337 rows, and treated it as a partial source because our own catalogue disagreed with it. The disagreement is our data being wrong rather than the table being incomplete: we store what the vendor spec table calls the switch chip, which for the hAP ac² is the SoC. I will go back through that table properly rather than only matching the models I already suspected.

Two things this thread has now cost me and both were worth it: the multicast bogon rule, and this. Keep going.

A thought:
Being obsessed with having an exact "export" rather than a configuration script is,
in my opinion, making this project a mess.

Do you want an "export" or a script to configure the device?
So, forget about all the weird constraints to make it look like an "export"...

This is how I set the correct MAC in my scripts, for each bridge:

/int bridge
:foreach ifb in=[find] do={:local brname [get $ifb name] ; set $brname admin-mac=[/int get [/int bri port get ([find where bridge=$brname]->0) interface] mac-address] auto-mac=no}

The IPv6 firewall must exist and be implemented correctly.
Whether one wants to use IPv6 or not is ONE OPINION.
It has happened several times that RouterOS updates re-enable IPv6,
so there MUST be protection against this,
and the default rules must be in place (even on models without default configuration).

This is a fact, not an opinion.


These are the default rules.
The post is updated only if there are any differecy with new versions.
The rules are written for readability, but they are identical to the export rules.
The rules are also updated with MikroTik bugfixes.

Fix for default rules of old RouterOS versions (already present on RouterOS 7.2x).


@rextended
Cannot say what the other people want, but I would want an /export, not a script that I cannot compare against anything.

Scripts may be an addition to a "base" /export like configuration.

About using the default Mikrotik firewall configuration, at least as an option, it would be a very welcome addition/change :slightly_smiling_face:.

Modified Compare_config to take care of "defconf" vs. "genconf" posted here:

Separate post to highlight things Marcel_Balk might want to check:

  1. rextended's idea of using (optionally) the default Mikrotik firewall seems to me like a very good one, and it should cost little or nothing to add it.
  2. once the wizard finishes, the "copy" button copies the script "correctly", i.e. as a seemingly valid Mikrotik configuration, but the "preview" in all steps adds spaces before and after the = sign that make the same snippet copied from the preview different from the one extracted from the copied and pasted "whole" configuration. Unless there is an extremely valid reason for this behaviour, the "preview" should be identical to the final configuration (and to normal Mikrotik configurations that have not those spaces).
  3. I tentatively updated the small spreadsheet, to use "genconf", link is in the previous post.

Hello, what you did is really cool!

Thanks very much for the extensive response! As for your questions, I have a be3 Media, here is what you were after:

  1. (I have omitted MACs because I don't think they are necessary):
Flags: M - MASTER; B - BOUND; R - RUNNING
0   BR name="mld1" mac-address=<> arp-timeout=auto
mld-name="mld-d0ea11a330ed" configuration.ssid="MT-Home" .mode=ap
.authentication-types=wpa3-psk

1  MBR default-name="wifi1" name="wifi1" mac-address=<>
arp-timeout=auto radio-mac=<>
configuration.ssid="MT-Home-2Ghz" .mode=ap .country=Australia
security.encryption=ccmp .authentication-types=wpa-psk,wpa2-psk
.band=2ghz-n .width=20/40mhz

2  MB  default-name="wifi2" name="wifi2" mac-address=<>
arp-timeout=auto radio-mac=<> mld-interface=mld1
configuration.ssid="MT-Home" .mode=ap .country=Australia
.authentication-types=wpa2-psk,wpa3-psk channel.frequency=5745-5865
.band=5ghz-be .width=20/40/80mhz .skip-dfs-channels=10min-cac

3  MB  default-name="wifi3" name="wifi3" mac-address=<>
arp-timeout=auto radio-mac=<> mld-interface=mld1
configuration.ssid="MT-Home" .mode=ap .country=Australia .band=6ghz-be
.width=20/40/80/160/320mhz .skip-dfs-channels=10min-cac

I think that should also answer the second question you have, I have an mld configuration for the 5 and 6Ghz, the 2.4Ghz is not included in this to maintain compatibility with older devices and IoT devices. Let me know if there's anything further you'd like :slight_smile:

TO CHECK:
Order of tokens in firewall filter configuration (possibly also elsewhere).

In a normal RouterOS export the first token after the leading add command is the action, and the second is the chain i.e. (example):

/ip firewall filter
cmd|FIRST token|SECONDtoken|...
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=drop chain=input comment="defconf: drop all not coming from LAN" in-interface-list=!LAN
...

In the configurations by the generator this order is sometimes the same, sometimes inverted, example:

/ip firewall filter
add chain=input action=accept connection-state=established,related,untracked comment="genconf: accept established,related,untracked"
add chain=input action=drop connection-state=invalid comment="genconf: drop invalid"
add action=drop chain=input comment="Bruteforce: drop blacklisted" protocol=tcp dst-port=22,8291 src-address-list=bruteforce_blacklist
add action=add-src-to-address-list address-list=bruteforce_blacklist address-list-timeout=1d chain=input comment="Blacklist" connection-state=new dst-port=22,8291 protocol=tcp src-address-list=connection3
add action=add-src-to-address-list address-list=connection3 address-list-timeout=1h chain=input comment="Third attempt" connection-state=new dst-port=22,8291 protocol=tcp src-address-list=connection2
add action=add-src-to-address-list address-list=connection2 address-list-timeout=15m chain=input comment="Second attempt" connection-state=new dst-port=22,8291 protocol=tcp src-address-list=connection1
add action=add-src-to-address-list address-list=connection1 address-list-timeout=5m chain=input comment="First attempt" connection-state=new dst-port=22,8291 protocol=tcp
add chain=input action=accept protocol=icmp comment="genconf: accept ICMP"
add chain=input action=accept dst-address=127.0.0.1 comment="genconf: accept to local loopback (for CAPsMAN)"
add chain=input action=drop in-interface-list=!LAN comment="genconf: drop all not coming from LAN"

Though (personally) I find more readable having as first token the chain, and as second the action, as in:
Where?/What?
we have - I believe - to use the default Mikrotik order:
What?/Where?
to have easier to compare configurations.

If I remember correctly,
in the export the parameters are simply in alphabetical order,
and action comes before chain...

For me, insisting every time the output looks like an export is a huge limitation to what we're trying to do here...

If it's a configuration generator (as title), something I paste/import and it configures the device,
I don't expect the export to be identical to the configuration file.
Also because, for example, if I need to read the MAC address in the configuration,
I can't know it in advance and I'll have to add scripting commands,
which certainly aren't present in an export,
or at least make the configuration look the same as the export.

I don't remember exactly now,
I'd have to look up the posts on other topics,
but didn't specifying a band preclude the others?
Simply leaving the field blank made the device use them all,
otherwise it only blocked them on the specified type... (not "from this to the older")

I had a hard time finding the post again.

The setting seems to only have an effect if the radio is a client,
just to specify the connection preferences,
it does not limit the mode to just the one specified
(and indeed, it should not be specified, since it is useless for AP...)