Skip to content

Commit 4986fa1

Browse files
author
Dave
authored
DOCSP-14283 BACKPORT (#369)
1 parent f2913a9 commit 4986fa1

34 files changed

+154
-106
lines changed

source/core/replica-set-architectures.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ interruptions, such as power failures and unexpected reboots.
185185
Hostnames
186186
~~~~~~~~~
187187

188-
.. include:: /includes/tip-hostnames.rst
188+
.. include:: /includes/important-hostnames.rst
189189

190190
Replica Set Naming
191191
------------------

source/core/security-mongodb-configuration.txt

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,10 @@ IP Binding
1313
Overview
1414
--------
1515

16-
.. include:: /includes/fact-default-bind-ip.rst
17-
:start-after: begin-intro
18-
:end-before: end-intro
16+
MongoDB binaries, :binary:`mongod` and :binary:`mongos`, bind to
17+
localhost by default. If the :setting:`net.ipv6` configuration file
18+
setting or the ``--ipv6`` command line option is set for the binary,
19+
the binary additionally binds to the localhost IPv6 address.
1920

2021
Considerations
2122
--------------
@@ -27,9 +28,9 @@ Considerations
2728
has more than one network interface, bind MongoDB programs to the
2829
private or internal network interface.
2930

30-
.. include:: /includes/fact-default-bind-ip.rst
31-
:start-after: begin-override
32-
:end-before: end-override
31+
If the :setting:`net.ipv6` configuration file setting or the ``--ipv6``
32+
command line option is set for the binary, the binary additionally
33+
binds to the localhost IPv6 address.
3334

3435
.. include:: /includes/fact-bind-to-all-ips.rst
3536

source/includes/considerations-deploying-replica-set.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ See :doc:`/core/replica-set-architectures` for more information.
99
Hostnames
1010
~~~~~~~~~
1111

12-
.. include:: /includes/tip-hostnames.rst
12+
.. include:: /includes/important-hostnames.rst
1313

1414
IP Binding
1515
~~~~~~~~~~
Lines changed: 17 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,48 +1,37 @@
1-
.. begin-intro
2-
3-
Starting in MongoDB 3.6, MongoDB binaries, :binary:`~bin.mongod` and
4-
:binary:`~bin.mongos`, bind to localhost by default. If the
5-
:setting:`net.ipv6` configuration file setting or the ``--ipv6``
6-
command line option is set for the binary, the binary additionally binds
7-
to the localhost IPv6 address.
8-
9-
.. end-intro
10-
11-
Previously, starting from MongoDB 2.6, only the binaries from the
12-
official MongoDB RPM (Red Hat, CentOS, Fedora Linux, and derivatives)
13-
and DEB (Debian, Ubuntu, and derivatives) packages bind to localhost by
14-
default.
1+
.. include:: /includes/warning-bind-ip-security-considerations.rst
152

16-
When bound only to the localhost, these MongoDB 3.6 binaries can only
17-
accept connections from clients (including :binary:`~bin.mongosh` and
18-
other members of your deployment in replica sets and sharded clusters)
19-
that are running on the same machine. Remote clients cannot connect to
20-
the binaries bound only to localhost.
3+
MongoDB binaries, :binary:`~bin.mongod` and :binary:`~bin.mongos`, bind
4+
to localhost by default. If the :setting:`net.ipv6` configuration file
5+
setting or the ``--ipv6`` command line option is set for the binary,
6+
the binary additionally binds to the localhost IPv6 address.
217

22-
.. begin-override
8+
By default :binary:`~bin.mongod` and :binary:`~bin.mongos` that are
9+
bound to localhost only accept connections from clients that are
10+
running on the same computer. This binding behavior includes
11+
:binary:`~bin.mongosh` and other members of your replica set or sharded
12+
cluster. Remote clients cannot connect to binaries that are bound only
13+
to localhost.
2314

24-
To override and bind to other ip addresses, you can use the
25-
:setting:`net.bindIp` configuration file setting or the
26-
``--bind_ip`` command-line option to specify a list of hostnames or ip
27-
addresses.
15+
To override the default binding and bind to other IP addresses, use the
16+
:setting:`net.bindIp` configuration file setting or the ``--bind_ip``
17+
command-line option to specify a list of hostnames or IP addresses.
2818

29-
.. include:: /includes/warning-bind-ip-security-considerations.rst
19+
.. include:: /includes/warning-no-ip-addresses-in-split-horizons.rst
3020

3121
For example, the following :binary:`~bin.mongod` instance binds to both
3222
the localhost and the hostname ``My-Example-Associated-Hostname``, which is
33-
associated with the ip address ``198.51.100.1``:
23+
associated with the IP address ``198.51.100.1``:
3424

3525
.. code-block:: none
3626
3727
mongod --bind_ip localhost,My-Example-Associated-Hostname
3828
3929
In order to connect to this instance, remote clients must specify
40-
the hostname or its associated ip address ``198.51.100.1``:
30+
the hostname or its associated IP address ``198.51.100.1``:
4131

4232
.. code-block:: none
4333
4434
mongosh --host My-Example-Associated-Hostname
4535
4636
mongosh --host 198.51.100.1
4737
48-
.. end-override
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
To configure cluster nodes for `split horizon DNS
2+
<https://en.wikipedia.org/wiki/Split-horizon_DNS>`__, use host names
3+
instead of IP addresses.
4+
5+
Starting in MongoDB v5.0, :dbcommand:`replSetInitiate` and
6+
:dbcommand:`replSetReconfig` reject configurations that use IP
7+
addresses instead of hostnames.
8+
9+
Use :parameter:`disableSplitHorizonIPCheck` to modify nodes that
10+
cannot be updated to use host names. The parameter only applies to the
11+
configuration commands.
12+
13+
:binary:`mongod` and :binary:`mongos` do not rely on
14+
:parameter:`disableSplitHorizonIPCheck` for validation at startup.
15+
Legacy :binary:`mongod` and :binary:`mongos` instances that use IP
16+
addresses instead of host names will start after an upgrade.
17+
18+
Instances that are configured with IP addresses log a warning to use
19+
host names instead of IP addresses.
20+
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
.. important::
2+
3+
To avoid configuration updates due to IP address changes, use DNS
4+
hostnames instead of IP addresses. It is particularly important to
5+
use a DNS hostname instead of an IP address when configuring replica
6+
set members or sharded cluster members.
7+
8+
Use hostnames instead of IP addresses to configure clusters across a
9+
split network horizon. Starting in MongDB 5.0, nodes that are only
10+
configured with an IP address will fail startup validation and will
11+
not start.
12+

source/includes/steps-convert-replica-set-add-new-shard.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ pre: |
4747
4848
.. include:: /includes/fact-rs-initiate-once-only.rst
4949
50-
.. include:: /includes/tip-hostnames.rst
50+
.. include:: /includes/important-hostnames.rst
5151
action:
5252
copyable: true
5353
language: javascript

source/includes/steps-convert-replica-set-shard-deploy-infrastructure.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ action:
2727
2828
.. include:: /includes/fact-rs-initiate-once-only.rst
2929
30-
.. include:: /includes/tip-hostnames.rst
30+
.. include:: /includes/important-hostnames.rst
3131
language: javascript
3232
code: |
3333
rs.initiate( {

source/includes/steps-deploy-replica-set-with-auth.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ action:
7979
mongod --keyFile <path-to-keyfile> --replSet <replicaSetName> --bind_ip localhost,<hostname(s)|ip address(es)>
8080
post: |
8181
82-
.. include:: /includes/tip-hostnames.rst
82+
.. include:: /includes/important-hostnames.rst
8383
8484
For more information on command-line options, see the
8585
:binary:`~bin.mongod` reference page.
@@ -116,7 +116,7 @@ action:
116116
117117
.. include:: /includes/fact-rs-initiate-once-only.rst
118118
119-
.. include:: /includes/tip-hostnames.rst
119+
.. include:: /includes/important-hostnames.rst
120120
121121
language: javascript
122122
code: |

source/includes/steps-deploy-replica-set.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ pre: |
107107
108108
.. include:: /includes/fact-rs-initiate-once-only.rst
109109
110-
.. include:: /includes/tip-hostnames.rst
110+
.. include:: /includes/important-hostnames.rst
111111
action:
112112
language: javascript
113113
code: |

0 commit comments

Comments
 (0)