-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfirewall.nix
More file actions
54 lines (54 loc) · 868 Bytes
/
firewall.nix
File metadata and controls
54 lines (54 loc) · 868 Bytes
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
#
# firewall.nix
#
# configure the system firewall
#
{
pkgs,
config,
...
}: let
ssh = 22;
mariaDB = 3306;
#
k3s_api = 6443;
k3s_etcd_clients = 2379;
k3s_etcd_peers = 2380;
k3s_flannel = 8472;
#
dnsmasq_dns = 53;
dnsmasq_dhcp = 76;
#
kubernetes_bootcamp = 8080;
rust_rocket_tavern = 9021;
#
mayastor_grpc = 10124;
mayastor_NVMf1 = 4421;
mayastor_NVMf2 = 8420;
#
in {
networking = {
firewall.enable = true;
firewall.allowedTCPPorts = [
ssh
mariaDB
k3s_api
k3s_etcd_clients
k3s_etcd_peers
dnsmasq_dns
dnsmasq_dhcp
kubernetes_bootcamp
rust_rocket_tavern
mayastor_grpc
mayastor_NVMf1
mayastor_NVMf2
];
firewall.allowedUDPPorts = [
k3s_flannel
dnsmasq_dns
mayastor_grpc
mayastor_grpc
mayastor_grpc
];
};
}