I've recently come across an issue with my server while trying to set it up for playing with a friend on a different network. Let me give you the rundown.
If it helps to know, I do run Windows 10 on my computer. I have the server set up to run a version of 64 bit java all on a drive partition separate from the OS, where I usually keep my personal files. I can join the server, and so can my friend when they are on my network. I have allowed port 25565 through my router, the port the server runs on, and my computer's IP address is static to keep the rule working. My antivirus, Avast, seems to have no effect on the issue. I've let the port through on the Windows Firewall, inbound and outbound, on TCP and UDP. Even https://canyouseeme.org/ tells me it can see the port...
Until I eventually shut down the computer and open it up again. I then have to go through the entire process again to have the same issue occur. How might I go about fixing this? I'll try to clarify on anything I could have missed. Any help would be appreciated.
Are you shutting down the computer or putting it to "sleep/hibernate"? Reason asking is the verbatim you used of "open it back up". Putting a computer to sleep can clog up the internal firewall. Especially if you don't shutdown the minecraft server.