Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Adapt the default config to bind on IPv6. #2232

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 9 additions & 8 deletions synapse/config/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -177,13 +177,14 @@ def default_config(self, server_name, **kwargs):
port: %(bind_port)s

# Local addresses to listen on.
# This will listen on all IPv4 addresses by default.
# On Linux and Mac OS, this will listen on all IPv4 and IPv6
# addresses by default. For most other OSes, this will only listen
# on IPv6.
bind_addresses:
- '0.0.0.0'
# Uncomment to listen on all IPv6 interfaces
# N.B: On at least Linux this will also listen on all IPv4
# addresses, so you will need to comment out the line above.
# - '::'
- '::'
# For systems other than Linux or Mac OS, uncomment the next line
# to also listen on IPv4.
#- '0.0.0.0'

# This is a 'http' listener, allows us to specify 'resources'.
type: http
Expand Down Expand Up @@ -214,7 +215,7 @@ def default_config(self, server_name, **kwargs):
# For when matrix traffic passes through loadbalancer that unwraps TLS.
- port: %(unsecure_port)s
tls: false
bind_addresses: ['0.0.0.0']
bind_addresses: ['::']
type: http

x_forwarded: false
Expand All @@ -228,7 +229,7 @@ def default_config(self, server_name, **kwargs):
# Turn on the twisted ssh manhole service on localhost on the given
# port.
# - port: 9000
# bind_address: 127.0.0.1
# bind_addresses: ['::1', '127.0.0.1']
# type: manhole
""" % locals()

Expand Down