I'm making game servers on my computer

I’m making game servers on my computer and seted up portforwarding on the router correctly, but when I try connecting throw domain it doenst connect, I’ve tried with a simple website and with the website it works

I created a game using unity mirror that listens to the port 7777/udp the server for the game is in a container that translates the port 27001 to the port 7777, and that contianer is inside a vm connected to my router with the correct port forwarding rules for udp.When I have the server open I can connect it throw my public ip address, but when I when I try connecting throw my domain, after setting up dns it doesnt work.


I’ve also made a simple website and it the dns service worked fine.

You cannot proxy non-HTTP protocols through Cloudflare without using Spectrum…

2 Likes

The issue you’re experiencing is likely due to the way your domain name is resolved to your router’s public IP address and how port forwarding is configured. When you connect to your game server using your public IP address, the connection is established directly between your computer and the router, bypassing the domain name resolution process.

However, when you try to connect using your domain name, the connection attempt first goes to the DNS server to resolve the domain name to an IP address. Once the IP address is obtained, the connection attempt is then routed to the router, where the port forwarding rule should take effect and direct the traffic to the appropriate internal port (27001 in your case).

To troubleshoot this issue, you can follow these steps:

  1. Verify DNS Resolution: Ensure that your domain name is correctly configured and resolves to your router’s public IP address. You can use tools like nslookup or dig to check the DNS records.
  2. Check Port Forwarding Rules: Double-check that your router’s port forwarding rules are correctly configured for both UDP and TCP traffic on port 27001, pointing to the internal IP address of the VM where your game server is running.
  3. Test with Different Ports: Try connecting to your game server using a different port, such as port 27015, to see if the issue is specific to port 7777. If it works with a different port, it might indicate a problem with the port forwarding rule or the container configuration for port 7777.
  4. Use a Port Checker: Utilize online port checkers to verify that the specified port (27001) is open and accessible from the internet. If the port is closed, it suggests an issue with the router’s port forwarding configuration or the VM’s firewall settings.
  5. Check Firewall Rules: Ensure that the firewall on your VM is not blocking incoming traffic on port 27001. Configure the firewall to allow connections from the internet on that port.
  6. Use a Reverse Proxy: If the issue persists, consider using a reverse proxy like Nginx or Apache to handle incoming traffic on your domain and forward it to the appropriate internal port on the VM.

Remember to save the changes made to your router’s port forwarding rules and firewall settings after each adjustment. If the issue still persists, consider seeking assistance from a network administrator or consulting the documentation for your router and game server software.

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.