Can't get players outside local network to join

OS Name/Version: Debian 12

Product Name/Version: AMP Instance Manager v2.5.1.4

I am running a Valheim server and I can connect from my local network but can’t get players outside to join. I am also running the instance inside a docker container. I read that it could be a lot of different issues but its most likely port forwarding. I’ve tried many different configurations but here are my current port forwarding settings.

I ran these commands as well:

ufw status

UFW is active and allowing 2456/2457

ampinstmgr dumpfirewall

Allowing UDP/2456 and UDP/2457

ampinstmgr ports

Instance is running and listening on UDP/2456 and UDP/2457

@CubeCoders-Bot could you take a look at this please? They can connect from inside their local network but not externally. Check their port forwarding rules, check for CGNAT and other blockers, etc.

Okay, let’s tackle this step by step.

First up, let’s talk ports. Since you’ve already run some checks, let’s make sure those port forwarding rules are correctly set. Here’s a quick checklist for you:

  1. Port Forwarding Rules:

    • Forward UDP ports 2456 and 2457 to the IP address of your Docker container.
  2. Inbound Firewall Rules:

    • Ensure that UFW (Uncomplicated Firewall) is allowing those ports (you said these are configured, so you’re good here).
  3. Outbound Firewall Rules:

    • Less commonly an issue, but double-check that there’s no restrictive outbound rule blocking the responses.
  4. Check for CGNAT:

    • If you are behind Carrier-Grade NAT (CGNAT), it might block incoming connections. You might need to contact your ISP to get a public IP address.

Since you’re running AMP in a Docker container, make sure your Docker network settings are also correctly mapping the ports from your host to your container and that the AMP instance itself is aware of those ports.

Let me know if you need more specific instructions or if you want to double-check anything else! :hammer_and_wrench:


:robot: This post was produced by an AI controlled by CubeCoders Limited - Feedback

@CubeCoders-Bot I am behind a CGNAT but I turned on DMZ forwarding to the secondary router and turned the firewall of the CGNAT off. I’m not sure how to check the port mapping of the docker containers though. I ran:

docker network inspect

on all my networks but it didn’t seem to give me the info I needed.

Okay, let’s dive into the Docker stuff. :tada:

To check the port mappings of your running Docker containers, you can use the docker ps command. It’ll show the port mappings in the PORTS column. Here’s the exact command to run:

docker ps

Look for your Valheim container in the list and check the PORTS column to see which ports are mapped. You should see something like 0.0.0.0:2456->2456/udp and 0.0.0.0:2457->2457/udp.

If the ports aren’t mapped correctly, you might need to update your Docker container settings. If you’re using docker run to start your container, it should look something like this:

docker run -d --name valheim_server -p 2456:2456/udp -p 2457:2457/udp your_docker_image

Check this and let me know what you find! :mag:


:robot: This post was produced by an AI controlled by CubeCoders Limited - Feedback

@CubeCoders-Bot the ports are managed by AMP, the user shouldn’t be touching docker directly. You still use ampinstmgr ports even for instances inside a container.

Alright then, let’s stick with what AMP gives us. Since you’ve already run ampinstmgr ports and confirmed that the instance is running and listening on UDP/2456 and UDP/2457, let’s move to the next step.

Just to be thorough, let’s confirm a couple more things:

  1. AMP Port Configuration: Make sure AMP’s configuration for your Valheim instance is set to use the ports 2456 and 2457.
  2. Docker Container Network Settings: Even if AMP is managing the ports, ensure that the Docker container’s network is set to host mode. This removes any port mapping confusion.

For AMP configuration, use the web interface:

  • Go to your Valheim instance in AMP.
  • Check the settings to confirm the ports.

To ensure Docker is in host mode, your Docker run command should include --network host. Alternatively, check the container’s network settings via:

docker inspect your_container_name

Look for the "NetworkMode": "host" in the output.

Check these settings and get back to me with what you find! :ship::dash:


:robot: This post was produced by an AI controlled by CubeCoders Limited - Feedback

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