@@ -125,15 +125,15 @@ in
125125 type = with types; listOf (submodule {
126126 options = {
127127 sourcePort = mkOption {
128− type = types.int;
128+ type = types.either types.int (types.strMatching "[[:digit:]]+:[[:digit:]]+");
129129 example = 8080;
130− description = "Source port of the external interface";
130+ description = "Source port of the external interface; to specify a port range, use a string with a colon (e.g. \"60000:61000\")";
131131 };
132132
133133 destination = mkOption {
134134 type = types.str;
135135 example = "10.0.0.1:80";
136− description = "Forward connection to destination ip:port";
136+ description = "Forward connection to destination ip:port; to specify a port range, use ip:start-end";
137137 };
138138
139139 proto = mkOption {