Unable to join some servers without a VPN [duplicate]
Solution 1:
I have the same error on my local network, it looks like a firewall issue on the host/server side. For me, to troubleshoot I used nmap. The LAN game showed up in multiplayer as 10.0.0.21:49299. nmap reported that port from that IP as closed/filtered; i.e. a firewall issue.
To confirm it is a firewall issue, turn off the firewall (momentarily). See if you're able to connect while the firewall is disabled.
Solution 2:
It looks like it has something to do with Firewall not allowing traffic to the 1.12.jar file located in C:\Users\user\AppData\Roaming.minecraft\versions(version).
I assume that when you say you have "Altered the Firewall" you mean that you only allowed connections to the Java.exes but NOT the actual 1.12.jar file itself.
Important: When creating the rule it is important to make sure these configurations are set: Set the program path to the 1.12.jar file, and make sure to check "Allow the Connection" when configuring the rule.