FAQ
TL;DR: Allow only approved hosts by combining DHCP static-only + add-arp-for-leases + ARP reply-only; open 4 ingress services (8291, 1701, 500, 4500); "You can also secure traffic from the inside." [Elektroda, ryba884, post #17072347]
Why it matters: This helps MikroTik admins lock a small office LAN to known devices and harden L2TP/IPsec remote access.
Quick Facts
- Set DHCP address-pool=static-only to serve only pre-defined MAC-bound leases; unknown clients get no IP. [Manual:DHCP Server]
- Enable add-arp-for-leases so DHCP fills ARP; with ARP=reply-only, only leased IP/MAC pairs pass. [Manual:DHCP Server]
- On the LAN interface, ARP=reply-only blocks new dynamic ARP entries and spoofed hosts. [Manual:ARP]
- Permit UDP 500/4500/1701 (IPsec/L2TP) and optionally TCP 8291 (WinBox) on WAN; drop the rest. [Elektroda, ryba884, post #17072347]
- Order filters: drop invalid, accept established/related, then specific accepts; consult RouterOS packet flow. [Manual:Packet Flow]
How do I allow only specific LAN devices on MikroTik?
Use three controls together. Create static DHCP leases bound to each MAC. Set DHCP address-pool to static-only and enable add-arp-for-leases. On the LAN interface, set ARP to reply-only. This combination blocks unknown devices at Layer 2 and prevents rogue DHCP clients. [Elektroda, ryba884, post #17069822]
WinBox stopped working after I set static-only—how do I fix it?
You likely switched to static-only before converting active leases. Keep clients on DHCP. First convert each active lease to static (Make Static). Then change the DHCP server to address-pool=static-only. WinBox will work once your router has a static lease for your MAC. [Elektroda, ryba884, post #17070369]
Will a device with a manual static IP bypass this lock?
No, not with ARP=reply-only and clean ARP entries. If the device’s MAC still exists in the ARP table, it can work until removed. Clear that entry first. “A computer with a fixed address should not be in the router’s ARP table.” [Elektroda, ryba884, post #17081867]
What firewall rules should I use for L2TP/IPsec and WinBox?
Place drop invalid first, then accept established,related. Allow TCP 8291 (WinBox) if needed. Allow UDP 1701 (L2TP), 500 and 4500 (IPsec), and ICMP. Drop all remaining WAN input. Apply NAT masquerade for internet. These 3 UDP ports cover IPsec/L2TP. [Elektroda, ryba884, post #17072347]
Should I restrict L2TP/IPsec by source IP when I roam?
No. If your laptop’s public IP changes, restricting by src-address blocks you. Use src-address filtering only for fixed peer IPs, like branch HQ. Leave it open for roaming users, then secure via credentials and IPsec. [Elektroda, ryba884, post #17086899]
How do I quickly convert current DHCP clients to static leases?
Use the semi-automatic method in Leases.
- Keep a normal address pool and wait for clients to lease.
- In DHCP Server → Leases, select entries and click Make Static.
- Set address-pool=static-only and enable add-arp-for-leases. [Elektroda, ryba884, post #17070369]
Do I need add-arp-for-leases when using ARP reply-only?
Yes. add-arp-for-leases ensures only DHCP-leased IP/MAC pairs populate ARP. With ARP=reply-only, the router responds only for those pairs. This blocks devices that are not on your static lease list. [Elektroda, ryba884, post #17069822]
How do I harden from the inside (LAN to router and inter-VLAN)?
Create input rules that allow only management subnets to reach the router. Limit WinBox to trusted hosts or VPN. Add forward rules to permit only needed inter-VLAN flows. “You can also secure traffic from the inside.” [Elektroda, ryba884, post #17072347]
How can I manage MikroTik securely without exposing WinBox?
Disable TCP/8291 on WAN and manage over a VPN. Establish L2TP/IPsec, then connect WinBox to the router’s LAN address. This avoids exposing management to the internet entirely. The thread author used this approach. [Elektroda, robsonet, post #17072261]
Should I allow ICMP from the WAN, or block it?
Allowing ICMP helps diagnostics and MTU discovery. Many admins keep it permitted while dropping other unsolicited input. You can restrict it later if policy requires. Keep it after established,related and before the final drop. [Elektroda, ryba884, post #17072347]
How do I verify ARP/DHCP enforcement is working?
Clear the device’s ARP entry, then set a manual IP on that device and try access. With ARP=reply-only and no ARP entry, it should fail. If it works, remove stale ARP entries and retest. [Elektroda, ryba884, post #17081867]
How do the ‘drop invalid’ and ‘not dstnat’ rules help against WAN scans?
drop invalid removes malformed states early. The forward rule that drops new, not dstnat connections on WAN blocks unsolicited inbound traffic. Together, they reduce exposure while allowing established sessions. [Elektroda, ryba884, post #17072347]