MikroTik MTCSE lab 2 of 10
Stateful firewall: packet flow, chains, connection tracking and ICMP
Fernvale Harbourside's router routes and NATs but filters nothing, so a host on the ISP's segment can reach the private staff LAN directly. Build a stateful firewall the way RouterOS's own default configuration does: an input chain that protects the router, a forward chain that protects the LAN and DMZ while keeping the published web server reachable, a custom chain for ICMP that keeps path MTU discovery working, and FastTrack for established traffic.
Run this lab
It needs Lite: its 4 nodes are set to 4 vCPU and 1,024 MB in total. That fits the free demo too.
In your workspace: Shared, then MikroTik MTCSE RouterOS v7 guided labs, then 02 - Stateful firewall - packet flow chains connection tracking and ICMP
- Level
- Intermediate
- Time
- About 70 minutes
- Nodes need
- 4 vCPU, 1,024 MB
- Smallest plan
- Lite
The scenario
Harbourside's router, GW, now has hardened services (lab 1 did that on its sister router), but no firewall at all. It routes between the ISP, the staff LAN and a DMZ with Fernvale's public web server, and it publishes that server on its WAN address with a dst-nat rule. The ISP's router, WESTLINK, stands for anything on the ISP segment: it has routes to the private LAN and DMZ through GW, exactly as a hostile neighbour could add. Build GW a stateful firewall.
| Device | Interface | Address |
|---|---|---|
| GW | ether1 (WAN) · ether2 (LAN) · ether3 (DMZ) | 203.0.113.2/29 · 192.168.40.1/24 · 172.16.40.1/24 |
| WESTLINK | ether1 · internet | 203.0.113.1/29 · 198.18.0.1/24 |
| PC | ether1 | 192.168.40.10/24 |
| WEB (WebFig stands in for a web site) | ether1 | 172.16.40.10/24, published as 203.0.113.2 port 80 |
The policy: the LAN may go anywhere; the DMZ may reach the Internet but not the LAN; the Internet may reach only the published web server; only the LAN may manage GW; ping to GW is allowed but rate-limited.
What you’ll practise
- Place the input, forward and output chains in the packet flow
- Use connection states to accept return traffic and drop invalid packets
- Protect the router with the input chain and the networks with the forward chain
- Filter ICMP in a custom chain without breaking path MTU discovery or traceroute
- Allow published services with connection-nat-state=dstnat and rate-limit with limit
The tasks
- See the problem
- Protect the router: the input chain
- ICMP: filter it, don't block it
- Protect the networks: the forward chain
- Read the connection table
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 WESTLINKether1 - GW
ether2to PCether1 - GW
ether3to WEBether1
| 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 |
| PC | MikroTik RouterOS | mikrotik-7.14.2 | 1 vCPU, 256 MB |
| WEB | MikroTik RouterOS | mikrotik-7.14.2 | 1 vCPU, 256 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
02 - Stateful firewall - packet flow chains connection tracking and ICMPand 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.