consolidate firewall definitions

This commit is contained in:
Ittihadyya 2024-11-25 15:34:02 +02:00
parent 24f6a331a4
commit 4e7890d90a
2 changed files with 17 additions and 23 deletions

View file

@ -5,18 +5,31 @@
networking.nftables.enable = true;
}
];
fructose.modules = [
{
networking.firewall = {
allowedUDPPorts = [
# 53 # pihole
# 5894 # couchdb
];
allowedTCPPorts = [
3000 # forgejo
# 5894 # couchdb
3000 # forgejo http
222 # forgejo ssh
];
};
}
];
aspartame.modules = [
({
services.fail2ban.enable = true;
networking.firewall = {
interfaces.eth0.allowedTCPPorts = [
80
222 # this is for forgejo
443
64783 # this is for murmur
];
};
})
];
}

View file

@ -1,19 +0,0 @@
{
aspartame.modules = [
({
services.fail2ban.enable = true;
networking.firewall = {
interfaces.eth0.allowedTCPPorts = [
80
222 # this is for forgejo
443
];
};
})
];
fructose.modules = [
{
networking.firewall.interfaces.eth0.allowedTCPPorts = [ 222 ]; # when someones tries to ssh to forgejo, it goes -> aspartame -> fructose -> forgejo-container --- so fructose also needs this port open.
}
];
}