✨ [pi4] Nftables firewall config, moved security.nix to security dir
This commit is contained in:
parent
36ba00efc3
commit
244a029d70
@ -13,7 +13,7 @@
|
||||
./development.nix
|
||||
./hardware.nix
|
||||
./networking.nix
|
||||
./security.nix
|
||||
./security
|
||||
];
|
||||
|
||||
system.stateVersion = systemConfig.version;
|
||||
|
@ -1,4 +1,8 @@
|
||||
{
|
||||
imports = [
|
||||
./firewall.nix
|
||||
];
|
||||
|
||||
programs.gnupg.agent = {
|
||||
enable = true;
|
||||
enableSSHSupport = true;
|
17
hosts/pi4/security/firewall.nix
Normal file
17
hosts/pi4/security/firewall.nix
Normal file
@ -0,0 +1,17 @@
|
||||
{
|
||||
networking = {
|
||||
firewall = {
|
||||
enable = true;
|
||||
trustedInterfaces = [ "tailscale0" ];
|
||||
extraInputRules =
|
||||
let
|
||||
localIPv4Range = "192.168.10.0/24";
|
||||
in
|
||||
''
|
||||
ip saddr ${localIPv4Range} tcp dport 22 accept
|
||||
ip saddr ${localIPv4Range} udp dport 22 accept
|
||||
'';
|
||||
};
|
||||
nftables.enable = true;
|
||||
};
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user