Hello folks. I’m new to NixOS. Tonight after setting up a FoundryVTT server, I found that the corresponding port won’t accept connections no matter what I do.
networking.firewall.enable = false
I have the port (30000) forwarded in my router settings.
Additionally, FoundryVTT has UPnP, which shows as active in my router settings when the server is running, i.e. it says port 30000 is open.
Docs and various threads mention things like NAT (which I’m not familiar with), and I’m not sure if that even applies to my situation. I really just need a single port forwarded.
Running netstat -plant: tcp6 0 0 :::30000 :::* LISTEN -
This is reflected in the server startup messages: Jul 28 17:27:17 [$myhostname] foundryvtt[1365]: FoundryVTT | 2025-07-28 17:27:17 | [info] Requesting UPnP port forwarding to destination port 30000 Jul 28 17:27:17 [$myhostname] foundryvtt[1365]: FoundryVTT | 2025-07-28 17:27:17 | [info] Server started and listening on port 30000
But the Foundry client and a port checking tool both show the port as closed.
Can FoundryVTT be reached from other machines in your local network?
When you are in the web interface of your router, does it show you your public IP address anywhere? Can you share the first two parts (I assume you don’t want to share the whole thing)? It could be that your ISP has a carrier grade NAT, in which case you won’t be able to make services available to the internet even if you configure port forwarding in your router.
Yes, FoundryVTT can be reached by other machines in the local network at port 30000.
First two parts of public IP address: 73.64
I shouldn’t be restricted by my ISP, because I was hosting a Foundry server a couple months ago when this system was running EndeavourOS. And before that, I hosted it when the system ran Windows 10/11.
I am not familiar with setting reverse proxies, though I was planning to learn how to do so for this server. I’d already added the nginx package, because I saw it mentioned in this guide. Disconcertingly though, the author frames reverse proxies as optional.
I’ll start looking into nginx, and report back if that solves it. Meanwhile if you have any tips to share on doing so, they are welcome!
You can sudo systemctl stop foundryvtt to stop foundry and in an empty directory run python3 -m http.server 30000 (which starts a temporary webserver serving files from the current directory) to test whether the port forwarding works for other applications.
None of the ports I’ve designated in the Virtual Servers section of my router are open when checked through a port checker. Since I was able to run the foundry server on EndeavourOS, I have to believe there’s something about my nix config blocking the traffic, but I’ve no idea what. Here’s what my networking.nix module looks like:
Could it be more settings I need to add to the networkmanager? Otherwise I’m not sure.
Edit: I’m going to try following the port forwarding example on the Networking documentation and try NAT as they do. (guess I’d better read up on what NAT is)