I need help with Iptable (i dont know anything about it)

The server version is: 1.21 im using the latest Java version Alright so i recently created a minecraft server and I can join it without any problems but my friends cant. I was searching the forum and i found someone with my exact problem this is the link to that forum: https://www.minecraftforum.net/forums/support/server-support-and/2948958-trouble-with-port-forwarding-connection-timed-out and so he mentioned that he fixed it like this: Checked 'sudo iptables -S' rule set to confirm proper rules were in place. Noticed 25565 was not present. Flushed all rules with 'sudo iptables -F' Confirmed rules were flushed, again 'sudo iptables -S' Re-enabled most common rules: SSH, HTTP, HTTPS and 25565 sudo ufw allow sshsudo ufw allow httpsudo ufw allow httpssudo ufw allow 25565 sudo ufw enable Launched minecraft server, and confirmed connectivity with canyouseeme.org.Problem resolved! can someone help me do this thanks
Trouble with Port Forwarding / connection timed out error - Server ...
Specs and Relevant Information OS: Ubuntu 16.04. Java: Installed, OpenJDK is at the latest version Server Version: 1.13 Modem: Xfinity Router: Luxul ABR...
192 Replies
Admincraft Meta
Admincraft Meta7mo ago
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 r.radvin#0
ProGamingDk
ProGamingDk7mo ago
Are you using windows or linux
Radvin
RadvinOP7mo ago
windows 11
ProGamingDk
ProGamingDk7mo ago
Right then that entire guide is useless for you
Radvin
RadvinOP7mo ago
oh is there any way that i can fix it?
koolaid
koolaid7mo ago
Maybe try to run this in a windows administrator command line;
netsh advfirewall firewall add rule name= "Open Port 25565" dir=in action=allow protocol=TCP localport=25565
netsh advfirewall firewall add rule name= "Open Port 25565" dir=in action=allow protocol=TCP localport=25565
Does that work?
Eternal
Eternal7mo ago
this is a guide for linux the way to fix this is to wipe your windows install and use linux or dualboot
koolaid
koolaid7mo ago
Also, just like how the person you linked about had to reset their configuration first, you can accomplish that by runnning
netsh advfirewall reset
netsh advfirewall reset
but I would see if the first command works
Radvin
RadvinOP7mo ago
alr thanks will reset factory fix it?
koolaid
koolaid7mo ago
Don't listen to this guy, he's just being facetious for no reason
Radvin
RadvinOP7mo ago
oh
Eternal
Eternal7mo ago
rude
koolaid
koolaid7mo ago
Yes u are
Eternal
Eternal7mo ago
you're running an entirely different OS that guide is intended for another operating system which you're not running
Radvin
RadvinOP7mo ago
ik if i ran linux then i already fixed it thats the exact reason why im here to ask for help
koolaid
koolaid7mo ago
a good tech just needs a CLI to work with, OS is not important. I could tshoot templeOS lol its just networking
Eternal
Eternal7mo ago
you'd have to switch operating systems
koolaid
koolaid7mo ago
yes he came to ask how to do it in windows
Eternal
Eternal7mo ago
sure but the guide is not intended for his issue "i need help with iptables" the issue is you're trying to run something that doesn't run on your OS did you port forward with router?
koolaid
koolaid7mo ago
Radvin
changed the post title:
I need help with Iptable (i dont know anything about it)
Radvin
changed the post title:
I need help with Iptable (i dont know anything about it)
Eternal
Eternal7mo ago
OS-level is not enough
Radvin
RadvinOP7mo ago
yes
Eternal
Eternal7mo ago
that's progress
koolaid
koolaid7mo ago
Did the command work?
Eternal
Eternal7mo ago
windows has a GUI firewall manager afaik never touched it
Radvin
RadvinOP7mo ago
nope im trying the second one
Eternal
Eternal7mo ago
might wanna check that one though I have no idea how to interact with windows firewall
Radvin
RadvinOP7mo ago
should i just disable firewall and try it?
koolaid
koolaid7mo ago
You can flick it on and off to isolate the issue to the firewall sure
ProGamingDk
ProGamingDk7mo ago
Do note theres a chance you are cgnatted, also check if you have any other firewall etc from antivirus programs !cgnat
Carl-bot
Carl-bot7mo ago
We may have bad news for you :C
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 portforwards 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. 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 up
Admincraft Canned Responses
Radvin
RadvinOP7mo ago
alr i turned the firewall off its not working
koolaid
koolaid7mo ago
Oh ok. So it's not an issue with firewall settings.
Radvin
RadvinOP7mo ago
is something wrong with my port forwarding on my router
koolaid
koolaid7mo ago
You have multiple computers on your LAN you can connect to this server from correct?
Radvin
RadvinOP7mo ago
No description
Radvin
RadvinOP7mo ago
i only have a single computer connected to my router via LAN
koolaid
koolaid7mo ago
is your host computer have the internal IP 192.168.1.101? You can check by running ipconfig in cmd
Radvin
RadvinOP7mo ago
yes Ethernet adapter Ethernet: Connection-specific DNS Suffix . : homestation.setup IPv4 Address. . . . . . . . . . . : 192.168.1.101 Subnet Mask . . . . . . . . . . . : 255.255.255.0 Default Gateway . . . . . . . . . : 192.168.1.1
koolaid
koolaid7mo ago
And you can connect via localhost correct?
Radvin
RadvinOP7mo ago
yeah i can join it without any problems
Lunaiskey
Lunaiskey7mo ago
what ip are you giving your friends?
Radvin
RadvinOP7mo ago
my friends can not join it tho my external ip
koolaid
koolaid7mo ago
Try to disable antivirus not firewall
Lunaiskey
Lunaiskey7mo ago
so the one that shows up if you put whats my ip into google?
koolaid
koolaid7mo ago
and see if tht has an affect
Radvin
RadvinOP7mo ago
i even checked it at canyouseeme.org
Radvin
RadvinOP7mo ago
Open Port Check Tool -- Verify Port Forwarding on Your Router
A free open port check tool used to detect open ports on your connection. Test if port forwarding is correctly setup or if your port is being blocked by your firewall or ISP.
Radvin
RadvinOP7mo ago
ok
koolaid
koolaid7mo ago
disable windows defender and any antivirus you may have installed
Radvin
RadvinOP7mo ago
Error: I could not see your service on (my ip) on port (25565)
Lunaiskey
Lunaiskey7mo ago
use https://mcsrvstat.us/ if you wanna see if your server id public or not
Radvin
RadvinOP7mo ago
ok
Lunaiskey
Lunaiskey7mo ago
in your server.properties the ip field is blank correct?
Radvin
RadvinOP7mo ago
Could not get the server status… yep
Lunaiskey
Lunaiskey7mo ago
your on ethernet right?
Radvin
RadvinOP7mo ago
yes
Lunaiskey
Lunaiskey7mo ago
and only ethernet
Radvin
RadvinOP7mo ago
No description
Radvin
RadvinOP7mo ago
i did this one too
Lunaiskey
Lunaiskey7mo ago
do you have any antivirus installed othrr the windows defender?
Radvin
RadvinOP7mo ago
nope and i just turned it off
koolaid
koolaid7mo ago
Go to whatismyip and see if it is different than the router page at 192.168.0.1 to rule out you having a dynamic IP and not a static one It would be really useful if you had a 2nd machine on your home network to try to connect with
Radvin
RadvinOP7mo ago
i can use my phone
Lunaiskey
Lunaiskey7mo ago
if you got an android phone you could use pojav launcher idk if ios has pojav
Radvin
RadvinOP7mo ago
alr
koolaid
koolaid7mo ago
Can also try to disable UDP on the port rules and only allow TCP but id be surprised if that works tbh
Radvin
RadvinOP7mo ago
ok
Lunaiskey
Lunaiskey7mo ago
you disabled windows defender?
Radvin
RadvinOP7mo ago
my IP Address: at http://192.168.1.1/ is the same one as whats my ip yes
Lunaiskey
Lunaiskey7mo ago
actually you can just use minechat aswell if you dont wanna use pojav
Radvin
RadvinOP7mo ago
i dont have any minecraft on my phone i can ask my friend to come over and test it
Lunaiskey
Lunaiskey7mo ago
just download minechat or pojav launcher
Radvin
RadvinOP7mo ago
what should he put at the server address on his minecraft?
Eternal
Eternal7mo ago
IP:port
Radvin
RadvinOP7mo ago
its alr he livins near my house
Eternal
Eternal7mo ago
just IP if you use the 25565 port which seems like you do and yes external IP
Radvin
RadvinOP7mo ago
external ip? alr
koolaid
koolaid7mo ago
in this case, 192.168.1.101:25565
Eternal
Eternal7mo ago
unless if he's connected to your network
koolaid
koolaid7mo ago
no yes that is what we are testing
Radvin
RadvinOP7mo ago
ok
Eternal
Eternal7mo ago
oh we're testing internal connections to troubleshoot? okay
Lunaiskey
Lunaiskey7mo ago
you coukd also check urself using an app on ur phone... like the ones i suggested then you dont need an outside guy to come over
Radvin
RadvinOP7mo ago
alr then what should i download porjav or minechat
Eternal
Eternal7mo ago
you mean a connector?
koolaid
koolaid7mo ago
If you can- connect locally using internal IP, port is forwarded to 192.168.1.101(the host) and tcp is enabled, firewall and antivirus are off, and still can't connect externally, it may be firewall settings set up on ISP side and you'd want to give them a call. Also maybe look up the router model online and see if there are any builtin rules for port 25565 (sort of unlikely but worth checking)
Eternal
Eternal7mo ago
port forwarding has always been hell :sad:
Radvin
RadvinOP7mo ago
alr i will try it
koolaid
koolaid7mo ago
actually u can try this too and is quick check netsh interface portproxy show all and see if 25565 is even there
Radvin
RadvinOP7mo ago
there is nothing there
koolaid
koolaid7mo ago
Ok now try this
Radvin
RadvinOP7mo ago
(c) Microsoft Corporation. All rights reserved. C:\Windows\System32>netsh interface portproxy show all C:\Windows\System32>
koolaid
koolaid7mo ago
netsh interface portproxy add v4tov4 listenport=25565 listenaddress=192.168.1.101 connectport=25565 connectaddress=192.168.1.101
netsh interface portproxy add v4tov4 listenport=25565 listenaddress=192.168.1.101 connectport=25565 connectaddress=192.168.1.101
Lunaiskey
Lunaiskey7mo ago
either as they both eould allow you to ping/attempt to join normally
Radvin
RadvinOP7mo ago
i did it
koolaid
koolaid7mo ago
lets try again
Radvin
RadvinOP7mo ago
C:\Windows\System32>netsh interface portproxy show all Listen on ipv4: Connect to ipv4: Address Port Address Port --------------- ---------- --------------- ---------- 192.168.1.101 25565 192.168.1.101 25565
koolaid
koolaid7mo ago
try to connect to the server or restart the mc server once then try
Radvin
RadvinOP7mo ago
ok should i turn firewall off?
koolaid
koolaid7mo ago
yeah
Radvin
RadvinOP7mo ago
alr the server doesnt load it just pop up for a sec and the closes
koolaid
koolaid7mo ago
The console crashes?
Radvin
RadvinOP7mo ago
yeah
koolaid
koolaid7mo ago
Ok
netsh interface portproxy delete v4tov4 listenport=25565 listenaddress=192.168.1.101 connectport=25565 connectaddress=192.168.1.101
netsh interface portproxy delete v4tov4 listenport=25565 listenaddress=192.168.1.101 connectport=25565 connectaddress=192.168.1.101
and see if that stops it from crashing
Radvin
RadvinOP7mo ago
its still crashing
koolaid
koolaid7mo ago
Ok, very weird. Can restart your pc, then after that there are crash logs that you can try or you can just try to move your server files to a fresh server.jar directory
Radvin
RadvinOP7mo ago
alr i will restart now alr im back i moved it to a new folder and its still crashing
Admincraft Meta
Admincraft Meta7mo ago
We have uploaded your file to a paste service for better readability
Paste services are more mobile friendly and easier to read than just posting a file
crash-2024-07-07_17.06.25-server.txt
Requested by r.radvin#0
Radvin
RadvinOP7mo ago
btw every time that i my friends tried to join my server they had this error
koolaid
koolaid7mo ago
so apparently that is a sort of newer issue happening on multiple microsoft games over the past few months, which is one thing, but your server not even being able to start now is sort of an issue lol
Radvin
RadvinOP7mo ago
yeah:alot: it was working fine like 30min ago
koolaid
koolaid7mo ago
I'd keep just whatever is essential to your server suchas your map file, delete literally everything else and completely reinstall java
Radvin
RadvinOP7mo ago
its my first server so i dont have any maps alr i will reinstall java
koolaid
koolaid7mo ago
also if it crashes again on boot;
In server.properties change your max tick time to -1

In server.properties doublecheck your server-ip value and make sure it is correct in the file. Also
doublecheck with ipconfig
In server.properties change your max tick time to -1

In server.properties doublecheck your server-ip value and make sure it is correct in the file. Also
doublecheck with ipconfig
Radvin
RadvinOP7mo ago
it did and max-tick-time=60000 this one?
koolaid
koolaid7mo ago
yes
Radvin
RadvinOP7mo ago
server ip is blank
koolaid
koolaid7mo ago
Ok
Radvin
RadvinOP7mo ago
Ethernet adapter Ethernet: Connection-specific DNS Suffix . : homestation.setup IPv4 Address. . . . . . . . . . . : 192.168.1.101 Subnet Mask . . . . . . . . . . . : 255.255.255.0 Default Gateway . . . . . . . . . : 192.168.1.1 and this is the ip config
koolaid
koolaid7mo ago
Does it boot? with -1 tickrate value
Radvin
RadvinOP7mo ago
nope
koolaid
koolaid7mo ago
Wow
Admincraft Meta
Admincraft Meta7mo ago
We have uploaded your file to a paste service for better readability
Paste services are more mobile friendly and easier to read than just posting a file
crash-2024-07-07_17.21.35-server.txt
Requested by r.radvin#0
Radvin
RadvinOP7mo ago
im willing to even reset my whole pc and network to make the server working should i do it? will reseting my pc fix this problem?
koolaid
koolaid7mo ago
in cmd run this command shutdown /r /t 1
Radvin
RadvinOP7mo ago
alright i did it
koolaid
koolaid7mo ago
and
Radvin
RadvinOP7mo ago
the server is still crashing
koolaid
koolaid7mo ago
Here,
netsh interface portproxy reset
netsh interface portproxy reset
Radvin
RadvinOP7mo ago
Its ficed fixed* it doesnt crash anymore thanks
koolaid
koolaid7mo ago
Nice Ok now onto the original issue
Radvin
RadvinOP7mo ago
yeah my friends can not join
koolaid
koolaid7mo ago
25565 is in your server properties file correct?
Radvin
RadvinOP7mo ago
yes
Admincraft Meta
Admincraft Meta7mo ago
We have uploaded your file to a paste service for better readability
Paste services are more mobile friendly and easier to read than just posting a file
server.properties
Requested by r.radvin#0
koolaid
koolaid7mo ago
put your external IP in this website https://www.yougetsignal.com/tools/open-ports/
Open Port Check Tool - Test Port Forwarding on Your Router
Port checker is a utility used to identify your external IP address and detect open ports on your connection. This tool is useful for finding out if your port forwarding is setup correctly or if your server applications are being blocked by a firewall.
koolaid
koolaid7mo ago
and see if it can find an open or closed 25565 port
Radvin
RadvinOP7mo ago
Closed Port 25565 is closed
koolaid
koolaid7mo ago
delete your ip from this chat lol
Radvin
RadvinOP7mo ago
mb
koolaid
koolaid7mo ago
its probably not a big deal
Radvin
RadvinOP7mo ago
yeah
koolaid
koolaid7mo ago
but yeah there is your problem hang on..
Radvin
RadvinOP7mo ago
alr
koolaid
koolaid7mo ago
and your server was running when you tried that?
Radvin
RadvinOP7mo ago
yes
koolaid
koolaid7mo ago
This getsockopt seems to be a newer issue associated with the newest update, someone said they downgraded the server to version 1.19.4 and it worked Maybe if that version works, you can do that for like a week or so until this newer issue is probably hotfixed
Radvin
RadvinOP7mo ago
how can i down grade it i have to download another server?
koolaid
koolaid7mo ago
Yeah and when you are in your minecraft launcher everyone has to change their client version
Radvin
RadvinOP7mo ago
yeah ik but i dont know how can i downgrade it (the server) https://www.minecraft.net/en-us/download/server
koolaid
koolaid7mo ago
MCVersions.net - Create your own 1.19.4 Minecraft server!
Create and host your own 1.19.4 Minecraft server with Nodecraft's NodePanel today with ease. Try it now!
Radvin
RadvinOP7mo ago
oh alr thanks
koolaid
koolaid7mo ago
So if that works, you know the issue is with the version, and not your computer/network. If you want to play the latest update you will have to either wait for this to be fixed or find workaround
Radvin
RadvinOP7mo ago
alr im downloading the server
koolaid
koolaid7mo ago
also this is the thing you disabled correct? windows defender firewall not just windows defender/antivirus?
No description
koolaid
koolaid7mo ago
also can run this
netsh advfirewall firewall add rule name="TCP Port 25565" dir=in action=allow protocol=TCP localport=25565
netsh advfirewall firewall add rule name="TCP Port 25565" dir=in action=allow protocol=TCP localport=25565
Radvin
RadvinOP7mo ago
alr
koolaid
koolaid7mo ago
on admin cmd*
Radvin
RadvinOP7mo ago
No description
Radvin
RadvinOP7mo ago
i turned off this one
koolaid
koolaid7mo ago
Ok correct one
Radvin
RadvinOP7mo ago
No description
Radvin
RadvinOP7mo ago
and this one And this is minechat
Radvin
RadvinOP7mo ago
No description
koolaid
koolaid7mo ago
Do you have the same error on the downgraded version?
Radvin
RadvinOP7mo ago
yes im asking one of my friends to send a screen shot of the error
Mamad
Mamad7mo ago
No description
Radvin
RadvinOP7mo ago
this is the error
koolaid
koolaid7mo ago
I think its something on your ISP's side just to confirm, ask your friend to do this
Radvin
RadvinOP7mo ago
he hosted a 1.21 too
koolaid
koolaid7mo ago
open cmd, and type in
ping (your external ip here)
ping (your external ip here)
Radvin
RadvinOP7mo ago
and i couldnt join
koolaid
koolaid7mo ago
and make sure there is a reply does he happen to use the same ip?
Radvin
RadvinOP7mo ago
i dont think so
koolaid
koolaid7mo ago
isp*** not ip
Radvin
RadvinOP7mo ago
no
koolaid
koolaid7mo ago
is there a response for ping
Radvin
RadvinOP7mo ago
@Mamad do this
koolaid
koolaid7mo ago
output should look like this
Pinging 8.8.8.8 with 32 bytes of data:
Reply from 8.8.8.8: bytes=32 time=13ms TTL=57
Reply from 8.8.8.8: bytes=32 time=11ms TTL=57
Reply from 8.8.8.8: bytes=32 time=12ms TTL=57
Reply from 8.8.8.8: bytes=32 time=12ms TTL=57

Ping statistics for 8.8.8.8:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 11ms, Maximum = 13ms, Average = 12ms
Pinging 8.8.8.8 with 32 bytes of data:
Reply from 8.8.8.8: bytes=32 time=13ms TTL=57
Reply from 8.8.8.8: bytes=32 time=11ms TTL=57
Reply from 8.8.8.8: bytes=32 time=12ms TTL=57
Reply from 8.8.8.8: bytes=32 time=12ms TTL=57

Ping statistics for 8.8.8.8:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 11ms, Maximum = 13ms, Average = 12ms
Radvin
RadvinOP7mo ago
@Mamad he is not answering i can do it with my phone by connecting to another wifi
koolaid
koolaid7mo ago
if it works, call your isp and tell them you set up port forwarding rules for port 25565 but the port will not open and allowed firewall settings/disabled firewall on the host
Radvin
RadvinOP7mo ago
64 bytes from :,icmp_seq=1,ttl=62,time=84.9 ms Avg,ttl = 62 Avg,time = 72 ms It's like this
koolaid
koolaid7mo ago
yeah call your isp and tell them that they might have some rules in place
Radvin
RadvinOP7mo ago
alr thank you for everything
koolaid
koolaid7mo ago
because logically you did everything you are supposed to on your end sure hope it works
Radvin
RadvinOP7mo ago
thank you so much have a great day cya later
koolaid
koolaid7mo ago
Same to you ✌️

Did you find this page helpful?