| ... | ... | @@ -26,7 +26,12 @@ in |
| 26 | 26 | networking.firewall.allowedTCPPorts = [ 80 443 ] ++ xmppTCPPorts; |
| 27 | 27 | networking.firewall.allowedUDPPorts = xmppUDPPorts; |
| 28 | 28 | networking.firewall.allowedUDPPortRanges = [{ from = xmppNetwork.relay_first; to = xmppNetwork.relay_last; }]; |
| 29 | | networking.firewall.interfaces.enp4s0.allowedTCPPorts = [ 445 ]; |
| 29 | networking.firewall.extraCommands = lib.concatMapStrings ({ address, prefixLength, ... }: '' |
| 30 | iptables -A nixos-fw -i enp4s0 -s ${address}/${toString prefixLength} -p tcp --dport 445 -j nixos-fw-accept |
| 31 | '') config.networking.interfaces.enp4s0.ipv4.addresses + '' |
| 32 | ip6tables -A nixos-fw -i enp4s0 -s fe80::/10 -p tcp --dport 445 -j nixos-fw-accept |
| 33 | ip6tables -A nixos-fw -i enp4s0 -s fc00::/7 -p tcp --dport 445 -j nixos-fw-accept |
| 34 | ''; |
| 30 | 35 | |
| 31 | 36 | systemd.services.xmpp-nat = { |
| 32 | 37 | wantedBy = [ "multi-user.target" ]; |