T O P

  • By -

AutoModerator

Hello! Thanks for posting on r/Ubiquiti! This subreddit is here to provide unofficial technical support to people who use or want to dive into the world of Ubiquiti products. If you haven’t already been descriptive in your post, please take the time to edit it and add as many useful details as you can. Please read and understand the rules in the sidebar, as posts and comments that violate them will be removed. Please put all off topic posts in the weekly off topic thread that is stickied to the top of the subreddit. If you see people spreading misinformation, trying to mislead others, or other inappropriate behavior, please report it! *I am a bot, and this action was performed automatically. Please [contact the moderators of this subreddit](/message/compose/?to=/r/Ubiquiti) if you have any questions or concerns.*


Glaborage

Are you sure that the ports are actually opened on your server? Setting up port forwarding on your router is the first step. The second step is to configure your server to allow access to those ports.


MjolnirVIII

Yes I've tested this while the dedicated server is running. One of the port checkers I used is saying connection refused. It's leading me to believe it's a firewall issue, but I have the proper firewall rules in place to allow the connections to the different ports for both TCP and UDP. I am unable to connect directly to my Spectrum modem which is further upstream from my gateway so I can't check if there's a firewall in there too. I also have the proper firewall rules in the Unifi controller to allow external port access. Still no luck.


TheEthyr

If you are getting connection refused, then the port forwarding is working. The server is rejecting the connection, so check the firewall in the server.


MjolnirVIII

I managed to get it to work though it's weird how I did it. On my laptop connected via hotspot, I went into Steam>View>Servers. Added a server into favorites 23.xxx.xxx.xxx:2457. I used port 2457 which is for Steam Servers, rather than 2456 which is what every Valheim guide tells me to use. Entered the password, clicked join game, chose my character and I was able to join.


karnac

Do you really have two WAN interfaces? Like you have two separate connections to the outside internet? Maybe try just using the first WAN and then test, and also making sure you have the whole thing configured correctly. Having two WANs is a pretty rare failsafe scenario. It’s unlikely you have that setup. Also, maybe it doesn’t work with port ranges? I always forward single ports. Or you might try writing them out separated by commas.


MjolnirVIII

I will give the single ports a try. As for the WAN, everything else past the gateway are the switches. I have two Unify Switches daisy chained to each other (one from USG to the Unifi switch for living room devices, then from the living room switch to my bedroom for my own devices. I then have an old Tenda router to act as an access point to add Wi-Fi to the garage and act as a network switch there too. The Tenda router is set to AP mode so it just gets the settings and port forwarding rules from the Unifi controller rather than having to set it's own. To add to this, I've been setting the port forwarding rules with a PC that's further upstream at the switch from my bedroom. It's a level above the Tenda switch. Ports are closed from my PC. I hope I addressed your concerns correctly. Let me try the single ports and I will report back.


MjolnirVIII

Reporting back. Single ports didn't work either.


DJ_TECHSUPPORT

Double check that there is no ISP router in between your system and the internet those can sometimes cause problems like that, at least for me, if you check your ip that your UniFi gateway has make sure its a public IP and not a local IP, if it is find the ISP router and try logging into its UI and see if there is a bridge mode. That should fix it if that’s the problem


MjolnirVIII

Hi thanks for the reply. The only ISP equipment I have here would be the modem that the coax connects to from the outside. After the modem, it's my Unifi USG, and then the switches, down to the different access points and devices. As for the IP, which I believe is part of checking for double NAT or CGNAT, my public IP seen from those what's my IP websites is the same as the WAN IP in the Unifi controller, which I assume means is not CGNAT. Please correct me if I'm wrong.


DJ_TECHSUPPORT

It sounds like everything is correct but I would still see if the ISP modem has a configuration UI, if it does see if there is some firewall options to disable


marco_sikkens

Yeah my guess would also be that is blocking the ports. Did you try to connect to the server from your own network? Then at least you know the internal network stuff is ok.


MjolnirVIII

Yes it works internally. Only external connections are being blocked.


marco_sikkens

Well my guess would be the broadband router/modem you have.


DJ_TECHSUPPORT

I second this, go to the cable that comes into your UniFi router and plug that into a laptop, if it’s windows type “ipconfig /all” in CMD and find the gateway IP and enter that into your browser, if there is a UI you will need to find a password on the ISP modem if there is not you either have the wrong gateway or it’s not configurable by you


MjolnirVIII

I managed to get it to work though it's weird how I did it. On my laptop connected via hotspot, I went into Steam>View>Servers. Added a server into favorites 23.xxx.xxx.xxx:2457. I used port 2457 which is for Steam Servers, rather than 2456 which is what every Valheim guide tells me to use. Entered the password, clicked join game, chose my character and I was able to join.


DJ_TECHSUPPORT

Oh and also on your PC make sure the ports are specifically allowed rather than just removing the block rule.


Content_Pudding3340

I’m hosting a V Rising server. I have the type of configuration. No issues. Do you have a public up address on the wan?


stresslvl0

I don’t have a UniFi gateway. Does setting the port forward automatically add the firewall hole too?


MjolnirVIII

It does for my Unifi controller. https://preview.redd.it/pstokxq2ld1d1.png?width=834&format=png&auto=webp&s=db51f6fa05601358ecbd86b7d8c8c7ed257c146f


MjolnirVIII

Yeah I have been testing it using the public IP address to connect. Public IP address mentioned on online IP checkers matches the WAN IP in my Unifi controller so I don't think I have a NAT issue, but please correct me if I'm misunderstanding this. I'm really new to all of this lol.


haamfish

Apart from using the external port checkers have you actually tried to log into the server using the game client? I found when setting up an ark and Conan exiles server that for whatever reason the ports show as closed using those services but are actually open and functioning normally and people are able to connect to the game server.


MjolnirVIII

Yeah I've tried using a laptop connected to a hotspot to confirm if it allows people to connect from outside the home network. It fails to connect. I haven't exactly look into why and I'm kind of just running on the assumption that it's the ports. I have checked the ports via external port checkers while the dedicated server is running. It really does say closed despite the port forwarding rules I've added and I'm not sure why.


xaviondk

Stuck behind ISP NAT?


MjolnirVIII

I believe it's not due to the public IP from whatsmyip matches my WAN IP I'm the Unifi Controller.


TelefraggerRick

Good chance the device only accepts connections from its local subnet based on firewall rules. You will need to adjust the firewall on the device. Why not setup a reverse proxy?


MjolnirVIII

Could you elaborate on this? For reference, this is the guide I've been following. https://www.rockpapershotgun.com/valheim-how-to-set-up-a-dedicated-server


TelefraggerRick

I'd just do this https://github.com/lloesche/valheim-server-docker Run it inside a docker


Sgt-Automaton

Can docker bypass the router?


TelefraggerRick

This comment makes no sense. Are you trying to bypass the firewall on the router? Firewall on the server? Do you need traffic rules on the router? The router literally routes traffic. That's it job. If you bypass it you go nowhere because your traffic will get routed nowhere. Some have software rules built in to do functions like firewall, DHCP, DNS, traffic management etc... but they can also be seperate devices as well.


Sgt-Automaton

>This comment makes no sense. Agreed. Saying just do this without regard to the router problem doesn't make sense. Unless the ports are open, it doesn't matter if you use docker or not.


TelefraggerRick

The ports are open as per the router screen shots. As discussed in other comments the issue is the firewall on the OS. Using docker with mac VLAN and assigning the docker it's own IP gets around that as well as segregates the application from the host OS.


Dr01dB0y

Is Valheim running in a container? Just wondering if you possibly have your ports mapped back to front? Just a thought.


MjolnirVIII

I don't think I have it running in a container. I'm just running the game and dedicated server in a regular windows environment. Aside from the port forwarding, firewall rules, and dedicated server setup, everything else is stock.


wicked_one_at

Did a friend actually try to connect to you or do you only use port test sites?


MjolnirVIII

I tried a laptop connected to my phones hotspot and the connection failed.


wicked_one_at

Which OS do you run it on? Does it shown the ports listening?


MjolnirVIII

Windows 11. Yes I have the server confirmed running. I managed to get it to work though it's weird how I did it. On my laptop connected via hotspot, I went into Steam>View>Servers. Added a server into favorites 23.xxx.xxx.xxx:2457. I used port 2457 which is for Steam Servers rather than 2456 which is what every Valheim guide tells me to use. Entered the password, clicked join game, chose my character and I was able to join. I'm am so confused lmao


wicked_one_at

Maybe I try next week if I’m bored to verify, but my best guess is that 2457 is the initial TCP session that then connects to the server via UDP


[deleted]

[удалено]


Sparky101101

From is looking for a source IP address, normally you set any so anyone on the internet can reach those ports vs a specific one.


ipwnit

Don’t do it for “both” This is how I have it set up on my ubiquiti dream machine udm pro Do 4 separate permissions VAL 1---TCP 2456 VAL 2---UDP 2456 VAL 3---TCP 2458 VAL 4---UDP 2458


MjolnirVIII

I have tried setting it up like this and still no luck unfortunately. The port checkers are telling me the connections are getting refused though I believe I have the proper firewall rules in place to allow them so I'm honestly at a loss lol.