Skip to content

Commit b8b26c8

Browse files
authored
Merge pull request #65738 from kelbrown20/OSDOCS-4549-ms-firewall-updates
OSDOCS#4549: Adding docs for exposing services on firewalls
2 parents e1f5eb4 + c72f577 commit b8b26c8

File tree

2 files changed

+23
-0
lines changed

2 files changed

+23
-0
lines changed

microshift_networking/microshift-firewall.adoc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@ include::modules/microshift-firewall-apply-settings.adoc[leveloffset=+1]
2929

3030
include::modules/microshift-firewall-verify-settings.adoc[leveloffset=+1]
3131

32+
include::modules/microshift-firewall-update-for-service.adoc[leveloffset=+1]
33+
3234
[id="additional-resources_microshift-using-a-firewall_{context}"]
3335
[role="_additional-resources"]
3436
== Additional resources
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
// Module included in the following assemblies:
2+
//
3+
// * microshift_networking/microshift-firewall.adoc
4+
5+
:_content-type: CONCEPT
6+
[id="microshift-firewall-update-for-service_{context}"]
7+
= Overview of firewall ports when a service is exposed
8+
9+
Firewalld is often active when you run services on {microshift-short}. This can disrupt certain services on {microshift-short} because traffic to the ports might be blocked by the firewall. You must ensure that the necessary firewall ports are open if you want certain services to be accessible from outside the host. There are several options for opening your ports:
10+
11+
* Services of the `NodePort` and `LoadBalancer` type are automatically available with OVN-Kubernetes.
12+
+
13+
In these cases, OVN-Kubernetes adds iptables rules so the traffic to the node IP address is delivered to the relevant ports. This is done using the PREROUTING rule chain and is then forwarded to the OVN-K to bypass the firewalld rules for local host ports and services. Iptables and firewalld are backed by nftables in {rhel-major}. The nftables rules, which the iptables generates, always has priority over the rules that the firewalld generates.
14+
15+
* Pods with the `HostPort` parameter settings are automatically available. This also includes the `router-default` pod, which uses ports 80 and 443.
16+
+
17+
For `HostPort` pods, the CRI-O config sets up iptables DNAT (Destination Network Address Translation) to the pod's IP address and port.
18+
19+
These methods function for clients whether they are on the same host or on a remote host. The iptables rules, which are added by OVN-Kubernetes and CRI-O, attach to the PREROUTING and OUTPUT chains. The local traffic goes through the OUTPUT chain with the interface set to the `lo` type. The DNAT runs before it hits filler rules in the INPUT chain.
20+
21+
Because the {microshift-short} API server does not run in CRI-O, it is subject to the firewall configurations. You can open port 6443 in the firewall to access the API server in your {microshift-short} cluster.

0 commit comments

Comments
 (0)