1
0
Fork 0
mirror of https://github.com/mdlayher/homelab.git synced 2024-12-14 11:47:32 +00:00

Revert "nixos/routnerr-2: remove Minecraft firewall rules"

This reverts commit 5f167d0cf5.
This commit is contained in:
Matt Layher 2021-10-28 23:55:56 -04:00
parent c9a2c20f1d
commit 60bb15b54c

View file

@ -14,6 +14,7 @@ let
http = "80";
https = "443";
mdns = "5353";
minecraft = "25565";
plex = "32400";
ssh = "22";
unifi_device = "8080";
@ -246,6 +247,12 @@ in {
}
} tcp dport {${ports.ssh}, ${ports.consrv}} counter accept comment "IPv6 SSH"
# Minecraft running on server.
ip daddr ${vars.server_ipv4} tcp dport ${ports.minecraft} counter accept comment "server TCPv4 Minecraft"
ip6 daddr ${vars.server_ipv6} tcp dport ${ports.minecraft} counter accept comment "server TCPv6 Minecraft"
ip daddr ${vars.server_ipv4} udp dport ${ports.minecraft} counter accept comment "server UDPv4 Minecraft"
ip6 daddr ${vars.server_ipv6} udp dport ${ports.minecraft} counter accept comment "server UDPv6 Minecraft"
# Plex running on server.
ip daddr ${vars.server_ipv4} tcp dport ${ports.plex} counter accept comment "server IPv4 Plex"
ip6 daddr ${vars.server_ipv6} tcp dport ${ports.plex} counter accept comment "server IPv6 Plex"
@ -290,12 +297,14 @@ in {
chain prerouting_wans {
tcp dport {
${ports.minecraft},
${ports.plex},
${ports.unifi_device},
${ports.unifi_web},
} dnat ${vars.server_ipv4} comment "server TCPv4 DNAT"
udp dport {
${ports.minecraft},
${ports.unifi_stun},
} dnat ${vars.server_ipv4} comment "server UDPv4 DNAT"