init commit
This commit is contained in:
commit
181e6f681e
22 changed files with 940 additions and 0 deletions
30
pkgs/server-ssh.nix
Normal file
30
pkgs/server-ssh.nix
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
{ pkgs, config, ... }:
|
||||
|
||||
{
|
||||
services.openssh = {
|
||||
enable = true;
|
||||
ports = [ 6968 ];
|
||||
openFirewall = true;
|
||||
settings = {
|
||||
PasswordAuthentication = false;
|
||||
AllowUsers = [ "luka" ];
|
||||
UseDns = false; # Disable checking of rDNS records to speed up login
|
||||
X11Forwarding = false;
|
||||
PermitRootLogin = "prohibit-password";
|
||||
};
|
||||
};
|
||||
|
||||
services.fail2ban = {
|
||||
enable = false;
|
||||
bantime = "24h"; # Ban IPs for one day on the first ban
|
||||
# ignoreIP = [ ];
|
||||
};
|
||||
|
||||
networking.firewall = {
|
||||
enable = true;
|
||||
|
||||
# allowedTCPPorts = [ ];
|
||||
# allowedUDPPorts = [];
|
||||
};
|
||||
}
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue