fix(homelab): use iptables rules to prevent wan access

This commit is contained in:
2025-12-27 20:31:37 -08:00
parent 136d127117
commit 13e61322a0
11 changed files with 48 additions and 116 deletions

View File

@@ -20,6 +20,12 @@
networking.hostName = meta.hostname;
networking.networkmanager.enable = true;
networking.firewall.extraCommands = ''
iptables -I INPUT -d 192.168.27.10/32 -s 10.0.0.0/8 -j ACCEPT
iptables -I INPUT -d 192.168.27.10/32 -s 172.16.0.0/12 -j ACCEPT
iptables -I INPUT -d 192.168.27.10/32 -s 192.168.0.0/16 -j ACCEPT
iptables -I INPUT -d 192.168.27.10/32 -j DROP
'';
time.timeZone = "America/Vancouver";