summary refs log tree commit diff stats
path: root/system/services
diff options
context:
space:
mode:
authorene <ene@sils.li>2023-03-19 17:43:26 +0100
committerene <ene@sils.li>2023-03-19 17:43:26 +0100
commit083a7cbb9623c90468c887203bf95adc5f2e3201 (patch)
treeb2354f50502ac44dff6e3c70235a24bc870fb99e /system/services
parentFeat(system/mail): Add other users, so the admin thing works (diff)
downloadnixos-server-083a7cbb9623c90468c887203bf95adc5f2e3201.tar.gz
nixos-server-083a7cbb9623c90468c887203bf95adc5f2e3201.zip
Fix(system/mail): Only accept connections on safe ports
It is sort of standard to ignore connections over the unencrypted port
25, thus we are doing the same.
Diffstat (limited to '')
-rw-r--r--system/services/default.nix2
-rw-r--r--system/services/firewall/default.nix11
2 files changed, 13 insertions, 0 deletions
diff --git a/system/services/default.nix b/system/services/default.nix
index acf20f5..4c39b8b 100644
--- a/system/services/default.nix
+++ b/system/services/default.nix
@@ -1,6 +1,8 @@
 {config, ...}: {
   imports = [
     ./acme
+    ./firewall
+    ./minecraft
     ./nginx
     ./nix
     ./opensshd
diff --git a/system/services/firewall/default.nix b/system/services/firewall/default.nix
new file mode 100644
index 0000000..23dbcc4
--- /dev/null
+++ b/system/services/firewall/default.nix
@@ -0,0 +1,11 @@
+# vim: ts=2
+{...}: {
+  networking.firewall = {
+    allowedTCPPorts = [
+      # for mail protocols:
+      465 # SMTP SSL
+      995 # POP3 SSL
+      993 # IMAP SSL
+    ];
+  };
+}