can’t connect to self hosted server
I’ve set up a server and checked that on the host device I’m able to connect using “localhost”
I’m trying to connect to the server from another pc on the same network, and the ipv4 address of the host isn’t allowing me to connect. doesn’t say pinging or anything, just doesn’t work
what could be possible solutions?
106 Replies
Thanks for asking your question!
Make sure to provide as much helpful information as possible such as logs/what you tried and what your exact issue is
Make sure to mark solved when issue is solved!!!
/close
!close
!solved
!answered
Requested by lightningferix#0
You're using the private IP, correct?
Have you port forwarded
ah
im using the IP i got from ipconfig which i believe is private right
What are the first two blocks of it
tbh if you’re just using it on the same network just use local host
192.168
yeah that's right
um no
yeah
you cannot
that doesn’t work
cause im not the local host
the host is a different pc
did you modify the server-ip in server.properties
are the ports open?
oops
I’m a little sleepy
Localhost is typically just Internal servers
or servers that run on the same machine instance
or same machine :pain:
ports open -> OS firewall m8
still needs to open the port on the machine hosting the server
^
unless you manually closed them it should be fine...
I’m
um
it shouldnt be. let me check. i know i changed it to try something out but changed it back to blank
not necessarily
that would be on linux, on windows ports have to be opened manually
if they’re using Linux then port 25565 would be closed
isn't it the other way around
oops nvm
yeah that’s what I thought
when we’re talking about ports, were talking in my network settings?
i've never had to open a port when hosting something on windows
to be fair i've done that only like twice in my life
weird, I always have to on the firewall 😅
what os are hosting the server on?
windows 10
Look for this on the machine hosting the server
Inbound rules
At the right, New rule
Select port
And then the port you're using for the server, I used
25565
as a placeholderAllow connection
Then just hit next
And assign a whatever name you want. You'll probably want to close the port at some point, so choose something that might help you remember what did you used it for. "Minecraft Server Port" would be a good name, for example
Hit finish and you should be done
do i only need to do it for tcp?
yup
alright ive followed the steps. let me test on the other pc
Unless you want to add bedrock compatibility with something like Geyser. Then you would need to add another rule on UDP for the bedrock port, I think it was 19132 or something like that
19132 iirc
hmm this does not seem to have solved the issue
wait let me restart the server maybe?
if your server is running, restart your server
yes
yup, just corrected it
although
if you don't use the server pc for anything else
put linux on it
so restarting the server hasn’t changed anything unfortunately
what are you putting in as the server address on the remote pc?
right now ive put in the full ipv4 address thats given by ipconfig. ive tried with :25565 and without (did not change port in server properties)
Private residential ips usually start with 192.168
ipconfig on the server pc?
Is that your case?
yup thats what the ip starts with
smh ive ended up with 10.0
and yes, ipconfig on host
interesting
are you able to ping it on the client
see if pings are going through
maybe your router/wifi ap is doing some weird p2p blocking
how can i check if i can ping it?
oh
so
request time out
think we have the issue
are you sure it is the correct ip address of the server machine
okay wait there is a quirk to how the host is connected to the network
one second
yh, sometimes happens
i just continued with my 10.0 scheme even after moving away from my isp gear, its easier to type 🧌
it is indeed
I always wondered how can I change that but never felt confident enough to mess with my router
there should be a place
okay so basically, the host pc is connected to the network indirectly.
the host pc is connected to a Google wifi puck thingy which itself is connected to our actual router, all wired. the puck thingy is for extending the wifi to a far corner of the house but it has both input and output ethernet ports so it's receiving from router and passing it along to the host pc
what the fuck 💀
but the host pc is able to connect to the internet purely through the wired connection
is the weird puck thingy doing NAT
My pc is connected through ethernet, so I check
IPv4 Address
in the ethernet section.
If the host pc is using wi-fi you should check the Wireless LAN adapter sectionThat information shouldn't be confidential, but still
i am not sure about that
doesnt seem to say
anything about nat
connect the server pc and client pc on the same network without the puck thingy
lemme make sure ive grabbed the ip address from the correct section
uh.
Read what dominic said
yeah that's probably the simplest way huh
Connect both to the same device, either both to that thing or both to the main router
That thing acts as a subnetwork
you should never use something intended for wifi as a network switch
never know what its doing
okay so i know what it says, but somehow technomagically we've been able to hook up the google wifi puck to our router/modem and that puck itself is a wifi point with its own network name (demonstrably stronger internet connection when near it than when away compared to the router/modem's wireless network), and an ethernet cable from the puck to the host PC allows it to connect to the internet without connecting to wifi
LOL
but okay ill see if i can find a long enough ethernet cable to directly connect the pc to the regular router/modem
What the hell
yeah i kind of just didnt question it once i got it to work
very stressful setting it up
will check back in once i connect it directly
wait
im so confused
okay so i connected the host pc to the router/modem directly
the ipaddress changed
which makes sense
right
but when i ping it from the other pc, it still times out
all four times
💀?
could it be a client issue not a host issue?
maybe the client isnt properly reaching outward?
also this might be a clue to isolating the problem, but before i came here, i tried to use playit.gg. but when i tried to connect from the client, it said "pinging" like on the minecraft server screen, but it ultimately could not connect
maybe same issue if it's a client problem?
do i have to do any outbound settings on the client pc maybe? or is that not a thing
Well, outbound rules do exist, but all should be opened, otherwise you won't be able to connect to many services on the internet
Are you sure both devices are on the same network now?
well they should be since theyre both physically connected to the same router/modem
okay then uh forget about connecting from within the network. how can i connect to it as if it’s outside the network?
Check the ip on the server and client machines, do both share the same first three numbers?
that should work regardless right?
First two should be 192 and 168
Check the third one
yup the first three sets are the same
Then check if the
Default Gateway
is exactly the same for both machines
If those are still the same, I would recommend to also add the same port as UDP, just to test if that solves it
I normally don't host on windows, ports are open by default on linux, so I never paid attention if mc uses both tcp and udpwait the default gateway is slightly different
it’s off by two digits in the last segment
is that a problem?
same inbound rules just udp right?
Usually means you're on a subnetwork
yup
okay soooooo
adding the udp rules allowed me to connect to the server!
but is it a problem that when i try to directly ping the host ip address it still times out?
isnt that weird?
or like not normal
Some os have the ping "turned off"
It's not an os thing, it's actually a firewall thing, but you get the idea
hm okay.. but anyway i was able to connect so thank you everyone who helped! appreciate it very much :)
yw
!solved
Closed post!
Your post has been marked as solved!
Requested by lightningferix#0