Players cannot connect to Valheim server (not through IP and also not found in server list)

OS Name/Version: Ubuntu 22.04.1 LTS, Proxmox VE 7.3

Product Name/Version: v2.4.0.10

Problem Description:
Players cannot join the Valheim server. They get a ‘can’t connect’ message. The server runs fine on my local network, using the local ip or looking for it in the community server list and I can connect to it without an issue, but anyone from outside cannot (the server name does not show up in community servers, cannot connect using local ip:port or public ip:port).

I run amp on an ubuntu vm in proxmox.

Actions I have taken:

Following the steps in the “diagnosing connectivity issues” section I cannot see any of the ‘ticks’ talked about in the guide. So I am assuming the ports are not listening? Not sure how exactly the output is supposed to look like.

I walked through all the other stuff too, firewall seems fine.

And I set up port forwarding on my router

Players used the public ip.

But I also had them try the local one just in case, obviously did not work either.

Since I cannot upload more than one image fine here a collage:

So, anything else I can try to fix the issue?

Run the dumpfirewall command as root, does the output change? Also can you show me how you’re connecting in game? Make sure to try both ports.

AMP shows that the game server is listening so the issue is somewhere with your firewall and/or network configuration.

I tried what you suggested, you can find the output below:

When I try to connect myself, which is from the local network that also has the server, I open Valheim in steam, I go to the community server tab, I search for my server name (1VTest) and connect. It works fine that way. Obviously I tried to join using the local ip:port method too (add server in Valheim), which also works (localIP:2456). Joining from favorites also works, after I put it in there.

Other players however can’t connect. The server does not show up on the community list for them (which might just be a Valheim issue as far as I can tell), so they have to join manually using the ‘add server’ button in game.

The addresses we tried were:

publicIP:2456
publicIP:2457
localIP:2456
localIP:2457

When they try to connect, they get the message “failed to connect” as far as I was made aware.
The local ip is the one of the ubuntu vm on my local network, which should really only work for me but we tried it anyway. The public one is the one I got directly from the port forwarding section of my router from the specific ports that I opened. I think you can see from where in the last screenshot of the original post. Obviously both are different ips.

My router indicates the ports are open, so I’m not sure what is going on. I also tried setting my port forwarding settings to exposed host on both ipv4 and ipv6 to see if that had an effect but it resulted in the same issue, so I turned it back off.

So to clarify - you can connect on your local network by using localip:port under “Enter IP” - but remote players can’t using externalip:port ?

If that’s the case then the fault lies in your port forwarding. Can you show me the forwarding rule(s) you’re using on your router?

Yes, I can connect locally using the localip:port. Others outside the local network cannot connect however, whichever ip:port they use.

Here my port forwarding settings:

You’re censoring too much information. Internal addresses (10.x or 192.168.x) are not sensitive and can be shown publicly.

I wasn’t sure what you were looking for but the internal ip is 192.168.178.74. That’s also the one amp is showing in the web ui. The public one is 91.18.191.238 but that one changes every reboot or so I think anyway. Its different now again since I just rebooted anyway. Obviously we used the updated ones whenever we tried to connect from outside. Do you need the ipv6 too?

Show me the same screenshot with your port forwarding rules but without your internal IP censored.

Here the screenshot without the ip censored:

Do you need the other one too? those were two screenshots but I am only allowed to post one at a time.

I can’t make any sense of what you’re showing me. You wouldn’t normally have a public IP showing up in your port forwarding rules. If the censored fields are what I think they are, their value should be empty.

They are not empty though. I’ll go through the setting up port forwarding again on my router and try to see if I messed something up there. According to the manual the fields should be empty as you say.

My point is that they should be empty. You wouldn’t normally specify any external addresses. That would normally be used to limit which remote addresses can connect.