How to filter outbound or outgoing network traffic using firewall-cmd?

Solution Verified - Updated -


  • How to filter outgoing network traffic using firewall-cmd?
  • Is it intended to filter outbound traffic with firewalld?
  • Is there a possibility to filter in firewalld as with iptables?
  • If I know how to write a rule in iptables but not in firewalld, do I have to switch back to iptables for that use case?
  • Are firewalld rich rules and direct rules permanent or runtime only?


  • Red Hat Enterprise Linux 7
  • Red Hat Enterprise Linux 8
  • firewalld firewall

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content