// Module included in the following assemblies:
//
// * networking/ovn_kubernetes_network_provider/editing-egress-firewall-ovn.adoc

:_mod-docs-content-type: PROCEDURE
[id="nw-egress-firewall-edit_{context}"]
= Editing an EgressFirewall custom resource (CR)

[role="_abstract"]
As a cluster administrator, you can update the egress firewall for a project.

.Prerequisites

* A cluster using the OVN-Kubernetes network plugin.
* Install the OpenShift CLI (`oc`).
* You must log in to the cluster as a cluster administrator.

.Procedure

. Find the name of the `EgressFirewall` CR for the project. Replace `<project>` with the name of the project.
+
[source,terminal,subs="attributes+"]
----
$ oc get -n <project> egressfirewall
----

. Optional: If you did not save a copy of the `EgressFirewall` object when you created the egress network firewall, enter the following command to create a copy.
+
[source,terminal,subs="attributes+"]
----
$ oc get -n <project> egressfirewall <name> -o yaml > <filename>.yaml
----
+
Replace `<project>` with the name of the project. Replace `<name>` with the name of the object. Replace `<filename>` with the name of the file to save the YAML to.

. After making changes to the policy rules, enter the following command to replace the `EgressFirewall` CR. Replace `<filename>` with the name of the file containing the updated `EgressFirewall` CR.
+
[source,terminal]
----
$ oc replace -f <filename>.yaml
----
