This is a cache of https://docs.okd.io/4.10/networking/openshift_sdn/viewing-egress-firewall.html. It is a snapshot of the page at 2024-11-21T21:52:56.312+0000.
Viewing an <strong>egress</strong> firewall for a project - OpenShift SDN default CNI network provider | Networking | OKD 4.10
×

As a cluster administrator, you can modify network traffic rules for an existing egress firewall.

Viewing an egressNetworkPolicy object

You can view an egressNetworkPolicy object in your cluster.

Prerequisites
  • A cluster using the OpenShift SDN default Container Network Interface (CNI) network provider plugin.

  • Install the OpenShift Command-line Interface (CLI), commonly known as oc.

  • You must log in to the cluster.

Procedure
  1. Optional: To view the names of the egressNetworkPolicy objects defined in your cluster, enter the following command:

    $ oc get egressnetworkpolicy --all-namespaces
  2. To inspect a policy, enter the following command. Replace <policy_name> with the name of the policy to inspect.

    $ oc describe egressnetworkpolicy <policy_name>
    Example output
    Name:		default
    Namespace:	project1
    Created:	20 minutes ago
    Labels:		<none>
    Annotations:	<none>
    Rule:		Allow to 1.2.3.0/24
    Rule:		Allow to www.example.com
    Rule:		Deny to 0.0.0.0/0