+1 vote

I am attempting to follow the High-Level multiplayer tutorial on the godot docs, however I can only get it to work on my LAN. I have found my public IP address and enabled port forwarding on 3 ports

However, when I change the IP address to public and send it to my friend, they are unable to connect to my server. I followed the tutorial exactly and only changed the client's IP address to the public address.

I haven't changed the IP address on the server because I can't figure out how, is this a problem?

Any help would be appreciated

in Engine by (388 points)

2 Answers

0 votes

your supposed to use the public ip of your router.

the way port forwarding works, is when a packet is sent to your routers public ip, your router will forward that packet to the private ip and if its sent to the correct port. if you understand this, then maybe:

1: you're using a commonly used port and you need to change it.
2: you're using two daisy chained routers.
3: you're not using the correct ports.

if none of what i said helps your problem, sorry, i tried

by (439 points)

I've gotten the port to over using a different application, just not through godot.

If it adds any clarification when trying to host a server on godot the port does not appear open.

I'm using port 1928, have double checked that it's right

you're supposed to set which ip and port your router will forward in the router settings.

i dont know what application you used to open the port, but its supposed to be in the router settings(put your routers ip in a browser and open the port)

0 votes

I finally figured out what this is is about 2 weeks later so i figured i'll post it here in case anyone needs help in the future:

The built in eNet framework, when creating a server, does not need a specific IP on which to run on. It will listen to all available ports on all IP addresses (probably not the correct terminology or explanation but it's what I've deciphered)

Set up port forwarding in your router to redirect traffic to your computer, and make sure your computer has a static IP address

When turning on port forwarding make sure you set it for both TCP and UDP protocols. This was my issue.

Once all these parameters are set up, you should be able to create a server and access it over the internet successfully.

by (388 points)
Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to webmaster@godotengine.org with your username.