MikroTik RouterOS 7 IPv6 firewall: the rules people forget after securing IPv4
Secure RouterOS 7 IPv6 without copying an IPv4 NAT mindset: separate management from transit, preserve essential ICMPv6, use interface lists, validate externally and keep a tested rollback.
Scope
Secure RouterOS 7 IPv6 without copying an IPv4 NAT mindset: separate management from transit, preserve essential ICMPv6, use interface lists, validate externally and keep a tested rollback.
Scope, tested version and outcome
Audience: the administrator of a small-business RouterOS gateway that has a delegated IPv6 prefix and routed LANs. Tested platform: RouterOS 7.18.2 (stable), using a WAN interface list named WAN and an internal list named LAN. RouterOS configuration, package set and interface names vary: export and test on your own router before adapting these examples.
The outcome is deliberately modest: protect the router’s management plane, apply an explicit transit policy, preserve IPv6 functions that make the network work, and prove the result from outside the site. This is not an IPv4 rule-set copied under /ipv6. IPv6 normally does not use NAT as a security boundary; every routed address can be reachable unless routing and firewall policy say otherwise.
Threat model and baseline
An unsolicited connection to the router itself can expose Winbox, SSH, HTTPS, DNS or an accidentally enabled service. An unsolicited connection through the router can expose a workstation, server or IoT device that received a globally routable address. The practical boundary is therefore two chains:
- input protects the router itself: management and router-hosted services.
- forward protects traffic crossing the router: WAN-to-LAN exposure and unwanted lateral routes.
RouterOS processes filter rules in order. A broad accept above a later drop wins, so put established/related acceptance and invalid drops before your policy decisions. MikroTik documents the packet flow and firewall order; review any raw, mangle, FastTrack and bridge configuration before assuming a filter rule sees the packet.
Before changing anything
Impact: a mistaken IPv6 rule can cut off remote administration or break address assignment and path MTU discovery. Use local console access or an independent management path. Do not make the first change through the only remote session.
- Record the current state and save an export without secrets:
/export file=before-ipv6-firewall
/ipv6 firewall filter print detail
/interface list member print
/ipv6 address print detail
/ipv6 route print detail
- Confirm which interfaces are truly upstream and internal. An interface called
ether1is not proof that it is WAN:
/interface list print
/interface list member print
Expected result: the upstream interface is in WAN; trusted internal interfaces or VLANs are in LAN. Correct the lists before adding policy. Do not use a dynamic PPPoE or VLAN interface name blindly.
- Enter Safe Mode in Winbox or the terminal with Ctrl+X. The terminal indicates Safe Mode. If the management session dies before you leave Safe Mode, RouterOS rolls back the session’s changes. Safe Mode is a guardrail, not a substitute for a tested backup or a local recovery path.
Control 1 — make the management plane explicit
Priority: high. Benchmark: RouterOS firewall design and least privilege. Risk reduced: opportunistic access to router services. Tested: RouterOS 7.18.2.
Why: allowing every LAN device to manage a router makes a compromised guest, IoT device or workstation an administrative path.
How: first identify the dedicated management VLAN or fixed administrator prefix. The example uses documentation prefix 2001:db8:100:10::/64; replace it with your authorised management subnet. It accepts established/related traffic, drops invalid traffic, permits ICMPv6 needed by the router, permits management only from that subnet, and drops new WAN input.
/ipv6 firewall filter
add chain=input action=accept connection-state=established,related,untracked comment="IPv6: established/related input"
add chain=input action=drop connection-state=invalid comment="IPv6: drop invalid input"
add chain=input action=accept protocol=icmpv6 comment="IPv6: allow required control messages to router"
add chain=input action=accept src-address=2001:db8:100:10::/64 comment="IPv6: authorised management subnet"
add chain=input action=drop in-interface-list=WAN comment="IPv6: drop unsolicited WAN input"
Verification: from an authorised management host, reconnect to the chosen management service. From an external IPv6-capable network, confirm that only deliberately published router services respond; a timeout or filtered result is expected for management ports. Inspect counters rather than guessing:
/ipv6 firewall filter print stats where chain=input
A growing final-drop counter during an external probe is evidence the policy saw the traffic. It does not prove every service is safe: also review /ip service print, certificates and administrator accounts.
Rollback: while still in Safe Mode, remove only the rules by their exact comment or rule IDs after confirming them with print. If access is lost, let Safe Mode disconnect and roll back; use console access if the session is still alive.
Control 2 — define forward policy rather than relying on NAT
Priority: high. Benchmark: default-deny inbound transit, least privilege. Risk reduced: unsolicited WAN access to LAN IPv6 addresses. Impact: inbound services stop working unless explicitly allowed.
Why: a host receiving a globally routed prefix is not automatically unsafe, but it is no longer hidden behind IPv4 NAT. The forward chain is the decision point for traffic crossing the router.
How: add baseline state handling, preserve required ICMPv6, allow LAN-initiated traffic, then drop new WAN-to-LAN traffic. Put intentional public-service permits immediately above the final drop and constrain them by destination address and port.
/ipv6 firewall filter
add chain=forward action=accept connection-state=established,related,untracked comment="IPv6: established/related forward"
add chain=forward action=drop connection-state=invalid comment="IPv6: drop invalid forward"
add chain=forward action=accept protocol=icmpv6 comment="IPv6: permit ICMPv6 for transit"
add chain=forward action=accept in-interface-list=LAN comment="IPv6: LAN initiated forwarding"
add chain=forward action=drop connection-state=new in-interface-list=WAN comment="IPv6: block new WAN to LAN"
For a deliberately public HTTPS service, use a narrow rule above the final drop; do not expose a whole VLAN:
/ipv6 firewall filter
add chain=forward action=accept in-interface-list=WAN protocol=tcp dst-address=2001:db8:100:20::20 dst-port=443 comment="IPv6: published HTTPS service"
Verification: test outbound DNS, HTTPS and an application path from a LAN host. Then test the published service and an unpublished port from an independent IPv6 network. Record source, time, destination and result. A LAN test alone cannot prove the WAN policy.
Rollback: disable or remove the last-added forward rules by exact ID. If a public service must be restored urgently, re-enable only its previous narrow permit; do not add a broad accept in-interface-list=WAN.
Control 3 — do not break ICMPv6, neighbour discovery or PMTUD
Priority: high. Benchmark: RFC 4890 filtering recommendations. Risk reduced: self-inflicted reachability failures while retaining a policy boundary. Impact: “drop all ICMPv6” can make connections intermittent or fail only for larger packets.
Why: ICMPv6 carries more than diagnostics. Neighbour Discovery supports local-link operation, and Packet Too Big messages support Path MTU Discovery. RFC 4890 explains why an IPv4-style blanket ICMP block is not appropriate for IPv6.
How: the baseline examples accept ICMPv6 in input and forward to avoid a brittle type list. On a stricter design, start from the vendor’s current IPv6 firewall guidance and test every intended topology before narrowing types. Treat Router Advertisements, Neighbour Solicitation/Advertisement and redirects according to where they should exist: link-local control traffic belongs on the relevant link, not as a reason to trust arbitrary WAN input.
Verification: renew or observe a LAN address, resolve and reach an IPv6-only test destination, and transfer a file large enough to exercise paths beyond the local MTU. If small requests work but larger transfers stall, inspect PMTUD and ICMPv6 filtering before changing MSS or disabling IPv6.
Rollback: restore the previous ICMPv6 rule set from the saved export, then diagnose in a lab or maintenance window. Do not “fix” a PMTUD failure by opening all WAN management services.
Control 4 — use interface lists and review the order
Priority: medium. Benchmark: maintainable policy separation. Risk reduced: rules silently stop applying after an uplink or VLAN change. Impact: an interface incorrectly placed in LAN can bypass the intended boundary.
Why: interface lists express role. They are safer to audit than repeated physical-interface names, provided membership is reviewed whenever topology changes.
How and check:
/interface list member print where list=WAN
/interface list member print where list=LAN
/ipv6 firewall filter print detail
The expected result is one or more real uplinks in WAN, and only trusted routed internal interfaces in LAN. Read the output top to bottom. Look for earlier broad accepts, disabled rules, address lists and any FastTrack decision that changes the traffic path.
Rollback: move an incorrectly classified interface back only after identifying its actual role. Document the change ticket, interface, prefix and owner.
External proof and completion criteria
Complete this change only when all of the following are recorded:
- authorised management still works from the management subnet;
- LAN clients can reach required IPv6 destinations, including a larger transfer;
- external IPv6 tests cannot reach router management ports or unpublished LAN services;
- every intentional public service has a named owner, destination address, port and matching narrow permit;
- input and forward counter changes match the tests;
- the export, rule order and rollback method are stored with the change record.
For a practical inventory and external exposure test, use the companion lab: Audit IPv6 exposure before it becomes the firewall path nobody reviewed. Related background: Build the MikroTik foundation once — so the next VLAN does not require a firewall rewrite, MikroTik router security checklist, Nmap: defensive discovery with written scope and Two MikroTiks, one fibre pair, and the wrong end of both cables.
Boundaries
This guide does not replace an asset inventory, service hardening, upstream DDoS protection or a review of every routed VLAN. It intentionally does not provide a universal copy-paste firewall: address assignment method, WAN type, bridge/VLAN design, remote-management requirement and published services change the safe policy. Test changes only on systems you administer or are authorised to manage.
Control 5 — constrain discovery and management services
Priority: medium. Benchmark: least privilege and service minimisation. Risk reduced: an otherwise sound filter still permits a router service that was never intended to be reachable. Impact: a management workflow that depended on a broad source range will fail until it uses the management subnet or an approved VPN.
Why: filter policy controls packet paths, but RouterOS services and neighbour discovery settings define what is willing to answer once traffic reaches the router. Review them together; a firewall exception is not a service-hardening plan.
How: inventory enabled management services and their allowed source addresses. Use the router’s actual configuration as evidence, not an assumed default:
/ip service print detail
/ipv6 neighbor print detail
/ipv6 settings print
Disable a service only after identifying its owner and replacement management method. For services that must remain, restrict the service’s address property to the administrator network where supported, and retain the matching input rule. Do not expose Winbox, SSH or the web interface to the whole Internet merely because a public IPv6 address exists.
Verification: from the authorised subnet, test the intended service with the normal administrative account and MFA or VPN path where used. From an unauthorised internal VLAN and an independent external IPv6 network, confirm that the service is unreachable. Record both outcomes and the responsible owner.
Rollback: re-enable only the documented service or restore its previous scoped address setting. Investigate why the approved path failed before widening the firewall rule.
Change control, containment and a failure test
A firewall change is not complete when the commands return without an error. Schedule a maintenance window for a production router, name an on-site or console-capable recovery contact, and capture the active export before the first edit. During the change, test one expected failure on purpose: an external connection to an unpublished port should fail while the counter on the WAN forward drop increases. This proves the policy is doing something meaningful.
If an unexpected critical service is exposed, contain it first with the narrowest reversible action: add or restore a specific deny/disable rule for that destination and port, verify from outside, preserve the relevant configuration export and firewall counters, then notify the service owner. Do not erase logs or make a broad configuration reset. If the router itself may be exposed, restrict management to the approved subnet or maintenance VPN, rotate any credentials that may have been used from untrusted networks, and review RouterOS logs alongside upstream access records.
Izmaiņu žurnāls
- 2026-11-10 — Initial draft; tested examples on RouterOS 7.18.2.
References
- MikroTik, IPv6 Firewall, accessed 10 November 2026.
- MikroTik, Packet Flow in RouterOS, accessed 10 November 2026.
- MikroTik, Safe Mode, accessed 10 November 2026.
- IETF, RFC 4890: Recommendations for Filtering ICMPv6 Messages in Firewalls, May 2007.
- IETF, RFC 8201: Path MTU Discovery for IP version 6, July 2017.