ITNuvoAkademiya
Academy homePackagesPlaylistsToolsSubnet calculatorSearchGlossary
CiscoCCNA · CCNA: networking fundamentals1. Introduction2. Network Fundamentals3. Network Access4. IP Connectivity5. IP Services6. IPv67. Security Fundamentals8. AutomationCCNP: Enterprise networks · coming soon
LinuxLinux: system administrator üçün · Linux for system administrators1. Getting to know Linux2. Working with text3. Users and permissions4. Processes and packages5. Inside the system6. Monitoring and logs7. NetworkingRed Hat Enterprise Linux · Red Hat Enterprise Linux: from beginner to advanced1. Getting started2. Packages3. Users and permissions4. SELinux5. Services6. Storage7. Networking8. Building services9. Boot and recovery10. DevOps11. Security and monitoring
FortinetFortiGate Administrator · FortiGate Administrator: from first login to ZTNA1. Getting to know FortiGate2. Routing, policy and NAT3. Security profiles4. Users and logs5. Resilience, SD-WAN and automation6. VDOM7. VPN and ZTNA8. Proxy9. DMZ
MonitoringZabbix · Zabbix: from installation to alerts1. Introduction2. Installation and the database3. Basics: groups, templates, users4. Connecting devices5. Alerts, Grafana and the API
VirtualizationProxmox VE · coming soonVMware ESXi · coming soon
My account / Sign in
AZENRU
← itnuvo.com

firewalld: rich rules and port forwarding

Lesson 7.48 minAdvancedDecember 1, 2026

Sign in to read this lesson

A plain service rule gives everyone the same access. But what if SSH must be open only from the admin network, one IP must be blocked completely, and requests to 8080 must be forwarded to port 80 on an internal server? Rich rules, port forwarding and masquerade do this — firewalld's equivalent of Cisco ACLs and NAT.

What you will learn

  • A rich rule combines source, destination, service/port, action and logging in one rule: rule family="ipv4" source address="10.20.0.0/24" service name="ssh" accept.
  • Actions: accept, reject (replies), drop (silently discards); log prefix="..." limit value="3/m" — with logging.
  • Port forward: --add-forward-port=port=8080:proto=tcp:toport=80:toaddr=10.20.0.20 — forwards an incoming port to another port or server.
  • Forwarding to another server and letting an internal network reach the internet need masquerade (--add-masquerade).
  • Checking: --list-rich-rules, --list-forward-ports; use rich rules, not firewall-cmd --direct.

The lesson has 5 key points, an explanation and 5 questions. It opens with a package.