Skip to main content

22 docs tagged with "firewall"

View all tags

Building Advanced Firewall

This page guides building an advanced firewall on MikroTik RouterOS by configuring interface lists, filtering rules for IPv4 and IPv6, accepting ICMP/DHCPv6 while blocking invalid addresses, and managing traffic flows between WAN and LAN interfaces.

Common Firewall Matchers and Actions

Commands and rules that are common to the firewall filter, NAT, mangle and RAW tables of RouterOS: view and reset the rule counters, show or hide dynamic rules, and the order in which the matchers of a rule are checked.

Connection rate

Connection Rate is a MikroTik RouterOS firewall feature that monitors and filters traffic based on connection speed, using 'connection-bytes' and 'connection-rate' to detect high-speed connections for prioritization or throttling.

Connection tracking

Connection tracking records the connections that pass through or end at the router. It is the basis of the stateful firewall and NAT: view the connection list, use connection states in firewall rules, adjust the timeouts, and FastTrack established connections.

DDoS protection

Limit denial-of-service attacks with RouterOS firewall rules: count new connections per source and destination with dst-limit, put pairs that exceed the rate on address lists and drop them in the raw table. Covers how the detection works, its limits, protecting the router itself, SYN floods with TCP SYN cookies and why SYN-ACK floods are dropped as invalid.

Filter

The firewall filter of RouterOS accepts or drops packets in the input, forward and output chains. Add rules to the default firewall, for example to allow a service from the internet, block a device or isolate a guest network, or build an IPv4 and IPv6 firewall from the start.

Firewall

Overview of the RouterOS firewall: the filter, NAT, mangle and RAW tables, their predefined chains, how the rules of a chain are processed, and how to group rules in your own chains.

Firewall and QoS Case Studies

This page presents practical case studies for configuring firewall and QoS rules in MikroTik RouterOS, covering brute-force prevention, DDoS protection, connection rate limiting, port knocking, and advanced firewall designs.

Firewall and Quality of Service

This section provides an overview of RouterOS firewall capabilities including NAT, connection tracking, and QoS features for securing traffic, classifying packets, and managing bandwidth.

Firewall and routing for IPsec

Firewall and routing for IPsec in RouterOS: allow IKE and ESP, accept only traffic that came through IPsec, drop unencrypted traffic with a policy, and make a tunnel use a certain WAN link or public address.

First Time Configuration

This page provides a step-by-step guide for first-time MikroTik RouterOS configuration, covering prerequisites, connection setup, and key concepts like DHCP, NAT, and firewall. It includes both WinBox graphical and CLI methods for new and advanced users.

HotSpot - Captive portal

Set up a HotSpot (captive portal) in RouterOS: run the setup, add users and user profiles with rate and time limits, select the login methods, let selected traffic through without login, and authenticate against a RADIUS server.

Layer7

Layer7 protocol inspection matches regular expressions against the payload of IPv4 ICMP, TCP and UDP streams. The page covers the inspection window, direction requirements, regular expression syntax, examples for RDP and Telnet, and troubleshooting.

Packet Flow in RouterOS

The order in which RouterOS facilities process a packet: bridging, routing, MPLS, the firewall chains, NAT, queues, IPsec, VRF, FastPath and FastTrack, with the packet flow diagrams.

Port knocking

Port knocking keeps the management ports of a RouterOS router closed until a client connects to a secret sequence of ports; the firewall then adds the client to a trusted address list. Covers the knock rules in the default firewall, knocking from a client, a blacklist against port scans, a passphrase knock with layer 7, and checking the lists.

RAW

The RAW firewall table in RouterOS processes packets before connection tracking. Use it to drop unwanted packets early, or to exclude traffic from connection tracking with action=notrack.

Securing your router

This page provides security recommendations for MikroTik RouterOS, including upgrading RouterOS versions, changing default usernames and passwords, securing access with firewall rules and VPNs, disabling unnecessary services like MAC-Telnet and Neighbor Discovery, and managing DNS caching to enhance router security.

Services

The /ip/service menu lists the RouterOS management services (WinBox, SSH, Telnet, FTP, web server, API) and the ports other features and containers listen on. The page shows how to see what the router listens on, limit services to trusted addresses, move them to a management VRF, and lists the ports and IP protocols RouterOS uses.

Socksify

Socksify forwards traffic chosen by firewall NAT rules through an upstream SOCKS5 server, so applications without SOCKS support can use a SOCKS proxy. Includes a Tor proxy example.

Software Specifications

This page outlines RouterOS software specifications covering hardware compatibility, installation methods, configuration tools, backup/restore capabilities, firewall features, routing protocols, and MPLS support for MikroTik devices.

SSH brute-force protection

Protect an internet-facing SSH service on RouterOS with firewall rules that count new connections per source address and block a source that opens too many in a short time. Covers what to do before exposing SSH, placing the rules in the default firewall, exempting trusted addresses, IPv6, checking and unblocking, and how many password guesses the rules still allow.

Web Proxy

The RouterOS web proxy fetches web content for the clients on your network. It filters requests by host name, path and method, caches plain HTTP content, sends requests through a parent proxy, and works as a regular or transparent proxy.