Posted March 10, 20232 yr If you're having trouble with joining servers or sharing to LAN, this thread should help by providing some solutions for common causes. This is my first time writing a comprehensive troubleshooting guide on this forum so if you have any feedback please let me know. 1. Hosts file What's a hosts file and why should I care? Spoiler When connecting to a server, it needs to lookup the IP address for the domain name using DNS. You can think of this like looking up the phone number of a company. Before using DNS, your OS (Windows, macOS, whatever) first checks the hosts file, which contains overrides. Some apps use this file to block websites and connections to servers. How do I fix it? Spoiler On Windows, there's two ways: 1a. Hosts File Editor Step 1: Install Microsoft PowerToys if you haven't already Step 2: Run PowerToys and look for the "Hosts File Editor" on the left and click the launch option Step 3: Switch off entries mentioning Mojang or Minecraft Step 4: Switch off entries containing the IP 127.0.0.1, ::1, fe80, 0.0.0.0, ::0 or similar. Step 5: Close the editor and restart your PC. You can uninstall PowerToys if you don't need it anymore. More info on the hosts file editor can be found here: https://learn.microsoft.com/en-gb/windows/powertoys/hosts-file-editor 1b. Notepad Step 1: Press Win + R to open the run prompt Step 2: Paste this in and press enter: `powershell "Start-Process Notepad -Verb runAs -ArgumentList "$env:windir\system32\drivers\etc\hosts""` Step 3: Make a copy of the entire thing before making any changes, so that you can restore the backup if needed Step 4: Add a # to the start of lines mentioning Mojang or Minecraft Step 5: Add a # to the start of lines with the IP 127.0.0.1, ::1, fe80, 0.0.0.0, ::0 or similar. Step 6: Press Ctrl + S to save and restart your PC. How do I know if this worked? Repeat the steps above and check if the changes you made to the file have applied. 2. DNS What's DNS and why should I care? Spoiler When connecting to a server, it needs to lookup the IP address for the domain name using DNS. You can think of this like looking up the phone number of a company. If your DNS is broken, slow or unreliable, it may cause problems connecting to servers and slow down web browsing. How do I fix it? Spoiler Manually change your DNS to Cloudflare's, which has a good reputation for performance and reliability. To do this on Windows 11, there's two main ways: 2a. Windows 11 Settings app Step 1: Open the Settings app and click the "Network & Internet" tab Step 2: Click "Properties" at the top Step 3: Beside "DNS server assignment", click edit and change to manual Step 4: Switch on both IPv4 and IPv6 Step 5: Enter the following settings for IPv4: Preferred DNS IP: 1.1.1.2 DNS over HTTPS: On (manual template) DNS over HTTPS template: https://security.cloudflare-dns.com/dns-query Fall-back to plaintext: On Alternative DNS IP: 1.0.0.2 DNS over HTTPS: Off Step 6: Enter the following settings for IPv6: Preferred DNS IP: 2606:4700:4700::1112 DNS over HTTPS: On (manual template) DNS over HTTPS template: https://security.cloudflare-dns.com/dns-query Fall-back to plaintext: On Alternative DNS IP: 2606:4700:4700::1002 DNS over HTTPS: Off Step 6: Click save and restart your PC. It's important you do both IPv4 and IPv6, as if one is invalid it will cause issues. 2b. Control Panel Network and Sharing Centre Step 1: Press Start, search for "Control Panel" and open it Step 2: Click "Network and Internet" and then "Network and Sharing Centre" Step 3: On the right, click the link next to "Connections:" then click "Properties" Step 4: Click "Internet Protocol Version 4 (TCP/IPv4)" and click "Properties" Step 5: Click "Use the following DNS server addresses" and enter the following addresses: Preferred DNS server: 1.1.1.2 Alternate DNS server: 1.0.0.2 Step 6: Click OK then "Internet Protocol Version 6 (TCP/IPv6)" and "Properties" Step 7: Click "Use the following DNS server addresses" and enter the following addresses: Preferred DNS server: 2606:4700:4700::1112 Alternate DNS server: 2606:4700:4700::1002 Step 8: Click OK on the remaining windows and restart your PC. It's important you do both IPv4 and IPv6, as if one is invalid it will cause issues. How do I know if this worked? Go to https://1.1.1.1/help and it should say you're connected to 1.1.1.1. If it doesn't, open PowerShell, run `Clear-DnsClientCache`, reboot and try again. 3. Firewall What's a firewall and why should I care? Spoiler A firewall controls what can and can't connect to your computer. If it's setup incorrectly, it might block connections in a way that breaks the connection test when joining a server. How do I fix it? Spoiler This info is mainly useful for server owners. Most users won't need to do anything here unless they've explicitly configured their firewall to block certain traffic. I can't give you detailed instructions as there's too many different ones. A general rule of thumb is if you know you've currently configured your firewall to block certain traffic, make sure you always do both directions - that is, both incoming and outgoing. 4. Launchers and Java Why would this matter and how do I fix it? Spoiler Some launchers may add extra launch arguments to the game which conflict or override Forge's. MinecraftForge only officially supports the Vanilla launcher, but I'll tell you what launch arguments to look out for regardless of launcher. By default, the Vanilla launcher will work fine. However, if you or another launcher added extra arguments, make sure you *don't* have any of the following as it'll conflict with Forge: - -Djava.net.preferIPv6Addresses - -Djava.net.preferIPv4Stack Java might be explicitly set to apply one of these arguments globally. You can try using jarfix to fix this. 5. VPNs and proxies If you're using a VPN or proxy, it might be blocking certain traffic. Try disabling it and see if it fixes the issue. 6. General router settings (I'm sorry if you've gotten this far and still having trouble.) What's a router? Spoiler It's what connects your computer to the Internet and other computers on your LAN. How do I fix it? Spoiler The steps here are intentionally very general and may not apply to your specific router, because there's too much variety in how their settings pages work. If you're not sure, ask your ISP (the people who sell Internet to you) for help or someone who knows more about networking. Do not blindly follow these steps if you don't know what you're doing or you may lose your Internet connection. Step 1: Open your router's settings page. This is usually http://192.168.1.1 or https://192.168.0.1 Step 2: Check if there's any firmware updates available and install them if there are Step 3: Check the firewall settings and make sure it's not blocking any traffic on ports 25565 or 25575 Step 4: Try enabling or disabling port triggering on ports 25565 and 25575 Step 5: Try enabling or disabling UPnP Step 6: Enable IPv6 if it's disabled. If it's already enabled, leave it as-is. Step 7. Temporarily enable DMZ for your computer's IP to see if it fixes the issue. If it does, you'll need to figure out what's blocking the connection and disable DMZ again. Step 8: Change the router's DNS settings to Cloudflare's, which are listed in the DNS section above. 7. Adapter settings What's an adapter and why should I care? Spoiler It's what connects your computer to the router. If it's configured incorrectly, it might unintentionally block connections in a way that breaks the connection test when joining a server. How do I fix it? Spoiler Step 1: Press Start, search for "Control Panel" and open it Step 2: Click "Network and Internet" and then "Network and Sharing Centre" Step 3: On the right, click the link next to "Connections:" then click "Properties" Step 4: Make sure both "Internet Protocol Version 4 (TCP/IPv4)" and "Internet Protocol Version 6 (TCP/IPv6)" are checked Step 5: If the properties for IPv4 is set to use a specific IP address rather than obtaining one automatically, you may need to do the same for IPv6. If you can set a static IP from the router-side and have it set to obtain an IP automatically for both v4/v6, that may also work. 8. Antivirus If you're using a third-party antivirus (not Windows Defender), it might be blocking certain traffic. Try disabling it and see if it fixes the issue. If it does, add an exception for Minecraft and Forge. Contact your antivirus provider for further help with this. 9. Docker For server owners, if you're using Docker, it might be worth trying to explicitly enable IPv6 support. This is usually done by adding `--sysctl net.ipv6.conf.all.disable_ipv6=0` to the `docker run` command. Another thing you can try is adding AAAA records for your server's domain name to point to the IPv6 address of your server, assuming everything else IPv6-related is already working of course. Also refer to the Firewall section above - it's very important that if you block IPv6 for some reason, that you do it for both incoming and outgoing traffic and not just one direction. 10. Finale If, after everything here, you're still having trouble that only seems to affect Forge, please ping me (Paint_Ninja#6054) in #squirrels on the Forge Discord server so I can find out what's going on and why it's happening. I wrote the PRs that added full dual-stack networking support to Forge and want to make sure I've covered all bases. While I did extensive testing, there's always the possibility I missed something that only affects a small number of users. This applies to anyone having trouble - players, server owners, launcher devs... Edited March 10, 20232 yr by Paint_Ninja Add link to PowerToys, mention jarfix Official Forge Discord server | Support FAQ for players
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.