jhead / phantom

Use your own Minecraft server with your Xbox or PS4 and play with friends!
MIT License
613 stars 76 forks source link

Cannot get phantom to show up on other side of NAT #142

Closed y2k3100 closed 3 years ago

y2k3100 commented 3 years ago

I have an unusual networking situation where a friend and I share an internet service by necessity.

He has a router for the main service, I have another for mine that is behind his. I run DHCP/NAT on both in order to separate our chromecasts and rokus and other devices from eachother. I'm trying to port forward phantom through my router so he can see it on his network and join from his console. The configuration of phantom is typical and it works fine on my LAN and forwards everything to my server hosting provider, my friend does not own a desktop to host phantom on himself, so no easy solution on his side of the network.

I've forwarded every port mentioned in the documentation (the readme) and even a few I saw in the terminal out of hope. Am I missing something? I've forwarded 19132, but also 52460 & 56230 as I saw them mentioned in the terminal.

Running Ubuntu server 20.04

Thank you

jhead commented 3 years ago

Hey @y2k3100, thanks for all the details on your network setup, it’s super helpful! Right off the bat, I’m going to guess that the dual router setup is preventing broadcast packets originating on the main network from reaching yours. Routers typically do not forward broadcasts; they only transmit them within their own network.

I’m guessing: when your friend opens Minecraft, it sends out broadcasts to look for LAN servers, and these are hitting his router and going no further than that. To get phantom working, you’d need those broadcasts to reach your network and your PC running phantom.

How are your local IP ranges, gateway IPs, and subnet masks configured on these networks?

One option might be to turn your router into just a switch without any DHCP, so that both you and your friend are on the exact same network.

A simpler solution would be for your friend to run phantom on his network too. This shouldn’t require any port forwarding.

y2k3100 commented 3 years ago

Ah, I knew I was just missing something simple, It was getting late in my timezone, sorry. Broadcast packets, of course the client is sending broadcast packets. I can see that in resource monitor and wireshark now..

Welp. I don't want to disable DHCP and link us in a basic LAN configuration. I'll probably find something cheap to stick Ubuntu server and phantom on and plug it into his router sometime. I might even still have an Aspire One somewhere.

Thanks for pointing me to the obvious answer, sorry for my tired brain moment.