summary refs log tree commit diff
path: root/nixos/modules/services/networking/nat.nix
diff options
context:
space:
mode:
authorzimbatm <zimbatm@zimbatm.com>2017-12-04 12:05:05 +0000
committerGitHub <noreply@github.com>2017-12-04 12:05:05 +0000
commit3807408c383b57805d27eb8293bd19cac591291a (patch)
tree099e98855804e0bda7a06e16621148b3a3edd9b0 /nixos/modules/services/networking/nat.nix
parent852fe5582292ce5ea826673da9497c75fc04139d (diff)
parenta8f1ebf52c9a30b0beef2d4c895aa28e5e644921 (diff)
downloadnixpkgs-3807408c383b57805d27eb8293bd19cac591291a.tar
nixpkgs-3807408c383b57805d27eb8293bd19cac591291a.tar.gz
nixpkgs-3807408c383b57805d27eb8293bd19cac591291a.tar.bz2
nixpkgs-3807408c383b57805d27eb8293bd19cac591291a.tar.lz
nixpkgs-3807408c383b57805d27eb8293bd19cac591291a.tar.xz
nixpkgs-3807408c383b57805d27eb8293bd19cac591291a.tar.zst
nixpkgs-3807408c383b57805d27eb8293bd19cac591291a.zip
Merge pull request #32212 from ryantrinkle/nat-port-forwarding-ranges
Nat port forwarding ranges
Diffstat (limited to 'nixos/modules/services/networking/nat.nix')
-rw-r--r--nixos/modules/services/networking/nat.nix6
1 files changed, 3 insertions, 3 deletions
diff --git a/nixos/modules/services/networking/nat.nix b/nixos/modules/services/networking/nat.nix
index 9b04cf557fa..bfaf30c1178 100644
--- a/nixos/modules/services/networking/nat.nix
+++ b/nixos/modules/services/networking/nat.nix
@@ -131,15 +131,15 @@ in
       type = with types; listOf (submodule {
         options = {
           sourcePort = mkOption {
-            type = types.int;
+            type = types.either types.int (types.strMatching "[[:digit:]]+:[[:digit:]]+");
             example = 8080;
-            description = "Source port of the external interface";
+            description = "Source port of the external interface; to specify a port range, use a string with a colon (e.g. \"60000:61000\")";
           };
 
           destination = mkOption {
             type = types.str;
             example = "10.0.0.1:80";
-            description = "Forward connection to destination ip:port";
+            description = "Forward connection to destination ip:port; to specify a port range, use ip:start-end";
           };
 
           proto = mkOption {