Skip to content

Commit

Permalink
Adapt the default config to bind on IPv6.
Browse files Browse the repository at this point in the history
Most deployments are on Linux (or Mac OS), so this would actually bind
on both IPv4 and IPv6.

Resolves matrix-org#1886.

Signed-off-by: Willem Mulder <willemmaster@hotmail.com>
  • Loading branch information
14mRh4X0r committed May 31, 2017
1 parent f33df30 commit 4029f5a
Showing 1 changed file with 9 additions and 8 deletions.
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

0 comments on commit 4029f5a

Please sign in to comment.