@@ -10,19 +10,6 @@ Input: filters traffic destined for the firewall
10
10
11
11
Output: filters traffic from the firewall
12
12
13
- By default, ``iptables`` allows all connections so it's a good idea
14
- to change the default chain policy to DROP:
15
-
16
- .. code-block:: sh
17
-
18
- iptables -P INPUT DROP
19
-
20
- iptables -P OUTPUT DROP
21
-
22
- This ensures that any traffic to/from the :program:`mongod` server has
23
- to be explicitly allowed. Be careful when executing these commands that
24
- you do not lose access to the server.
25
-
26
13
Traffic to/from a Standalone MongoDB Instance or Replica-Set
27
14
MongoDB Instance (mongod)
28
15
@@ -103,6 +90,25 @@ In a sharded infrastructure, the :program:`mongos` router needs
103
90
to connect to :program:`mongod` shard servers and the shard servers
104
91
need to connect and communicate amongst themselves.
105
92
93
+
94
+ Default Policy
95
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
96
+
97
+ By default, ``iptables`` allows all connections so it's a good idea
98
+ to change the default chain policy to DROP:
99
+
100
+ .. code-block:: sh
101
+
102
+ iptables -P INPUT DROP
103
+
104
+ iptables -P OUTPUT DROP
105
+
106
+
107
+ This ensures that any traffic to/from the :program:`mongod` server has
108
+ to be explicitly allowed. Be careful when executing these commands that
109
+ you do not lose access to the server, i.e. ensure you do this on a
110
+ console connection or already have remote-access iptables rules.
111
+
106
112
Back-Out & Flush iptables rules
107
113
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
108
114
0 commit comments