// Module included in the following assemblies:
//
// * microshift_networking/microshift-firewall.adoc

:_mod-docs-content-type: PROCEDURE
[id="microshift-firewall-optional-settings_{context}"]
= Using optional port settings

[role="_abstract"]
To allow external access to services and APIs in {microshift-short}, you can add custom ports to your firewall configuration. Use the listed ports and protocols as a guide for HTTP, HTTPS, NodePort, mDNS, and API access.

For a complete list of ports and protocols, see "Optional ports".

The following examples show commands to open firewall access for services running on {microshift-short}.

.Procedure

* To add customized ports to your firewall configuration, use the following command syntax:
+
[source,terminal]
----
$ sudo firewall-cmd --permanent --zone=public --add-port=<port number>/<port protocol>
----
+
For example, to configure a port for the {microshift-short} API server, enter the following command:
+
[source,terminal]
----
$ sudo firewall-cmd --permanent --zone=public --add-port=6443/tcp
----
+
To close unnecessary ports in your {microshift-short} instance, follow the procedure in "Closing unused or unnecessary ports to enhance network security".