Skip to content

Commit 56092b9

Browse files
committed
Let Apache use separate IPv4 and IPv6 sockets for listening to any
Enable the use of two separate sockets for IPv4 and IPv6 when LISTEN_ALL_INTERFACES is set to true. While desirable, on Linux Apache uses IPv4-mapped IPv6 addresses by default, thus leveraging a single IPv6 socket for IPv4 connections as well. This behaviour is far from being desirable and can be disabled at compile time via the "--disable-v4-mapped" flag, so make sure both an ANY address Listen directive is present for both IPv4 and IPv6. When Apache is compiled with "--enable-v4-mapped", the IPv4 socket will be simply ignored. Please see https://httpd.apache.org/docs/2.4/bind.html for more information. Signed-off-by: Marco Chiappero <[email protected]>
1 parent 4c56515 commit 56092b9

File tree

4 files changed

+8
-4
lines changed

4 files changed

+8
-4
lines changed

ironic-config/apache2-ipxe.conf.j2

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
Listen {{ env.IPXE_TLS_PORT }}
1+
Listen 0.0.0.0:{{ env.IPXE_TLS_PORT }}
2+
Listen [::]:{{ env.IPXE_TLS_PORT }}
23

34
<VirtualHost *:{{ env.IPXE_TLS_PORT }}>
45
ErrorLog /dev/stderr

ironic-config/apache2-vmedia.conf.j2

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
Listen {{ env.VMEDIA_TLS_PORT }}
1+
Listen 0.0.0.0:{{ env.VMEDIA_TLS_PORT }}
2+
Listen [::]:{{ env.VMEDIA_TLS_PORT }}
23

34
<VirtualHost *:{{ env.VMEDIA_TLS_PORT }}>
45
ErrorLog /dev/stderr

ironic-config/httpd-ironic-api.conf.j2

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@
1212

1313

1414
{% if env.LISTEN_ALL_INTERFACES | lower == "true" %}
15-
Listen {{ env.IRONIC_LISTEN_PORT }}
15+
Listen 0.0.0.0:{{ env.IRONIC_LISTEN_PORT }}
16+
Listen [::]:{{ env.IRONIC_LISTEN_PORT }}
1617
<VirtualHost *:{{ env.IRONIC_LISTEN_PORT }}>
1718
{% else %}
1819
{% if env.ENABLE_IPV4 %}

ironic-config/httpd.conf.j2

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
ServerRoot {{ env.HTTPD_DIR }}
22
{%- if env.LISTEN_ALL_INTERFACES | lower == "true" %}
3-
Listen {{ env.HTTP_PORT }}
3+
Listen 0.0.0.0:{{ env.HTTP_PORT }}
4+
Listen [::]:{{ env.HTTP_PORT }}
45
{% else %}
56
{% if env.ENABLE_IPV4 %}
67
Listen {{ env.IRONIC_IP }}:{{ env.HTTP_PORT }}

0 commit comments

Comments
 (0)