mirror of
https://github.com/Superredstone/nixos.git
synced 2026-06-17 07:14:39 +02:00
feat(bomba): improve firewall rules
This commit is contained in:
@@ -1,25 +1,26 @@
|
||||
{ ... }:
|
||||
let
|
||||
dockerNetwork = "172.18.0.0/16";
|
||||
in
|
||||
{
|
||||
networking = {
|
||||
networkmanager.enable = true;
|
||||
nftables.enable = true;
|
||||
firewall = {
|
||||
enable = true;
|
||||
allowedTCPPorts = [
|
||||
22
|
||||
80
|
||||
443
|
||||
5900
|
||||
];
|
||||
allowedTCPPortRanges = [
|
||||
{
|
||||
from = 8001;
|
||||
to = 8005;
|
||||
}
|
||||
];
|
||||
allowedUDPPorts = [
|
||||
80
|
||||
443
|
||||
];
|
||||
enable = true;
|
||||
extraInputRules = ''
|
||||
ip saddr ${dockerNetwork} tcp dport 5900 accept
|
||||
ip saddr ${dockerNetwork} tcp dport 8001-8005 accept
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user