Freedom Internet delivers fibre (glasvezel), mostly over the KPN network, and lets you use your own router. This guide replaces the provider’s modem with a MikroTik RB5009UG+S+IN running RouterOS 7. It connects to the NTU (the fibre box on the wall) with a network cable, or straight to the fibre with an SFP module. The configuration covers PPPoE with a full 1500-byte MTU, a native IPv6 /48, a private network and a guest network (both on Wi-Fi), a separate TV network with DHCP and an IGMP proxy for Freedom’s multicast IPTV, and a firewall that drops the junk in layers before it costs any CPU.
The Freedom settings come from the long-running RouterOS thread on the Freedom community, including the corrections that came up there over the years (the IPv6 default route on RouterOS 7, quick-leave, the multicast forward rule). Everything is plain RouterOS CLI: open a terminal in Winbox or over SSH, paste block by block, and check each step.
What you’ll end up with:
- Internet over PPPoE on VLAN 6 with MTU 1500 (RFC 4638), so no fragmentation and no MSS tricks for most traffic
- IPv6 with a /48 delegated by Freedom, a /64 per network, and SLAAC for the clients
- Three networks on one bridge with VLAN filtering: private (wired and Wi-Fi), guest (Wi-Fi only, internet only) and TV (the set-top box)
- IPTV on VLAN 4 with RTSP for replay, multicast only to the TV network, IGMP snooping so it never floods your Wi-Fi
- A layered firewall: raw rules for bogons, spoofing, nonsense TCP flags and known-bad networks; default-deny filter rules for IPv4 and IPv6; port-scan and honeypot detection; FastTrack for the rest
- Spamhaus DROP lists for IPv4 and IPv6, refreshed daily by a RouterOS script
- Management (SSH and Winbox) from the private network only, with an SSH key and no default
adminaccount
Written for: RB5009UG+S+IN on RouterOS 7.25 (stable channel). Any RouterOS 7 router works (hEX, RB4011, CCR2004, …) if you adjust the port names; RouterOS 6 syntax differs in places, and v6 is end of life anyway. Freedom’s own-router settings come from its community, not from an official page: they’ve been stable for years, but check the thread if something doesn’t connect. The addresses
2001:db8:abcd::/48and198.51.100.xin this post are documentation examples: yours come from Freedom.
Table of contents
- Network plan
- Freedom’s connection parameters
- Hardware and ports
- Starting clean, and Safe Mode
- System basics and hardening
- Bridge, VLANs and interface lists
- DHCP, DNS and NTP for the LAN
- Firewall address lists
- Raw firewall: drop early
- IPv4 filter rules
- IPv6 filter rules
- NAT, MSS clamping and helpers
- WAN: PPPoE on VLAN 6 with a 1500 MTU
- IPv6 with a /48 prefix
- IPTV: VLAN 4, the TV network and the IGMP proxy
- Wi-Fi: private and guest SSIDs
- Spamhaus DROP lists
- Verify
- Backups and upgrades
- Troubleshooting
- Checklist
1. Network plan
| Network | VLAN | IPv4 | IPv6 | Who’s on it | May reach |
|---|---|---|---|---|---|
| Private | 10 | 192.168.10.0/24, router .1 | a /64 from the /48 | Your computers, wired and on the private SSID | Internet, the router’s management |
| Guest | 20 | 192.168.20.0/24, router .1 | a /64 from the /48 | Visitors on the guest SSID | Internet only, rate-limited |
| TV | 30 | 192.168.30.0/24, router .1 | none (IPTV doesn’t use it) | The set-top box | Internet and Freedom’s IPTV network |
| Freedom internet | 6 | public address via PPPoE | /48 via DHCPv6-PD | ||
| Freedom IPTV | 4 | address via DHCP (100.64.0.0/10 range) |
The VLANs 10, 20 and 30 live only inside your house: on the router’s bridge and on the trunk to the access point. VLANs 4 and 6 are Freedom’s, on the WAN port.
2. Freedom’s connection parameters
| Setting | Value |
|---|---|
| Internet VLAN | 6 |
| Protocol | PPPoE |
| PPPoE user / password | fake@freedom.nl / 1234 (Freedom doesn’t check them; your line is identified by the fibre itself) |
| MTU | 1500 on PPPoE, which needs 1508 on the VLAN and room for 1512 on the physical port |
| IPv4 | One fixed public address |
| IPv6 | DHCPv6 prefix delegation over PPPoE, a /48; no default route from DHCPv6 |
| DNS (optional) | 185.93.175.43, 185.232.98.76, 2a10:3780:2:52:185:93:175:43, 2a10:3780:2:53:185:232:98:76 |
| IPTV | VLAN 4, DHCP with vendor class IPTV_RG, classless static routes, multicast via IGMP, RTSP for replay |
3. Hardware and ports
| Port | Use in this guide |
|---|---|
ether1 | WAN to the NTU (2.5 Gbit/s port) |
sfp-sfpplus1 | WAN straight on the fibre, instead of ether1 |
ether2–ether6 | Private network, untagged (VLAN 10) |
ether7 | Wi-Fi access point: VLAN 10 untagged, VLAN 20 tagged |
ether8 | Set-top box, untagged (VLAN 30) |
All commands below use ether1 for the WAN. If you connect to the fibre with an SFP module, replace ether1 with sfp-sfpplus1 everywhere, and add the speed setting from section 13.
Going direct to the fibre
Skipping the NTU removes a box and a power adapter. You need an SFP module that matches the fibre on the KPN network: single-mode, single-fibre (BiDi), 1310 nm transmit / 1490 or 1550 nm receive, plus the right patch cable. I used these from FS.com:

- 1000BASE-BX BiDi SFP 1310nm-TX/1550nm-RX 10km DOM LC/SC SMF Transceiver Module (link)
- 3m LC UPC to SC UPC Simplex OS2 Single Mode PVC (OFNR) 2.0mm Fiber Optic Patch Cable (link)
- SC/APC to SC/APC Simplex Single Mode Fiber Optic Adapter/Coupler (link)
Check the connector on your fibre outlet before ordering: KPN outlets use SC/APC (green). Never connect a UPC (blue) connector directly to an APC socket; the angled and flat end faces don’t mate and you’ll damage both. That’s what the APC coupler is for.
4. Starting clean, and Safe Mode
Start from an empty configuration, so nothing from MikroTik’s default setup (its own bridge, firewall and 192.168.88.1) gets in the way. On a new or existing router:
/system reset-configuration no-defaults=yes skip-backup=yes
The router reboots with no IP addresses at all. Connect a laptop to ether2, start Winbox, and connect by MAC address from the Neighbors tab (user admin, the password on the router’s sticker). MAC access works without any IP configuration, and the IP firewall doesn’t affect it, so you can’t lock yourself out while building the firewall. Open New Terminal and paste the blocks from this guide in order.
Safe Mode is RouterOS’s undo button: press Ctrl+X in the terminal (or click Safe Mode in Winbox) before a risky change. If your session drops while Safe Mode is on, the router rolls back everything since you turned it on. Press Ctrl+X again to keep the changes. Use it for every change on a running router; the one exception is the step in section 6 that is supposed to drop your session.
5. System basics and hardening
Name, time and firmware
/system identity set name=rtr-01
/system clock set time-zone-name=Europe/Amsterdam
/system ntp client set enabled=yes
/system ntp client servers add address=0.nl.pool.ntp.org
/system ntp client servers add address=1.nl.pool.ntp.org
/system ntp server set enabled=yes
/system routerboard settings set auto-upgrade=yesCode language: JavaScript (javascript)
The NTP server lets the LAN use the router as its time source (DHCP hands it out in section 7). auto-upgrade=yes keeps the RouterBOOT firmware in step with RouterOS after an upgrade.
Replace the default account
Create your own administrator with a long passphrase:
/user add name=netadmin group=full password="<long passphrase>"Code language: HTML, XML (xml)
Copy your SSH public key to the router (drag id_ed25519.pub into Winbox’s Files window), then attach it:
/user ssh-keys import public-key-file=id_ed25519.pub user=netadmin
/ip ssh set strong-crypto=yes always-allow-password-login=noCode language: JavaScript (javascript)
With a key imported and always-allow-password-login=no, netadmin can log in over SSH with the key only; Winbox still uses the password. Log out, log back in as netadmin, then remove the default account:
/user remove admin
Services: only SSH and Winbox, only from the private network
/ip service
set telnet disabled=yes
set ftp disabled=yes
set www disabled=yes
set www-ssl disabled=yes
set api disabled=yes
set api-ssl disabled=yes
set ssh address=192.168.10.0/24
set winbox address=192.168.10.0/24Code language: JavaScript (javascript)
The address limit is a second layer under the firewall: even if a firewall rule goes wrong, the services refuse anyone outside 192.168.10.0/24. Manage the router over IPv4; nothing here needs management over IPv6.
Turn off what you don’t use
/ip proxy set enabled=no
/ip socks set enabled=no
/ip upnp set enabled=no
/ip cloud set ddns-enabled=no update-time=no
/ip smb set enabled=no
/tool bandwidth-server set enabled=no
/tool romon set enabled=noCode language: JavaScript (javascript)
UPnP lets any device on the LAN open ports in your firewall; leave it off. The cloud DDNS isn’t needed with Freedom’s fixed address.
Kernel settings
/ip settings set rp-filter=loose tcp-syncookies=yes accept-redirects=no send-redirects=no accept-source-route=no
/ipv6 settings set forward=yes accept-redirects=no accept-router-advertisements=noCode language: JavaScript (javascript)
Reverse-path filtering is loose, not strict, on purpose. The IPTV multicast streams arrive on VLAN 4 from sources that the routing table reaches through PPPoE; strict mode would drop them. The raw rules in section 9 do the per-network anti-spoofing that strict mode would have done. The router doesn’t need router advertisements from Freedom: its IPv6 default route is static (section 14).
Two settings need the interface lists from section 6, so they come at the end of that section: the MAC server and neighbour discovery.
6. Bridge, VLANs and interface lists
One bridge carries all three internal networks, with VLAN filtering so the switch chip keeps them apart. Each access port gets its VLAN as pvid; the access point port carries VLAN 10 untagged and VLAN 20 tagged.
/interface bridge
add name=bridge-lan protocol-mode=rstp igmp-snooping=yes vlan-filtering=no comment="LAN switch: private, guest, TV"
/interface bridge port
add bridge=bridge-lan interface=ether2 pvid=10 frame-types=admit-only-untagged-and-priority-tagged
add bridge=bridge-lan interface=ether3 pvid=10 frame-types=admit-only-untagged-and-priority-tagged
add bridge=bridge-lan interface=ether4 pvid=10 frame-types=admit-only-untagged-and-priority-tagged
add bridge=bridge-lan interface=ether5 pvid=10 frame-types=admit-only-untagged-and-priority-tagged
add bridge=bridge-lan interface=ether6 pvid=10 frame-types=admit-only-untagged-and-priority-tagged
add bridge=bridge-lan interface=ether7 pvid=10 comment="Wi-Fi access point (trunk)"
add bridge=bridge-lan interface=ether8 pvid=30 frame-types=admit-only-untagged-and-priority-tagged comment="TV set-top box"
/interface bridge vlan
add bridge=bridge-lan vlan-ids=10 tagged=bridge-lan untagged=ether2,ether3,ether4,ether5,ether6,ether7 comment=PRIVATE
add bridge=bridge-lan vlan-ids=20 tagged=bridge-lan,ether7 comment=GUEST
add bridge=bridge-lan vlan-ids=30 tagged=bridge-lan untagged=ether8 comment=TVCode language: JavaScript (javascript)
The router itself joins each VLAN with a VLAN interface on the bridge, and gets its gateway addresses there:
/interface vlan
add interface=bridge-lan name=vlan10-private vlan-id=10
add interface=bridge-lan name=vlan20-guest vlan-id=20
add interface=bridge-lan name=vlan30-tv vlan-id=30
/ip address
add address=192.168.10.1/24 interface=vlan10-private comment=PRIVATE
add address=192.168.20.1/24 interface=vlan20-guest comment=GUEST
add address=192.168.30.1/24 interface=vlan30-tv comment=TVCode language: PHP (php)
Interface lists keep the firewall readable: rules say PRIVATE or WAN instead of interface names, and LAN includes all three internal lists. The WAN lists get their members in sections 13 and 15, once those interfaces exist.
/interface list
add name=WAN comment="Internet: PPPoE"
add name=IPTV_WAN comment="Freedom IPTV, VLAN 4"
add name=PRIVATE
add name=GUEST
add name=TV
add name=LAN include=PRIVATE,GUEST,TV comment="All internal networks"
/interface list member
add list=PRIVATE interface=vlan10-private
add list=GUEST interface=vlan20-guest
add list=TV interface=vlan30-tvCode language: JavaScript (javascript)
Now switch VLAN filtering on. This is the one step that is meant to drop your Winbox session: until now the laptop talked to the untagged bridge, and from now on ether2 is VLAN 10. Do it without Safe Mode (Safe Mode would roll it back when the session drops):
/interface bridge set bridge-lan vlan-filtering=yes frame-types=admit-only-vlan-taggedCode language: JavaScript (javascript)
Reconnect with Winbox, by MAC or to 192.168.10.1 (give the laptop 192.168.10.10/24 by hand until DHCP runs in section 7). If nothing answers, the reset button and section 4 get you back.
Finally, the two settings that needed the lists. MAC access and neighbour discovery only on the private network:
/tool mac-server set allowed-interface-list=PRIVATE
/tool mac-server mac-winbox set allowed-interface-list=PRIVATE
/tool mac-server ping set enabled=no
/ip neighbor discovery-settings set discover-interface-list=PRIVATECode language: JavaScript (javascript)
7. DHCP, DNS and NTP for the LAN
/ip pool
add name=pool-private ranges=192.168.10.100-192.168.10.249
add name=pool-guest ranges=192.168.20.100-192.168.20.249
add name=pool-tv ranges=192.168.30.100-192.168.30.149
/ip dhcp-server
add name=dhcp-private interface=vlan10-private address-pool=pool-private lease-time=12h
add name=dhcp-guest interface=vlan20-guest address-pool=pool-guest lease-time=1h
add name=dhcp-tv interface=vlan30-tv address-pool=pool-tv lease-time=12h
/ip dhcp-server network
add address=192.168.10.0/24 gateway=192.168.10.1 dns-server=192.168.10.1 ntp-server=192.168.10.1 domain=home.arpa
add address=192.168.20.0/24 gateway=192.168.20.1 dns-server=192.168.20.1
add address=192.168.30.0/24 gateway=192.168.30.1 dns-server=192.168.30.1 ntp-server=192.168.30.1Code language: PHP (php)
Addresses below .100 stay free for static leases and fixed devices. Guests get a short lease, so the pool doesn’t fill up with phones that visited once.
The router is the DNS resolver for every network, forwarding to Freedom’s servers with a large cache:
/ip dns set servers=185.93.175.43,185.232.98.76,2a10:3780:2:52:185:93:175:43,2a10:3780:2:53:185:232:98:76 allow-remote-requests=yes cache-size=8192
/ip dns static add name=rtr-01.home.arpa address=192.168.10.1Code language: JavaScript (javascript)
allow-remote-requests=yes turns the router into a resolver for anyone who can reach port 53. The input rules in sections 10 and 11 allow DNS from the LAN only; without them, your router becomes an open resolver that gets abused for DNS amplification within days.
8. Firewall address lists
The rules work with named lists, so a change in one place applies everywhere. IPv4 bogons, addresses that should never arrive from the internet:
/ip firewall address-list
add list=bogons address=0.0.0.0/8 comment="this network"
add list=bogons address=10.0.0.0/8 comment="RFC 1918"
add list=bogons address=100.64.0.0/10 comment="shared address space / CGNAT"
add list=bogons address=127.0.0.0/8 comment=loopback
add list=bogons address=169.254.0.0/16 comment=link-local
add list=bogons address=172.16.0.0/12 comment="RFC 1918"
add list=bogons address=192.0.0.0/24 comment="IETF protocol assignments"
add list=bogons address=192.0.2.0/24 comment=TEST-NET-1
add list=bogons address=192.168.0.0/16 comment="RFC 1918"
add list=bogons address=198.18.0.0/15 comment=benchmarking
add list=bogons address=198.51.100.0/24 comment=TEST-NET-2
add list=bogons address=203.0.113.0/24 comment=TEST-NET-3
add list=bogons address=224.0.0.0/4 comment="multicast (never a source)"
add list=bogons address=240.0.0.0/4 comment="reserved and broadcast"Code language: PHP (php)
The bogon rules apply to the PPPoE interface only, never to the IPTV VLAN: Freedom’s IPTV network uses addresses in 100.64.0.0/10 itself, and the TV would stop working.
IPv6 bogons:
/ipv6 firewall address-list
add list=bogons-v6 address=::/8 comment="unspecified, loopback, IPv4-mapped and other reserved"
add list=bogons-v6 address=100::/64 comment="discard only"
add list=bogons-v6 address=2001::/32 comment=Teredo
add list=bogons-v6 address=2001:2::/48 comment=benchmarking
add list=bogons-v6 address=2001:10::/28 comment=ORCHID
add list=bogons-v6 address=2001:db8::/32 comment=documentation
add list=bogons-v6 address=2002::/16 comment="6to4 (deprecated)"
add list=bogons-v6 address=3fff::/20 comment=documentation
add list=bogons-v6 address=5f00::/16 comment="SRv6 SIDs"
add list=bogons-v6 address=fc00::/7 comment="unique local"
add list=bogons-v6 address=fec0::/10 comment="site-local (deprecated)"
add list=bogons-v6 address=ff00::/8 comment="multicast (never a source)"Code language: PHP (php)
fe80::/10 (link-local) is deliberately not on the list: Freedom’s DHCPv6 replies and neighbour discovery come from link-local addresses.
Your own /48, for anti-spoofing. Replace the example with the prefix Freedom gave you (/ipv6 pool print shows it once section 14 is done; Freedom’s prefixes are fixed):
/ipv6 firewall address-list
add list=own-v6 address=2001:db8:abcd::/48 comment="Our /48 from Freedom: replace"
add list=lan-sources-v6 address=2001:db8:abcd::/48 comment="Our /48 from Freedom: replace"
add list=lan-sources-v6 address=fe80::/10 comment=link-local
add list=lan-sources-v6 address=::/128 comment="duplicate address detection"Code language: PHP (php)
The lists scanners (filled by the detection rules in sections 10 and 11) and spamhaus-drop (filled by the script in section 17) create themselves; the rules can refer to them already.
9. Raw firewall: drop early
The raw table runs before connection tracking. A packet dropped here costs almost nothing: no conntrack entry, no NAT lookup, no filter rules. That makes it the place for everything that is wrong regardless of state: bogon sources, spoofed addresses, impossible TCP flags, and sources you’ve already decided to ignore.
/ip firewall raw
add chain=prerouting action=drop in-interface-list=WAN src-address-list=bogons comment="WAN: bogon source"
add chain=prerouting action=drop in-interface-list=WAN src-address-list=spamhaus-drop comment="WAN: Spamhaus DROP source"
add chain=prerouting action=drop in-interface-list=WAN src-address-list=scanners comment="WAN: caught scanning, see filter rules"
add chain=prerouting action=drop in-interface-list=LAN dst-address-list=spamhaus-drop comment="LAN: no traffic to Spamhaus DROP networks"
add chain=prerouting action=accept in-interface-list=LAN src-address=0.0.0.0 dst-address=255.255.255.255 protocol=udp src-port=68 dst-port=67 comment="LAN: DHCP discover before a client has an address"
add chain=prerouting action=drop in-interface=vlan10-private src-address=!192.168.10.0/24 comment="PRIVATE: spoofed source"
add chain=prerouting action=drop in-interface=vlan20-guest src-address=!192.168.20.0/24 comment="GUEST: spoofed source"
add chain=prerouting action=drop in-interface=vlan30-tv src-address=!192.168.30.0/24 comment="TV: spoofed source"
add chain=prerouting action=drop protocol=tcp tcp-flags=!fin,!syn,!rst,!ack comment="TCP: no flags (NULL scan)"
add chain=prerouting action=drop protocol=tcp tcp-flags=fin,syn comment="TCP: SYN+FIN"
add chain=prerouting action=drop protocol=tcp tcp-flags=syn,rst comment="TCP: SYN+RST"
add chain=prerouting action=drop protocol=tcp tcp-flags=fin,rst comment="TCP: FIN+RST"
add chain=prerouting action=drop protocol=tcp tcp-flags=fin,!ack comment="TCP: FIN without ACK (FIN/XMAS scan)"
add chain=prerouting action=drop protocol=tcp tcp-flags=urg,!ack comment="TCP: URG without ACK"
add chain=prerouting action=drop protocol=tcp port=0 comment="TCP: port 0"
add chain=prerouting action=drop protocol=udp port=0 comment="UDP: port 0"Code language: JavaScript (javascript)
The spoofing rules make sure a guest can’t pretend to be on the private network. The DHCP exception comes first because a client asking for an address has no address yet. The TCP flag rules apply to all interfaces: no legitimate stack sends those combinations, from either side.
IPv6, the same idea:
/ipv6 firewall raw
add chain=prerouting action=drop in-interface-list=WAN src-address-list=bogons-v6 comment="WAN: bogon source"
add chain=prerouting action=drop in-interface-list=WAN src-address-list=own-v6 comment="WAN: our own prefix as source, spoofed"
add chain=prerouting action=drop in-interface-list=WAN src-address-list=spamhaus-drop comment="WAN: Spamhaus DROP source"
add chain=prerouting action=drop in-interface-list=WAN src-address-list=scanners comment="WAN: caught scanning"
add chain=prerouting action=drop in-interface-list=LAN dst-address-list=spamhaus-drop comment="LAN: no traffic to Spamhaus DROP networks"
add chain=prerouting action=drop in-interface-list=LAN src-address-list=!lan-sources-v6 comment="LAN: source not from our prefix"
add chain=prerouting action=drop protocol=tcp tcp-flags=!fin,!syn,!rst,!ack comment="TCP: no flags (NULL scan)"
add chain=prerouting action=drop protocol=tcp tcp-flags=fin,syn comment="TCP: SYN+FIN"
add chain=prerouting action=drop protocol=tcp tcp-flags=syn,rst comment="TCP: SYN+RST"
add chain=prerouting action=drop protocol=tcp tcp-flags=fin,!ack comment="TCP: FIN without ACK"Code language: JavaScript (javascript)
There’s no blanket “drop fragments from the WAN” rule. It looks tidy, but large DNS answers (DNSSEC) and some VPNs legitimately arrive fragmented, and dropping them breaks things in ways that are miserable to debug.
10. IPv4 filter rules
Both chains are default deny: what isn’t explicitly allowed is dropped. Order matters; RouterOS evaluates top to bottom and stops at the first match.
ICMP, in its own chain
Not all ICMP is noise. Fragmentation needed (type 3 code 4) is what makes path MTU discovery work; block it and some sites hang forever. The chain allows the useful types and rate-limits ping:
/ip firewall filter
add chain=icmp4 action=accept protocol=icmp icmp-options=0:0 comment="echo reply"
add chain=icmp4 action=accept protocol=icmp icmp-options=3:0-255 comment="destination unreachable, incl. fragmentation needed"
add chain=icmp4 action=accept protocol=icmp icmp-options=11:0-255 comment="time exceeded (traceroute)"
add chain=icmp4 action=accept protocol=icmp icmp-options=12:0-255 comment="parameter problem"
add chain=icmp4 action=accept protocol=icmp icmp-options=8:0 limit=20,40:packet comment="echo request, rate-limited"
add chain=icmp4 action=drop comment="all other ICMP"Code language: JavaScript (javascript)
Input: traffic to the router itself
/ip firewall filter
add chain=input action=accept connection-state=established,related,untracked comment="established, related, untracked"
add chain=input action=drop connection-state=invalid comment=invalid
add chain=input action=jump jump-target=icmp4 protocol=icmp comment="ICMP: own chain"
add chain=input action=accept in-interface=lo comment="router to itself"
add chain=input action=accept in-interface-list=LAN protocol=udp dst-port=67 comment="LAN: DHCP"
add chain=input action=accept in-interface-list=LAN protocol=udp dst-port=53,123 comment="LAN: DNS and NTP"
add chain=input action=accept in-interface-list=LAN protocol=tcp dst-port=53 comment="LAN: DNS over TCP"
add chain=input action=accept in-interface-list=PRIVATE protocol=tcp dst-port=22,8291 comment="PRIVATE: SSH and Winbox"
add chain=input action=accept in-interface-list=TV protocol=igmp comment="TV: IGMP joins from the set-top box"
add chain=input action=accept in-interface-list=IPTV_WAN protocol=igmp comment="IPTV: IGMP queries from Freedom"
add chain=input action=accept in-interface-list=IPTV_WAN protocol=udp src-port=67 dst-port=68 comment="IPTV: DHCP replies"
add chain=input action=add-src-to-address-list address-list=scanners address-list-timeout=1d in-interface-list=WAN connection-state=new protocol=tcp psd=21,3s,3,1 comment="DETECT: port scan"
add chain=input action=add-src-to-address-list address-list=scanners address-list-timeout=7d in-interface-list=WAN connection-state=new protocol=tcp dst-port=21,22,23,135,139,445,1433,3306,3389,5900,8291,8728,8729 comment="DETECT: honeypot ports"
add chain=input action=log log-prefix="DROP-IN " limit=10/1m,5:packet comment="log a sample"
add chain=input action=drop comment="drop everything else"Code language: JavaScript (javascript)
The two DETECT rules turn the router’s own closed ports into a trap. Nothing listens on those ports from the internet, so anyone opening a connection to SSH, Telnet, SMB, RDP, Winbox or a database port on your public address is scanning you. They go on the scanners list, and the raw rule from section 9 drops everything from them, including anything you forward later, for a day (port scan) or a week (honeypot). psd=21,3s,3,1 scores connections to many ports in a short time: low ports weigh 1, high ports 3, and 21 points within 3 seconds is a scan.
Logging is limited to a sample of 10 packets per minute; the internet’s background noise would fill the log otherwise.
Forward: traffic through the router
/ip firewall filter
add chain=forward action=fasttrack-connection hw-offload=yes connection-state=established,related in-interface-list=!GUEST out-interface-list=!GUEST comment="FastTrack, except guest traffic"
add chain=forward action=accept connection-state=established,related,untracked comment="established, related, untracked"
add chain=forward action=drop connection-state=invalid comment=invalid
add chain=forward action=drop out-interface-list=WAN dst-address-list=bogons comment="never send private or reserved destinations to the internet"
add chain=forward action=accept in-interface-list=PRIVATE out-interface-list=WAN comment="PRIVATE: internet"
add chain=forward action=accept in-interface-list=GUEST out-interface-list=WAN comment="GUEST: internet only"
add chain=forward action=accept in-interface-list=TV out-interface-list=WAN comment="TV: apps, program guide, updates"
add chain=forward action=accept in-interface-list=TV out-interface-list=IPTV_WAN comment="TV: unicast to the IPTV network (replay, video on demand)"
add chain=forward action=accept in-interface-list=IPTV_WAN out-interface-list=TV protocol=udp dst-address=224.0.0.0/4 comment="IPTV: multicast streams to the TV network"
add chain=forward action=accept connection-nat-state=dstnat comment="port forwards (none by default)"
add chain=forward action=log log-prefix="DROP-FWD " limit=10/1m,5:packet comment="log a sample"
add chain=forward action=drop comment="drop everything else"Code language: JavaScript (javascript)
What this means in practice:
- The private network reaches the internet. It doesn’t reach the guest or TV network, and vice versa: there’s no rule for it, so it’s dropped.
- Guests reach the internet and nothing else: not the private network, not the TV, not the router’s management (input only allows DHCP, DNS and NTP from them).
- The set-top box reaches the internet and Freedom’s IPTV network; the multicast streams come back only to the TV network.
- FastTrack sends established connections past the firewall, NAT and mangle, which is what lets the RB5009 route a gigabit over PPPoE. Guest traffic is excluded, so the guest rate limit in section 16 still works (FastTracked packets skip queues).
11. IPv6 filter rules
IPv6 has no NAT hiding your devices: every LAN device has a public address, and the forward chain is what protects them. ICMPv6 matters even more than ICMP does in IPv4: without packet too big there’s no path MTU discovery, and without neighbour discovery nothing works at all.
/ipv6 firewall filter
add chain=icmp6 action=accept protocol=icmpv6 icmp-options=1:0-255 comment="destination unreachable"
add chain=icmp6 action=accept protocol=icmpv6 icmp-options=2:0-255 comment="packet too big: never block"
add chain=icmp6 action=accept protocol=icmpv6 icmp-options=3:0-255 comment="time exceeded"
add chain=icmp6 action=accept protocol=icmpv6 icmp-options=4:0-255 comment="parameter problem"
add chain=icmp6 action=accept protocol=icmpv6 icmp-options=128:0 limit=20,40:packet comment="echo request, rate-limited"
add chain=icmp6 action=accept protocol=icmpv6 icmp-options=129:0 comment="echo reply"
add chain=icmp6 action=accept protocol=icmpv6 icmp-options=133:0 hop-limit=equal:255 in-interface-list=LAN comment="router solicitation"
add chain=icmp6 action=accept protocol=icmpv6 icmp-options=135:0 hop-limit=equal:255 comment="neighbour solicitation"
add chain=icmp6 action=accept protocol=icmpv6 icmp-options=136:0 hop-limit=equal:255 comment="neighbour advertisement"
add chain=icmp6 action=accept protocol=icmpv6 icmp-options=130:0-255 src-address=fe80::/10 in-interface-list=LAN comment="MLD query"
add chain=icmp6 action=accept protocol=icmpv6 icmp-options=131:0-255 src-address=fe80::/10 in-interface-list=LAN comment="MLD report"
add chain=icmp6 action=accept protocol=icmpv6 icmp-options=132:0-255 src-address=fe80::/10 in-interface-list=LAN comment="MLD done"
add chain=icmp6 action=accept protocol=icmpv6 icmp-options=143:0-255 src-address=fe80::/10 in-interface-list=LAN comment="MLDv2 report"
add chain=icmp6 action=drop comment="all other ICMPv6"
add chain=icmp6-fwd action=accept protocol=icmpv6 icmp-options=1:0-255 comment="destination unreachable"
add chain=icmp6-fwd action=accept protocol=icmpv6 icmp-options=2:0-255 comment="packet too big: never block"
add chain=icmp6-fwd action=accept protocol=icmpv6 icmp-options=3:0-255 comment="time exceeded"
add chain=icmp6-fwd action=accept protocol=icmpv6 icmp-options=4:0-255 comment="parameter problem"
add chain=icmp6-fwd action=accept protocol=icmpv6 icmp-options=128:0 limit=20,40:packet comment="echo request, rate-limited"
add chain=icmp6-fwd action=accept protocol=icmpv6 icmp-options=129:0 comment="echo reply"
add chain=icmp6-fwd action=drop comment="all other ICMPv6"
The hop-limit=equal:255 checks make sure neighbour discovery packets really come from the local link: a router on the way decrements the hop limit, so a packet with 255 can’t have been routed.
Input and forward:
/ipv6 firewall filter
add chain=input action=accept connection-state=established,related,untracked comment="established, related, untracked"
add chain=input action=accept in-interface-list=WAN protocol=udp src-address=fe80::/10 dst-port=546 comment="WAN: DHCPv6 prefix delegation from Freedom"
add chain=input action=drop connection-state=invalid comment=invalid
add chain=input action=jump jump-target=icmp6 protocol=icmpv6 comment="ICMPv6: own chain"
add chain=input action=accept in-interface-list=LAN protocol=udp dst-port=53,123 comment="LAN: DNS and NTP"
add chain=input action=accept in-interface-list=LAN protocol=tcp dst-port=53 comment="LAN: DNS over TCP"
add chain=input action=add-src-to-address-list address-list=scanners address-list-timeout=7d in-interface-list=WAN connection-state=new protocol=tcp dst-port=21,22,23,135,139,445,1433,3306,3389,5900,8291,8728,8729 comment="DETECT: honeypot ports"
add chain=input action=log log-prefix="DROP6-IN " limit=10/1m,5:packet comment="log a sample"
add chain=input action=drop comment="drop everything else"
add chain=forward action=accept connection-state=established,related,untracked comment="established, related, untracked"
add chain=forward action=drop connection-state=invalid comment=invalid
add chain=forward action=drop out-interface-list=WAN dst-address-list=bogons-v6 comment="never send reserved destinations to the internet"
add chain=forward action=jump jump-target=icmp6-fwd protocol=icmpv6 comment="ICMPv6: own chain"
add chain=forward action=accept in-interface-list=PRIVATE out-interface-list=WAN comment="PRIVATE: internet"
add chain=forward action=accept in-interface-list=GUEST out-interface-list=WAN comment="GUEST: internet only"
add chain=forward action=log log-prefix="DROP6-FWD " limit=10/1m,5:packet comment="log a sample"
add chain=forward action=drop comment="drop everything else"
Nothing from the internet reaches a LAN device unless it’s a reply, or one of the ICMPv6 messages above. If you later want to reach a server at home over IPv6, add an accept rule for exactly that address and port above the final drop; there’s no NAT to forward through.
12. NAT, MSS clamping and helpers
/ip firewall nat
add chain=srcnat action=masquerade out-interface-list=WAN comment="LAN to the internet"
add chain=srcnat action=masquerade out-interface-list=IPTV_WAN comment="set-top box to the IPTV network"Code language: JavaScript (javascript)
With the full 1500 MTU, TCP doesn’t need its maximum segment size adjusted. These rules are a safety net for paths behind you that are smaller, and for the fallback to MTU 1492 in section 20. clamp-to-pmtu only lowers the MSS when it’s needed, so it’s harmless at 1500:
/ip firewall mangle
add chain=forward action=change-mss new-mss=clamp-to-pmtu protocol=tcp tcp-flags=syn out-interface-list=WAN passthrough=yes comment="MSS clamp out"
add chain=forward action=change-mss new-mss=clamp-to-pmtu protocol=tcp tcp-flags=syn in-interface-list=WAN passthrough=yes comment="MSS clamp in"
/ipv6 firewall mangle
add chain=forward action=change-mss new-mss=clamp-to-pmtu protocol=tcp tcp-flags=syn out-interface-list=WAN passthrough=yes comment="MSS clamp out"
add chain=forward action=change-mss new-mss=clamp-to-pmtu protocol=tcp tcp-flags=syn in-interface-list=WAN passthrough=yes comment="MSS clamp in"Code language: JavaScript (javascript)
Connection-tracking helpers: RTSP on (TV replay and video on demand need it), SIP and H.323 off (they mangle VoIP traffic and break more than they fix):
/ip firewall service-port
set rtsp disabled=no
set sip disabled=yes
set h323 disabled=yesCode language: JavaScript (javascript)
13. WAN: PPPoE on VLAN 6 with a 1500 MTU
Freedom runs PPPoE on VLAN 6. PPPoE adds 8 bytes, so a full 1500-byte packet inside the tunnel needs a 1508-byte VLAN, and the VLAN tag adds another 4 on the wire. The RB5009’s ports default to an L2MTU of 1514, which isn’t enough for a 1508-byte VLAN, so raise it first:
/interface ethernet
set [find default-name=ether1] l2mtu=1600 mtu=1512 comment="WAN: Freedom NTU"
/interface vlan
add interface=ether1 name=vlan6-internet vlan-id=6 mtu=1508 comment="Freedom: internet"
add interface=ether1 name=vlan4-iptv vlan-id=4 comment="Freedom: IPTV"Code language: JavaScript (javascript)
The VLANs sit directly on the port, without a bridge. If you do put the WAN port in a bridge with VLAN filtering, the bridge needs /interface bridge vlan entries for VLANs 4 and 6 with both the port and the bridge tagged, or PPPoE never connects.
Direct on the fibre: use sfp-sfpplus1 instead of ether1, and fix the speed. BiDi modules and auto-negotiation often don’t get along, and the link just stays down:
/interface ethernet
set [find default-name=sfp-sfpplus1] auto-negotiation=no speed=1G-baseX l2mtu=1600 mtu=1512 comment="WAN: Freedom fibre"Code language: JavaScript (javascript)
A PPP profile without the extras, then the PPPoE client:
/ppp profile
add name=freedom use-ipv6=yes change-tcp-mss=no use-compression=no use-encryption=no use-upnp=no only-one=yes
/interface pppoe-client
add name=pppoe-freedom interface=vlan6-internet user="fake@freedom.nl" password=1234 profile=freedom max-mtu=1500 max-mru=1500 add-default-route=yes default-route-distance=1 use-peer-dns=no disabled=no comment="Freedom: internet"
/interface list member
add list=WAN interface=pppoe-freedomCode language: JavaScript (javascript)
change-tcp-mss=no because the mangle rules in section 12 already do that, for IPv6 too. use-peer-dns=no because the router uses the DNS servers you set in section 7.
Check the session:
/interface pppoe-client monitor pppoe-freedom onceCode language: PHP (php)
You want status: connected, mtu: 1500 and mru: 1500. If it says 1492, the peer didn’t accept the larger size; check the L2MTU and the MTU on the VLAN.
14. IPv6 with a /48 prefix
Freedom delegates a /48 over DHCPv6 on the PPPoE session. The router puts it in a pool and hands out one /64 per network:
/ipv6 dhcp-client
add interface=pppoe-freedom request=prefix pool-name=freedom-v6 prefix-hint=::/48 add-default-route=no use-peer-dns=no comment="Freedom: /48 prefix delegation"
/ipv6 route
add dst-address=::/0 gateway=pppoe-freedom comment="IPv6 default route via Freedom"
/ipv6 address
add address=::1/64 from-pool=freedom-v6 interface=vlan10-private advertise=yes comment=PRIVATE
add address=::1/64 from-pool=freedom-v6 interface=vlan20-guest advertise=yes comment=GUEST
Three things here that went wrong for a lot of people in the Freedom thread:
add-default-route=no. On RouterOS 6,yeshappened to work; on RouterOS 7 it breaks IPv6 with Freedom. The default route is a static route over the PPPoE interface instead: it’s a point-to-point link, so no next-hop address is needed, and it doesn’t depend on router advertisements.- Leave
pool-prefix-lengthat its default (64). It sets the size of each piece handed out of the pool, not the size you request. Set it to 48 and the first network takes the whole prefix.prefix-hint=::/48is what asks Freedom for a /48. - Addresses from the pool go on the LAN interfaces, never on the WAN. The PPPoE interface only needs its link-local address.
Each ::1/64 takes the next free /64 from the pool, in the order you add them: the private network gets 2001:db8:abcd::/64, the guest network 2001:db8:abcd:1::/64. Clients configure themselves with SLAAC from the router advertisements. The TV network gets no IPv6; the set-top box doesn’t use it.
DNS for the clients keeps coming from DHCPv4 (the router answers AAAA queries just as well over IPv4), so the router advertisements don’t need to carry DNS servers:
/ipv6 nd set [find default=yes] advertise-dns=noCode language: JavaScript (javascript)
Now go back to section 8 and put your real /48 in the own-v6 and lan-sources-v6 lists:
/ipv6 pool print
/ipv6 firewall address-list set [find list=own-v6] address=2001:db8:abcd::/48
/ipv6 firewall address-list set [find list=lan-sources-v6 comment~"Freedom"] address=2001:db8:abcd::/48Code language: PHP (php)
15. IPTV: VLAN 4, the TV network and the IGMP proxy
Freedom’s TV uses KPN-style IPTV: the set-top box (an Amino) gets live channels as multicast over VLAN 4, and replay and video on demand as unicast over RTSP. The router’s job: get an address on VLAN 4, pass the box’s channel requests (IGMP) upstream, and route the multicast streams to the TV network, and only there.
If your receiver only needs an internet connection (an app-based TV service), skip this section: plug the receiver into ether8 anyway, and the TV network gives it internet while the IPTV rules simply stay idle.
An address on VLAN 4
DHCP on the IPTV VLAN, with the vendor class IPTV_RG that identifies a router to the IPTV network:
/ip dhcp-client option
add name=vendor-class-iptv code=60 value="'IPTV_RG'"
/ip dhcp-client
add interface=vlan4-iptv dhcp-options=hostname,clientid,vendor-class-iptv add-default-route=special-classless default-route-distance=210 use-peer-dns=no use-peer-ntp=no comment="Freedom: IPTV"
/interface list member
add list=IPTV_WAN interface=vlan4-iptvCode language: JavaScript (javascript)
Note the quoting of the value: double quotes around single quotes, so RouterOS sends the text IPTV_RG and not a number. special-classless installs the routes to the IPTV networks that the DHCP server sends (classless static routes, RFC 3442). It also adds a default route via VLAN 4, which is why the distance is 210: it only becomes active when PPPoE is down, and even then the forward rules let only the TV network use it.
The IGMP proxy
The box on the TV network sends IGMP joins; the proxy forwards them up VLAN 4 and routes the streams back down:
/routing igmp-proxy
set quick-leave=yes
/routing igmp-proxy interface
add interface=vlan4-iptv upstream=yes alternative-subnets=0.0.0.0/0
add interface=vlan30-tvCode language: JavaScript (javascript)
alternative-subnets=0.0.0.0/0is needed because the streams come from sources outside VLAN 4’s own subnet; without it the proxy ignores them. It’s safe here, because the forward rule only lets multicast through to the TV network.quick-leave=yesstops a stream the moment the box leaves a channel, instead of waiting for a timeout. That makes zapping faster, but it only works with one set-top box. With two or more boxes, setquick-leave=no, or one box changing channels cuts off the other.
Keep multicast off your Wi-Fi
The bridge has IGMP snooping on (section 6), so the switch chip sends the TV streams only to the port where the box joined: ether8. A stream of several Mbit/s flooding every port, and your access point, is the classic cause of “Wi-Fi gets slow when the TV is on”. If the box hangs off another switch, that switch needs IGMP snooping too, or a dedicated port for VLAN 30.
The firewall side is already in place: IGMP into the router from the TV network and from VLAN 4 (section 10, input), multicast from VLAN 4 to the TV network, unicast from the box to the IPTV network, the masquerade towards VLAN 4 (section 12) and the RTSP helper. The forward rule for the multicast streams is required: the proxy decides where the streams go, but they still pass through the forward chain, and without that rule the picture stays black.
16. Wi-Fi: private and guest SSIDs
The RB5009 has no radio; Wi-Fi comes from an access point on ether7. That port carries the private network untagged (the AP’s own management address, and the private SSID) and the guest network tagged as VLAN 20. Whatever access point you use, the idea is the same:
| SSID | VLAN on the AP | Client isolation |
|---|---|---|
| Home | 10, untagged | Off |
| Home-Guest | 20, tagged | On: guests can’t see each other either |
Example: a MikroTik cAP ax
For a MikroTik access point with the wifi package (RouterOS 7), reset it without defaults, connect by MAC through ether1, and configure:
# On the access point, not on the router
/interface bridge add name=bridge vlan-filtering=no
/interface bridge port add bridge=bridge interface=ether1 pvid=10
/interface wifi security
add name=sec-private authentication-types=wpa2-psk,wpa3-psk passphrase="<long passphrase>"
add name=sec-guest authentication-types=wpa2-psk,wpa3-psk passphrase="<guest passphrase>"
/interface wifi datapath
add name=dp-private bridge=bridge vlan-id=10
add name=dp-guest bridge=bridge vlan-id=20 client-isolation=yes
/interface wifi configuration
add name=cfg-private ssid=Home country=Netherlands security=sec-private datapath=dp-private
add name=cfg-guest ssid=Home-Guest country=Netherlands security=sec-guest datapath=dp-guest
/interface wifi
set [find default-name=wifi1] configuration=cfg-private disabled=no
set [find default-name=wifi2] configuration=cfg-private disabled=no
add name=wifi1-guest master-interface=wifi1 configuration=cfg-guest disabled=no
add name=wifi2-guest master-interface=wifi2 configuration=cfg-guest disabled=no
/interface bridge vlan
add bridge=bridge vlan-ids=10 tagged=bridge untagged=ether1
add bridge=bridge vlan-ids=20 tagged=ether1
/interface vlan add interface=bridge name=vlan10-mgmt vlan-id=10
/ip dhcp-client add interface=vlan10-mgmt
/interface bridge set bridge vlan-filtering=yes frame-types=admit-only-vlan-taggedCode language: HTML, XML (xml)
The datapath’s vlan-id makes each SSID an access port in that VLAN on the AP’s bridge. Harden the AP like the router: own user, admin removed, services off, MAC access limited. For a UniFi, Omada or other AP: create the guest network as VLAN 20 in its controller, with client isolation on.
Limit the guest network
A visitor’s phone backing up its photos shouldn’t fill your line. A simple queue caps the whole guest network; it works because the FastTrack rule in section 10 skips guest traffic:
/queue simple
add name=guest-limit target=192.168.20.0/24 max-limit=100M/100M comment="guest network: 100 Mbit/s each way"Code language: JavaScript (javascript)
17. Spamhaus DROP lists
Spamhaus DROP (Don’t Route Or Peer) lists networks that are hijacked or run entirely by criminals: no legitimate traffic comes from or goes to them. The raw rules in section 9 drop traffic from those networks on the WAN, and traffic to them from the LAN, which also stops an infected device from reaching a command-and-control server hosted there.
A RouterOS script downloads both lists over HTTPS and refills the spamhaus-drop address lists. First give the router a CA bundle, so it can check Spamhaus’s certificate:
/tool fetch url=https://curl.se/ca/cacert.pem dst-path=cacert.pem
/certificate import file-name=cacert.pem passphrase=""Code language: PHP (php)
Then the script. Paste it as a whole; the terminal accepts the multi-line source={...}:
/system script
add name=spamhaus-drop policy=read,write,test comment="Refresh the Spamhaus DROP address lists" source={
# Data: (c) The Spamhaus Project, https://www.spamhaus.org/drop/
:local feeds {
{"url"="https://www.spamhaus.org/drop/drop.txt"; "family"="v4"};
{"url"="https://www.spamhaus.org/drop/dropv6.txt"; "family"="v6"}
}
:local list "spamhaus-drop"
:foreach feed in=$feeds do={
:local url ($feed->"url")
:local v6 (($feed->"family") = "v6")
:local data ""
:do {
:set data ([/tool fetch url=$url check-certificate=yes output=user as-value]->"data")
} on-error={
:log warning "spamhaus-drop: download of $url failed, keeping the current list"
}
:if ([:len $data] > 1000) do={
:if ($v6) do={
/ipv6 firewall address-list remove [find list=$list]
} else={
/ip firewall address-list remove [find list=$list]
}
:local count 0
:local pos 0
:local total [:len $data]
:while ($pos < $total) do={
:local eol [:find $data "\n" ($pos - 1)]
:if ([:typeof $eol] = "nil") do={ :set eol $total }
:local line [:pick $data $pos $eol]
:set pos ($eol + 1)
:foreach cut in={";"; " "; "\r"} do={
:local p [:find $line $cut]
:if ([:typeof $p] != "nil") do={ :set line [:pick $line 0 $p] }
}
:if ([:len $line] > 0) do={
:do {
:if ($v6) do={
/ipv6 firewall address-list add list=$list address=$line timeout=3d comment=spamhaus
} else={
/ip firewall address-list add list=$list address=$line timeout=3d comment=spamhaus
}
:set count ($count + 1)
} on-error={}
}
}
:log info "spamhaus-drop: $count entries loaded from $url"
} else={
:log warning "spamhaus-drop: $url returned too little data, keeping the current list"
}
}
}Code language: PHP (php)
How it stays safe:
- The old list is only removed after a download succeeded and looks sane (more than 1000 bytes). If Spamhaus is unreachable, the current list stays in place.
- Comment lines (starting with
;) and the SBL reference after each network are cut off; only the network itself is added. - The entries get a timeout of three days. That makes them dynamic: they don’t end up in your configuration export, and if the script stops running, the lists empty themselves instead of going stale forever.
Run it daily, and once after every boot (dynamic entries don’t survive a reboot), with a delay so PPPoE is up first:
/system scheduler
add name=spamhaus-drop-daily start-time=04:17:00 interval=1d policy=read,write,test on-event="/system script run spamhaus-drop"
add name=spamhaus-drop-boot start-time=startup policy=read,write,test on-event=":delay 90s; /system script run spamhaus-drop"
/system script run spamhaus-drop
/log print where message~"spamhaus"Code language: PHP (php)
Don’t run it more often than once a day: Spamhaus updates the lists about that often, and blocks clients that download too much.
18. Verify
On the router:
/interface pppoe-client monitor pppoe-freedom once
/ping 9.9.9.9 count=3
/ping 9.9.9.9 size=1500 do-not-fragment count=3
/ipv6 dhcp-client print detail
/ipv6 address print
/ping 2620:fe::fe count=3
/ip dhcp-client print detail where interface=vlan4-iptv
/routing igmp-proxy mfc print
/ip firewall address-list print count-only where list=spamhaus-drop
/ipv6 firewall address-list print count-only where list=spamhaus-drop
/ip firewall filter print stats
/interface bridge vlan printCode language: JavaScript (javascript)
What to look for:
- PPPoE
connectedwith MTU and MRU 1500, and the 1500-byte ping withdo-not-fragmentanswered (in RouterOS,sizeis the whole IP packet). - The IPv6 client
boundwith a /48, and a global address onvlan10-privateandvlan20-guest. - The IPTV client
boundwith an address on VLAN 4; with the TV on, the IGMP proxy’s MFC table shows the channel’s group address. - Both Spamhaus lists with a few hundred to over a thousand entries.
From the networks:
- A laptop on the private network:
https://test-ipv6.comscores 10/10, and a speed test reaches your subscription speed. - A phone on the guest SSID: internet works,
192.168.10.1and the private devices don’t answer, and the speed is capped by the queue. - The TV: live channels, zapping, and replay all work.
- From outside (a phone on mobile data), a port scan of your public IPv4 address and of a LAN device’s IPv6 address shows everything filtered. (Scan from an address you don’t mind landing on the
scannerslist for a week.)
19. Backups and upgrades
Backups
Two kinds, both after every finished change:
/export show-sensitive file=rtr-01-config
/system backup save name=rtr-01 encryption=aes-sha256 password="<backup passphrase>"Code language: JavaScript (javascript)
The export is a readable script of the whole configuration: diff it, keep it in git, paste it into a fresh router. show-sensitive includes the passwords, so treat it as a secret. The binary backup restores to the same router model only, and includes the users. Copy both off the router:
scp netadmin@192.168.10.1:/rtr-01-config.rsc netadmin@192.168.10.1:/rtr-01.backup ./rtr-01-backup/Code language: JavaScript (javascript)
Upgrades
/system package update set channel=stable
/system package update check-for-updates
/system package update installCode language: JavaScript (javascript)
The router downloads, reboots and installs. Because of auto-upgrade=yes, it updates the RouterBOOT firmware on that boot as well; one more reboot activates it:
/system routerboard print
/system rebootCode language: PHP (php)
Read the changelog before upgrading. If this router must just keep working, the long-term channel gets fewer changes; stable gets security fixes first. Make an export before every upgrade: in the rare case an update changes a setting’s name, you’ll want to compare.
20. Troubleshooting
| Symptom | Likely cause and fix |
|---|---|
| PPPoE doesn’t come up | Check the link first: /interface ethernet monitor ether1. No link on the SFP means wrong wavelengths, a dirty connector, a UPC/APC mix-up, or auto-negotiation (auto-negotiation=no speed=1G-baseX). Link but no PPPoE: wrong VLAN, or the WAN port is in a bridge without /interface bridge vlan entries. |
| PPPoE up with MTU 1492 instead of 1500 | The VLAN can’t carry 1508 bytes: check l2mtu=1600 and mtu=1512 on the port and mtu=1508 on vlan6-internet, then disable and enable the PPPoE client. |
| PPPoE up, but large pages or downloads hang | Something between you and Freedom drops the larger frames. Fall back to the safe values: max-mtu=1492 max-mru=1492 on the PPPoE client; the MSS clamp rules take care of TCP. |
| IPv6 prefix received, but no IPv6 internet | No default route: check /ipv6 route print for the static ::/0 via pppoe-freedom, and that the DHCPv6 client has add-default-route=no. Also check that the LAN interfaces got an address from the pool. |
| No IPv6 prefix at all | The input rule for DHCPv6 (UDP 546 from fe80::/10) must come before the invalid drop. Then /ipv6 dhcp-client release [find] and watch /log print. |
| IPv6 works for weeks, then stops | Freedom stops routing a prefix whose lease isn’t renewed. Check that the DHCPv6 client is bound and its expiry keeps moving; /ipv6 dhcp-client renew [find] forces a renewal. |
Log shows dhcp,critical,error ... lost IP address ... received NAK on VLAN 4 | The IPTV DHCP server refused the old lease (typical after a reboot or a change on Freedom’s side). The client starts over and normally has a new address seconds later. If it repeats, check the vendor class option and that UDP 67 to 68 is allowed on IPTV_WAN. |
| TV: no picture, black screen | No multicast forward rule, or IGMP blocked: check the counters on the IPTV rules in /ip firewall filter print stats, and the MFC table of the IGMP proxy. |
| TV freezes after a few minutes | The upstream stops sending because the proxy doesn’t answer Freedom’s IGMP queries: the input rule for IGMP on IPTV_WAN is missing. With two boxes: quick-leave=no. |
| Live TV works, replay or video on demand doesn’t | RTSP helper off (/ip firewall service-port print), or the rule TV to IPTV_WAN missing. |
| Wi-Fi slows down when the TV is on | Multicast flooding: IGMP snooping off on the bridge or on a switch between the router and the box. |
| Spamhaus list stays empty | /log print where message~"spamhaus". A certificate error means the CA bundle is missing. Note that output=user handles downloads up to 64 KB; the DROP lists are well under that. |
| Locked out after a change | Without Safe Mode on: Winbox by MAC from a private port still works. If not: hold the reset button and restore the export. |
21. Checklist
- ☐ Started from
no-defaults; Safe Mode used for every change on the running router - ☐ Own admin account with an SSH key;
adminremoved; only SSH and Winbox, from 192.168.10.0/24 - ☐ MAC access and neighbour discovery limited to the private network; UPnP, proxy, cloud and bandwidth test off
- ☐ Bridge with VLAN filtering: private 10, guest 20, TV 30; IGMP snooping on
- ☐ DHCP and DNS on all three networks; DNS reachable from the LAN only
- ☐ Raw rules: bogons, anti-spoofing per network, bad TCP flags, scanners and Spamhaus
- ☐ Filter rules default deny for IPv4 and IPv6; ICMPv6 that IPv6 needs allowed
- ☐ PPPoE on VLAN 6 with MTU 1500; the 1500-byte ping passes
- ☐ /48 delegated; private and guest have a /64;
own-v6holds your real prefix; test-ipv6.com 10/10 - ☐ IPTV: address on VLAN 4, IGMP proxy, multicast only to the TV network, RTSP helper on
- ☐ Guest SSID on VLAN 20 with client isolation and a rate limit
- ☐ Spamhaus lists loaded, refreshed daily and at boot
- ☐ Export and backup copied off the router