mirror of
https://github.com/blahai/nyx.git
synced 2025-02-22 22:25:09 +00:00
Networking: add ssh and more firewall rules
This commit is contained in:
parent
6fc5cef4cb
commit
2a57b163e6
3 changed files with 25 additions and 3 deletions
|
@ -1,5 +1,30 @@
|
|||
{
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
inherit (lib.modules) mkForce;
|
||||
in {
|
||||
imports = [
|
||||
./fail2ban.nix
|
||||
];
|
||||
|
||||
config = {
|
||||
networking.firewall = {
|
||||
enable = true;
|
||||
package = pkgs.iptables;
|
||||
|
||||
allowedTCPPorts = [
|
||||
443
|
||||
80
|
||||
];
|
||||
allowedUDPPorts = [];
|
||||
|
||||
# make a much smaller and easier to read log
|
||||
logReversePathDrops = true;
|
||||
logRefusedConnections = false;
|
||||
|
||||
checkReversePath = mkForce false;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
{...}: {
|
||||
services.openssh = {
|
||||
enable = true;
|
||||
startWhenNeeded = true;
|
||||
settings = {
|
||||
PermitRootLogin = "no";
|
||||
PasswordAuthentication = false;
|
||||
|
|
|
@ -5,8 +5,6 @@ in {
|
|||
enableIPv6 = true;
|
||||
firewall = {
|
||||
allowedTCPPorts = [
|
||||
80 # HTTP
|
||||
443 # HTTPS
|
||||
25565 # minecraft
|
||||
25566 # minecraft
|
||||
25567 # minecraft
|
||||
|
|
Loading…
Add table
Reference in a new issue