A new MikroTik shares the internet out of the box, but its default configuration is meant for a home, not an office, and plenty of routers on the internet still expose Winbox, the web interface and DNS. Here is the minimum worth doing in the first 15 minutes: updates, accounts, management access, the firewall and a backup.

1. Update RouterOS and the bootloader

Old Winbox vulnerabilities were used to pull routers into botnets en masse, so start with an update. Choose the stable or long-term channel:

/system package update set channel=stable
/system package update check-for-updates
/system package update install

After the reboot, upgrade the bootloader and reboot once more:

/system routerboard upgrade

2. Your own administrator instead of admin

Password guessing targets the admin login first. Create an administrator with your own name and a long password, log in as that user, then disable or remove admin:

/user add name=ivan group=full password="a-long-password"
/user disable admin

A password of 16 characters or more is easy to get from the password generator.

3. Management only from your own network

Turn off the services you do not need: telnet, ftp, www, api, api-ssl. Leave Winbox and SSH open only to the local network or the administrator's address:

/ip service disable telnet,ftp,www,api,api-ssl
/ip service set winbox address=192.168.88.0/24
/ip service set ssh address=192.168.88.0/24

A few more places where the router shows itself to the outside:

4. Firewall: allow first, then drop

The default firewall is decent, but it is often broken by deleting "unneeded" rules. A proper input chain for the router looks like this:

  1. accept established and related connections;
  2. drop invalid packets;
  3. accept ICMP;
  4. accept everything from the local network (the LAN interface list);
  5. drop everything else.

The forward chain is built the same way, and port forwards are allowed with a "connection-nat-state=dstnat" rule. Do not forget IPv6: if your provider hands it out, /ipv6 firewall needs its own rules, or devices on your network will be reachable from the internet directly.

Do not lock yourself out. Before changing the firewall, turn on safe mode — Ctrl+X in the terminal or the Safe Mode button in Winbox. If the connection drops, the router undoes the changes itself.

This whole set — services, the IPv4 and IPv6 firewall, MAC access, a new administrator — is built in one script by MikroTik basic protection, and brute-force protection adds blocking of scanners and password guessing.

5. Check the result

Run /export and paste the output into the MikroTik configuration audit: it finds open services, a missing drop rule in input, open DNS, suspicious scripts and port forwards. From the outside — a phone without Wi-Fi or another server — check that ports 8291 (Winbox), 22, 80 and 53 are closed.

To see why a particular packet passes or is dropped, use the firewall packet path page.

6. Backup and time

What next

Once the basics are in place, you can tidy up the network: fixed DHCP addresses, VLANs, guest Wi-Fi, port forwarding and a second provider. The last two are covered in detail in the articles on port forwarding and on two providers.