MikroTik MTCSE lab 4 of 10
Brute force, port scans and port knocking with address lists
Fernvale's on-call engineer needs SSH to the Harbourside router from anywhere, and the Internet has noticed. Use dynamic address lists to blacklist sources that open connection after connection to SSH, catch port scanners with PSD and a Telnet honeypot and drop them in RAW, then hide SSH completely behind a port-knocking sequence that only the engineer knows.
Run this lab
It needs Lite: its 4 nodes are set to 4 vCPU and 1,536 MB in total. That fits the free demo too.
In your workspace: Shared, then MikroTik MTCSE RouterOS v7 guided labs, then 04 - Brute force port scans and port knocking with address lists
- Level
- Advanced
- Time
- About 70 minutes
- Nodes need
- 4 vCPU, 1,536 MB
- Smallest plan
- Lite
The scenario
Harbourside's router GW lets SSH in from anywhere, because the on-call engineer may need it at 3 a.m. from a hotel. Every scanner on the Internet has found it too. You'll fight back in three layers: blacklist sources that keep opening SSH connections, catch port scanners and drop them before they cost anything, and finally hide SSH behind a port-knocking sequence so that, to everyone except the engineer, port 22 is simply closed.
| Device | Address | Role |
|---|---|---|
| GW | 203.0.113.2/29 (WAN), 192.168.40.1/24 (LAN) | Fernvale's router |
| WESTLINK | 203.0.113.1/29 | the ISP |
| ONCALL (Linux) | 203.0.113.5/29 | the on-call engineer's laptop |
| ATT (Linux) | 203.0.113.6/29 | a scanner and password guesser |
What you’ll practise
- Build staged address-list rules that blacklist SSH brute-force sources
- Detect port scans with psd and a honeypot port, and drop scanners before connection tracking
- Hide a service behind a port-knocking sequence with timed address lists
- Read address lists, their timeouts and the counters that filled them
The tasks
- Address the Linux hosts
- Blacklist SSH brute force
- Catch port scanners
- Hide SSH behind port knocking
- Watch the scanner give up
The Lab Tasks pane has the scenario, these tasks, the checks to run, hints and the full solution.
Topology and devices
The network as it opens in EVE-NG, drawn from the lab’s own canvas, and the image each node runs.
Every link, as text
- GW
ether1to Internet (network) - WESTLINK
ether1to Internet (network) - ONCALL
eth0to Internet (network) - ATT
eth0to Internet (network)
| Node | Device | Image in Add Node | Set to |
|---|---|---|---|
| GW | MikroTik RouterOS | mikrotik-7.14.2 | 1 vCPU, 256 MB |
| WESTLINK | MikroTik RouterOS | mikrotik-7.14.2 | 1 vCPU, 256 MB |
| ONCALL | Alpine Linux | clbalpinebase-alpine-base-3-20-3 | 1 vCPU, 512 MB |
| ATT | Alpine Linux | clbalpinebase-alpine-base-3-20-3 | 1 vCPU, 512 MB |
How to open this lab
Sign in to your workspace at
lab.cloudlabbox.com.In File Manager, open Shared, then the folder
MikroTik MTCSE RouterOS v7 guided labs.Open
04 - Brute force port scans and port knocking with address listsand start its nodes, then open Lab Tasks for the scenario and the steps.
The lab is read-only. You can start the nodes and configure the devices, but changes to the topology can’t be saved. To change it, rebuild it in your own folder.
More MikroTik MTCSE labs
Related labs in other courses
CloudLabBox is independent of MikroTik. The lab follows exam topics and isn’t vendor training material; vendor names identify the exams and the images in the workspace.