blob: 7b0481311ee5d41a35ef467587e3bd0707f7b794 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
|
{ ... }:
let
baseTCP = [
20 22 433
];
baseUDP = [
16555 # Wireguard
];
baseTCPRanges = [
];
baseUDPRanges = [
];
secureTCP = [
];
secureUDP = [
];
secureTCPRanges = [
];
secureUDPRanges = [
];
in
{
networking.nftables.enable = true;
networking.firewall = {
enable = true;
checkReversePath = false;
allowedTCPPorts = baseTCP;
allowedUDPPorts = baseUDP;
allowedUDPPortRanges = baseUDPRanges;
allowedTCPPortRanges = baseTCPRanges;
interfaces = {
"wg-home" = {
allowedTCPPorts = secureTCP;
allowedUDPPorts = secureUDP;
allowedUDPPortRanges = secureUDPRanges;
allowedTCPPortRanges = secureTCPRanges;
};
};
trustedInterfaces = [
"docker0"
"br-*"
"veth*"
"vnet*"
"virbr*"
];
};
}
|