blob: a4d0c03b72158e98e4f4f998803b6e42b667f80c (
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
54
55
56
57
58
59
60
61
|
{ ... }:
let
baseTCP = [
20
22
25
80
443
];
baseUDP = [
];
baseTCPRanges = [ ];
baseUDPRanges = [ ];
in
{
systemd.network = {
enable = true;
networks."10-uplink" = {
matchConfig.Type = "ether";
networkConfig = {
DHCP = "ipv4";
IPv6AcceptRA = "yes";
};
linkConfig = {
RequiredForOnline = "yes";
};
ipv6AcceptRAConfig = {
UseDNS = "yes";
UseDomains = "yes";
};
dns = [
"192.168.88.1"
"1.1.1.1"
"2606:4700:4700:0000:0000:0000:0000:1002"
];
};
};
networking = {
useNetworkd = true;
nftables.enable = true;
useDHCP = true;
firewall = {
# check enable = true;
checkReversePath = false;
allowedTCPPorts = baseTCP;
allowedUDPPorts = baseUDP;
allowedUDPPortRanges = baseUDPRanges;
allowedTCPPortRanges = baseTCPRanges;
# TODO: Figure out how to do FW that allows only on the internal ip range
#interfaces = {
# "wg-home" = {
# allowedTCPPorts = secureTCP;
# allowedUDPPorts = secureUDP;
# allowedUDPPortRanges = secureUDPRanges;
# allowedTCPPortRanges = secureTCPRanges;
# };
#};
};
};
}
|