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

Solution Verified - Updated -

Issue

  • 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?

Environment

  • 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 of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In