nixos/duosec: Add an option to allow TCP forwarding

Signed-off-by: Austin Seipp <aseipp@pobox.com>

Changed files
+14 -1
nixos
modules
security
+14 -1
nixos/modules/security/duosec.nix
···
whitelist.
'';
};
+
+
allowTcpForwarding = mkOption {
+
type = types.bool;
+
default = false;
+
description = ''
+
By default, when SSH forwarding, enabling Duo Security will
+
disable TCP forwarding. By enabling this, you potentially
+
undermine some of the SSH based login security. Note this is
+
not needed if you use PAM.
+
'';
+
};
};
};
···
# Duo Security configuration
ForceCommand ${config.security.wrapperDir}/login_duo
PermitTunnel no
-
AllowTcpForwarding no
+
${optionalString (!cfg.allowTcpForwarding) ''
+
AllowTcpForwarding no
+
''}
'');
};
}