Horizon port forwarding: router, firewall and CGNAT
Port forwarding is three changes, not one: a fixed local IP, a router rule and a firewall rule. If your ISP uses CGNAT, none of them will work and a VPN is the practical answer.
When you need it
You need port forwarding when players outside your network must reach a server running on your machine, and you do not want to use an invite code or a VPN. LAN does not need it. A hosted VPS does not need it on your router.
Find the port
Open server.toml and read the port. The launcher console also prints it on start. Use the same number everywhere: router rule, firewall rule and the address you share.
If you change the port, restart the server and update the rule. A forwarded old port is a closed new port.
Give the host a fixed local IP
A router rule points at a local address. If the machine gets a new address from DHCP, the rule silently stops working. Reserve the address in the router's DHCP table, or set a static IP outside the DHCP range.
Add the router rule
Open the router's NAT or port forwarding page. Forward the server port to the host's fixed local IP. If the router asks for a protocol, forward both TCP and UDP; Horizon servers use both.
Leave the host out of the router's DMZ. A DMZ exposes every port on the machine; a port-forward rule exposes one.
Allow it through the firewall
Windows Firewall needs an inbound rule for the game or the port on the network profile you use. Allow private networks; do not open the port on public networks you do not control.
Test from outside
Ask someone on another network to connect, or use an online port checker against your public IP and port. Testing from the same network can succeed through NAT loopback even when the rule is wrong.
If it still fails: CGNAT
Compare the public IP the router reports with the IP a website sees. If they differ, or the address is in the 100.64.0.0/10 range, the ISP is using CGNAT. Port forwarding cannot fix that. Use an invite code, a VPN mesh, or a VPS.
The alternatives
- Invite code: temporary, no router changes, best for a few friends.
- Radmin VPN, ZeroTier or Tailscale: private network between players, no port forwarding.
- VPS: a public server you rent, best for a group that plays on a schedule.
Ready to install?
The launcher handles the manifest, the hashes and the native build. Start with Better+ or Near Vanilla.
Your first Horizon server: host, port and whitelist
Host a Horizon server from the launcher, set the port and whitelist in server.toml, and invite friends without guessing which file to edit.
Horizon LAN: open a world without port forwarding
Open a Horizon world to the same network with LAN mode, find the address, allow it through the firewall and know when LAN is not enough.
How to play Horizon with friends
LAN, invite codes, a public port, or a VPN: four ways to play Horizon together, with server-safe packs, whitelist and backups.