summary refs log tree commit diff
path: root/nixos/doc/manual/configuration
diff options
context:
space:
mode:
authorrnhmjoj <rnhmjoj@inventati.org>2017-12-10 14:36:44 +0100
committerrnhmjoj <rnhmjoj@inventati.org>2017-12-21 00:46:34 +0100
commit63af1f78075ace8893d5a49899b38c558cf6441d (patch)
tree3734c650b4ac2a931bb867552f521a5f67f254d8 /nixos/doc/manual/configuration
parentfa822161b984289a60f7b949fd797f943ca44cce (diff)
downloadnixpkgs-63af1f78075ace8893d5a49899b38c558cf6441d.tar
nixpkgs-63af1f78075ace8893d5a49899b38c558cf6441d.tar.gz
nixpkgs-63af1f78075ace8893d5a49899b38c558cf6441d.tar.bz2
nixpkgs-63af1f78075ace8893d5a49899b38c558cf6441d.tar.lz
nixpkgs-63af1f78075ace8893d5a49899b38c558cf6441d.tar.xz
nixpkgs-63af1f78075ace8893d5a49899b38c558cf6441d.tar.zst
nixpkgs-63af1f78075ace8893d5a49899b38c558cf6441d.zip
nixos/doc: document the firewall port ranges options
Diffstat (limited to 'nixos/doc/manual/configuration')
-rw-r--r--nixos/doc/manual/configuration/firewall.xml19
1 files changed, 16 insertions, 3 deletions
diff --git a/nixos/doc/manual/configuration/firewall.xml b/nixos/doc/manual/configuration/firewall.xml
index 87406c28c2f..75cccef95b3 100644
--- a/nixos/doc/manual/configuration/firewall.xml
+++ b/nixos/doc/manual/configuration/firewall.xml
@@ -23,10 +23,23 @@ networking.firewall.allowedTCPPorts = [ 80 443 ];
 </programlisting>
 
 Note that TCP port 22 (ssh) is opened automatically if the SSH daemon
-is enabled (<option>services.openssh.enable = true</option>).  UDP
+is enabled (<option>services.openssh.enable = true</option>). UDP
 ports can be opened through
-<option>networking.firewall.allowedUDPPorts</option>.  Also of
-interest is
+<option>networking.firewall.allowedUDPPorts</option>.</para>
+
+<para>To open ranges of TCP ports:
+
+<programlisting>
+networking.firewall.allowedTCPPortRanges = [
+  { from = 4000; to = 4007; }
+  { from = 8000; to = 8010; }
+];
+</programlisting>
+
+Similarly, UDP port ranges can be opened through
+<option>networking.firewall.allowedUDPPortRanges</option>.</para>
+
+<para>Also of interest is
 
 <programlisting>
 networking.firewall.allowPing = true;