Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

More details on hosting public instance #382

Open
Brandon10x15 opened this issue Mar 14, 2023 · 3 comments
Open

More details on hosting public instance #382

Brandon10x15 opened this issue Mar 14, 2023 · 3 comments
Labels
enhancement New feature or request

Comments

@Brandon10x15
Copy link

Hey how's it going?
I've followed the video for setting up on windows and I'm pretty technically inclined but was unable to get it working.
What exactly do you need to do in order to use a public ip for friends to use my instance to join

@Brandon10x15 Brandon10x15 added the enhancement New feature or request label Mar 14, 2023
@Brandon10x15
Copy link
Author

Could it be because I'm also using port 19132 to host a geyser Java server?

@Pugmatt
Copy link
Owner

Pugmatt commented Mar 14, 2023

BedrockConnects needs port 19132, with how the bypass works, so yes that would be one reason. You would need to change the port of the geyser Java server for them both to be on the same setup. Or if you know how, you can create a new virtual network device using IP aliasing, and bind the BedrockConnect server to that new IP using the startup argument bindip.

Reason why I haven't personally made a guide for making a public instance, for Windows at least using the method from the video guide, is that it can get a little complicated, depending on your setup. Stuff that I don't 100% understand myself, so I'll try my best, and you might need to do some research/experimentation on your end as well. But here are details on getting that working.

Making DNS server public:

  • Port forward port 53 in your router (And port 19132 if not already)
  • Referencing back to the video, when reaching the prompt "Which IP should be used for the DNS records:" when launching BedrockConnect, enter your PUBLIC IP address (https://whatismyipaddress.com/) instead of a local/internal IPv4 address

Your friends should then be able to set their game console's DNS to your public IP address, and connect through the usual method.

If you are also planning to use this for your own personal use inside the same network (your game console and BedrockConnect setup is on the same network), that is where things could get complicated.

If your router supports NAT loopback (devices on LAN can access another machine on the LAN via the external IP address), then it shouldn't be an issue, and you should be able to connect as usual. If you try connecting to your BedrockConnect instance using the DNS method, and with the public IP address set in the previous step stated before, and it works, then most likely NAT loopback is enabled and you're good to go.

If you aren't able to connect, but your friends are able to, NAT loopback might not be enabled or possible on your router. In which case you have a couple of options:

  • Google to see if it's possible to enable NAT loopback on your router

  • Or, if you have a second device laying around, you can try hosting a second DNS server on that device. Have one DNS server serve the public IP address that your friends will use, and another that serves your internal IP address that BedrockConnect is binded to that you can use on your network.

  • Or, if the other two options aren't possible, and you only have access to one machine:

    (I've experimented with this, but might not work 100% consistently) Regenerate the bc_dns.conf from the previous step, using the local/internal IP address, copy and paste this file to a different location (to avoid it being overwritten), and open the file in a text editor. For each domain in this file, duplicate the line, but set it to your public IP address.

    Example (For the example, 3.3.3.3 is internal, and 99.99.99.99 is external):

    Before:

    <?xml version="1.0" encoding="utf-8"?>
    <DNSMasqConfig xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
      <DNSMasqEntries>
        <DNSMasqHost name="hivebedrock.network" a="3.3.3.3" />
        <DNSMasqHost name="mco.mineplex.com" a="3.3.3.3" />
        <DNSMasqHost name="play.mineplex.com" a="3.3.3.3" />
        <DNSMasqHost name="play.inpvp.net" a="3.3.3.3" />
        <DNSMasqHost name="mco.lbsg.net" a="3.3.3.3" />
        <DNSMasqHost name="play.lbsg.net" a="3.3.3.3" />
        <DNSMasqHost name="mco.cubecraft.net" a="3.3.3.3" />
        <DNSMasqHost name="play.galaxite.net" a="3.3.3.3" />
      </DNSMasqEntries>
    </DNSMasqConfig>
    

    After:

     <?xml version="1.0" encoding="utf-8"?>
      <DNSMasqConfig xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
        <DNSMasqEntries>
          <DNSMasqHost name="hivebedrock.network" a="3.3.3.3" />
          <DNSMasqHost name="hivebedrock.network" a="99.99.99.99" />
          <DNSMasqHost name="mco.mineplex.com" a="3.3.3.3" />
          <DNSMasqHost name="mco.mineplex.com" a="99.99.99.99" />
          <DNSMasqHost name="play.mineplex.com" a="3.3.3.3" />
          <DNSMasqHost name="play.mineplex.com" a="99.99.99.99" />
          <DNSMasqHost name="play.inpvp.net" a="3.3.3.3" />
          <DNSMasqHost name="play.inpvp.net" a="99.99.99.99" />
          <DNSMasqHost name="mco.lbsg.net" a="3.3.3.3" />
          <DNSMasqHost name="mco.lbsg.net" a="99.99.99.99" />
          <DNSMasqHost name="play.lbsg.net" a="3.3.3.3" />
          <DNSMasqHost name="play.lbsg.net" a="99.99.99.99" />
          <DNSMasqHost name="mco.cubecraft.net" a="3.3.3.3" />
          <DNSMasqHost name="mco.cubecraft.net" a="99.99.99.99" />
          <DNSMasqHost name="play.galaxite.net" a="3.3.3.3" />
          <DNSMasqHost name="play.galaxite.net" a="99.99.99.99" />
        </DNSMasqEntries>
      </DNSMasqConfig>
    

    Once that is done for all the domains, save the file, and load that file into mod0Umleitung when clicking "Load Ruleset". Ideally, this should serve both IP addresses, and the game console will try both. I've tried this on Nintendo Switch, and it appears to work, but I cannot guarantee it works on everything.

If I have more free time, I'll see if there's anyway to simplify this in the future. For now though, the above is how to do it. If anyone has any ideas, contributions are always welcomed.

@taoyx
Copy link

taoyx commented Mar 16, 2024

Just wondering whether this method is still working?

Just now, I tried to change the DNS server to US, German, restarted the xbox, but I still cannot add a custom server without game pass.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants