@@ -10,6 +10,10 @@ Configure Windows ``netsh`` Firewall for MongoDB
10
10
:depth: 1
11
11
:class: singlecol
12
12
13
+ .. facet::
14
+ :name: genre
15
+ :values: tutorial
16
+
13
17
On Windows Server systems, the ``netsh`` program provides
14
18
methods for managing the :guilabel:`Windows Firewall`. These firewall rules make it possible
15
19
for administrators to control what hosts can connect to the system,
@@ -209,16 +213,16 @@ servers, and the :binary:`mongos.exe` instances.
209
213
210
214
.. include:: /includes/fact-deprecated-http-interface.rst
211
215
212
- Manage and Maintain * Windows Firewall* Configurations
213
- -----------------------------------------------------
216
+ Manage Windows Firewall Configurations
217
+ --------------------------------------
214
218
215
219
This section contains a number of basic operations for managing and
216
220
using ``netsh``. While you can use the GUI front ends to manage the
217
221
:guilabel:`Windows Firewall`, all core functionality is accessible is
218
222
accessible from ``netsh``.
219
223
220
- Delete all * Windows Firewall* Rules
221
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
224
+ Delete Windows Firewall Rules for Default MongoDB Ports
225
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
222
226
223
227
To delete the firewall rule allowing :binary:`mongod.exe` traffic:
224
228
@@ -228,40 +232,43 @@ To delete the firewall rule allowing :binary:`mongod.exe` traffic:
228
232
229
233
netsh advfirewall firewall delete rule name="Open mongod shard port 27018" protocol=tcp localport=27018
230
234
231
- List All * Windows Firewall* Rules
232
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
235
+ List All Windows Firewall Rules
236
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
233
237
234
238
To return a list of all :guilabel:`Windows Firewall` rules:
235
239
236
240
.. code-block:: bat
237
241
238
242
netsh advfirewall firewall show rule name=all
239
243
240
- Reset * Windows Firewall*
241
- ~~~~~~~~~~~~~~~~~~~~~~~~
244
+ Reset Windows Firewall
245
+ ~~~~~~~~~~~~~~~~~~~~~~
242
246
243
247
To reset the :guilabel:`Windows Firewall` rules:
244
248
245
249
.. code-block:: bat
246
250
247
251
netsh advfirewall reset
248
252
249
- Backup and Restore * Windows Firewall* Rules
250
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
253
+ Backup and Restore Windows Firewall Rules
254
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
251
255
252
- To simplify administration of larger collection of systems, you can export or
253
- import firewall systems from different servers) rules very easily on Windows:
256
+ To simplify administration of larger systems, you can export or import
257
+ Windows Firewall rules.
254
258
255
- Export all firewall rules with the following command:
259
+ - To export all Windows Firewall rules, run the following command:
256
260
257
- .. code-block:: bat
261
+ .. code-block:: bat
258
262
259
- netsh advfirewall export "C:\temp\MongoDBfw.wfw"
263
+ netsh advfirewall export "C:\temp\MongoDBfw.wfw"
260
264
261
- Replace ``"C:\temp\MongoDBfw.wfw"`` with a path of your choosing. You
262
- can use a command in the following form to import a file created using
263
- this operation:
265
+ Replace ``"C:\temp\MongoDBfw.wfw"`` with a path of your choosing.
264
266
265
- .. code-block:: bat
267
+ - To import Windows Firewall rules, run the following command:
268
+
269
+ .. code-block:: bat
270
+
271
+ netsh advfirewall import "C:\temp\MongoDBfw.wfw"
266
272
267
- netsh advfirewall import "C:\temp\MongoDBfw.wfw"
273
+ Replace ``"C:\temp\MongoDBfw.wfw"`` with the path to the file that
274
+ contains your Windows Firewall rules.
0 commit comments