* sshd.nix: ports attribute, to allow listening to multiple ports
svn path=/nixos/trunk/; revision=18877
This commit is contained in:
parent
9682f0ed90
commit
038180bab8
@ -15,6 +15,9 @@ let
|
||||
|
||||
UsePAM yes
|
||||
|
||||
${ pkgs.lib.concatMapStrings (port : ''Port ${toString port}
|
||||
'') cfg.ports}
|
||||
|
||||
${if cfg.forwardX11 then "
|
||||
X11Forwarding yes
|
||||
XAuthLocation ${pkgs.xlibs.xauth}/bin/xauth
|
||||
@ -92,6 +95,13 @@ in
|
||||
'';
|
||||
};
|
||||
|
||||
ports = mkOption {
|
||||
default = [22];
|
||||
description = ''
|
||||
Specifies on which ports the SSH daemon listens.
|
||||
'';
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
};
|
||||
@ -130,7 +140,7 @@ in
|
||||
exec = "${openssh}/sbin/sshd -h /etc/ssh/ssh_host_dsa_key -f ${sshdConfig}";
|
||||
};
|
||||
|
||||
networking.firewall.allowedTCPPorts = [22];
|
||||
networking.firewall.allowedTCPPorts = cfg.ports ;
|
||||
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user