"Connected Timed Out (getsockopt)" Friend cant join my port forwarded server
I created a minecraft server yesterday on my Raspberry Pi 5 and it works for me and my friend to join but it does not let my other friend join as he gets the error "Connected Timed Out (getsockopt)" anyone know how to solve this?
29 Replies
!cgnat
We may have bad news for you :C
You may be under a CGNAT which is a method that ISP's use to conserve IPV4 IP's due to how limited they are now. What this means in plain terms is that your IP address is being shared with other people as your router goes to the ISP's router, by default this means port forwarding doesn't work.
We need to check if you are under a CGNAT and we got 2 options.
Option 1: commands
Depending on your OS, run the following command:
- Windows:
iex (Invoke-RestMethod -Uri "https://raw.githubusercontent.com/DominicTWHV/Is-It-CGNAT/refs/heads/main/windows.ps1")
- Linux: curl -s https://raw.githubusercontent.com/DominicTWHV/Is-It-CGNAT/refs/heads/main/linux.sh | bash
-# You should never run such things without reviewing and understanding the code
Option 2: manually
Open your router's configuration interface. Somewhere, you'll see something like 'external' or 'public' IP.
If your external IP is in one of the following ranges, you're basically screwed as long as port forwards go:
- 10.0.0.0/8
- 172.16.0.0/20
- 192.168.0.0/16
- 100.64.0.0/10
- any IPv6 address/range - This shouldn't be a problem, but Minecraft's IPv6 support is still rather quirky. You're at your own, but we're happy if you share your experience.
What do I do now?
You should ask your ISP for a public and IPv4 address (but this may cost you money).
NB: your internal IP should and most probably will be in one of the first three ranges, don't mix them upwould this be my friend is under cgnat?
coz one of my friends can join but the other cant
it says:
[INFO] No CGNAT detected. Only one or no internal IPs found.
[ERROR] You should not be behind CGNAT for IPv4, but your TCP port 25565 is not open.
Also as far as I can see none of my ips are part of the list in option two
no
the issue is if you are under cgnat
You have not fowarded the port
How does that make sense though if one friend can join who is not on my network but the other cant
Like friend A can join my server and he lives like 5 mins away from me but friend B and C cant and they live on the otherside of my town
I believe this is the correct way to port forward

the internal ip is the ip of my rasperry pi 5
Ah
Maybe your isp sucks
and either only fowards it to their internal network or just fowards it to that zone's router
Friend A isnt on the same isp as me though
and b and c?
different aswell
Have them run traceroutes
The script says your port isnt open
yeah it says the same for port checkers online too
and one says get check port for private ip
yet friend A can join
Friend A is on the same isp provider
Ah
i didnt know is there a way around it
Friend A is on your ISP
Yeah same company as me
which means port fowarding can be just inside your isp
B and C are not
Is there no way to set it up outside of my isp
If your ISP doesnt allow not rlly
try a tunnel service
or just buy hosting
Could you give me an example of a tunnel service
a pi is not that powerful
and also could i not contact my isp
so comparable hosting will be cheap
i dunno pi 5 is quite good i find
i have like the highest plan on mine and they dont care about anything i ask
you can try
but most isps wont give you the time of day
okay ill see what I can do i appreciate your support
It appears I can setup a "DMZ" for the WAN would that be fine
no you are already fowarding
dmz wont rlly do much
Idk
cloudflared?
but it requires everyone to install an app
playit?
ill have a look
it says DMZ is on WAN setup