Pugmatt / BedrockConnect

Join any Minecraft Bedrock Edition server IP on Xbox One, Nintendo Switch, and PS4/PS5
GNU General Public License v3.0
1.41k stars 165 forks source link

DNS installed with install-bind.sh not working #360

Closed gappjust closed 1 year ago

gappjust commented 1 year ago

What happened?

Whenever i try to set DNS up on Ubuntu 22.04 with install-bind.sh script it does not work as intended. After script run:

Job for named.service failed.
See "systemctl status named.service" and "journalctl -xeu named.service" for details.

journalctl shows this:

Jan 08 13:11:13 bebra named[813322]: received control channel command 'reload'
Jan 08 13:11:13 bebra named[813322]: loading configuration from '/etc/bind/named.conf'
Jan 08 13:11:13 bebra named[813322]: /etc/bind/named.conf.options:3: option 'additional-from-cache' no longer exists
Jan 08 13:11:13 bebra named[813322]: reloading configuration failed: failure
Jan 08 13:11:13 bebra rndc[813560]: rndc: 'reload' failed: failure
Jan 08 13:11:13 bebra systemd[1]: named.service: Control process exited, code=exited, status=1/FAILURE

Tried to remove "additional-from-cache" from config, bind9 is up and running, but has no internet when connecting. systemctl status named:

● named.service - BIND Domain Name Server
     Loaded: loaded (/lib/systemd/system/named.service; enabled; vendor preset: enabled)
     Active: active (running) since Sun 2023-01-08 13:17:37 UTC; 14min ago
       Docs: man:named(8)
    Process: 813814 ExecStart=/usr/sbin/named $OPTIONS (code=exited, status=0/SUCCESS)
   Main PID: 813815 (named)
      Tasks: 4 (limit: 4608)
     Memory: 5.7M
        CPU: 45ms
     CGroup: /system.slice/named.service
             └─813815 /usr/sbin/named -u bind

Jan 08 13:17:37 bebra named[813815]: running
Jan 08 13:17:37 bebra named[813815]: zone lbsg.net/IN: sending notifies (serial 2014030801)
Jan 08 13:17:37 bebra named[813815]: zone galaxite.net/IN: sending notifies (serial 2014030801)
Jan 08 13:17:37 bebra named[813815]: network unreachable resolving './NS/IN': 2001:500:2d::d#53
Jan 08 13:17:37 bebra named[813815]: network unreachable resolving './DNSKEY/IN': 2001:7fe::53#53
Jan 08 13:17:37 bebra named[813815]: network unreachable resolving './NS/IN': 2001:7fe::53#53
Jan 08 13:17:37 bebra named[813815]: network unreachable resolving './DNSKEY/IN': 2001:7fd::1#53
Jan 08 13:17:37 bebra named[813815]: network unreachable resolving './NS/IN': 2001:7fd::1#53
Jan 08 13:17:37 bebra named[813815]: managed-keys-zone: Key 20326 for zone . is now trusted (acceptance timer complete)
Jan 08 13:17:37 bebra named[813815]: resolver priming query complete: success

Expected Behaviour?

After script run, DNS sets up and redirects all featured server domains to main instance of BedrockConnect.

Steps to reproduce.

  1. Download script
  2. sudo bash install-bind.sh
  3. Get Job for named.service failed. error
  4. Remove "additional-from-cache" from named.conf.options
  5. Restart bind9, systemctl shows as working
  6. Set DNS in settings, get "no connection error". DNS set on Android shows "connected without internet",

Screenshots/Videos

No response

Minecraft Bedrock Version

1.19.51

Console

PS5

Additional Context

No response

hlafaille commented 1 year ago

Same issue here. Viewing the bind9.service status also says /etc/bind/named.conf.options:3: option 'additional-from-cache' no longer exists. I'm going to try writing my own script in Python to do something similar to install-bind.sh.

Pugmatt commented 1 year ago

Had some time today to run through install-bind.sh on Ubuntu 22.04. Experienced the same error, and removing additional-from-cache allows it to run as you described. Will look into pushing a fix for this file. For me though after that, the DNS seemed to work fine on my devices when pointing them to the DNS, so I'm thinking the "no connection error" you're getting is related to something else. One thing to note, is that the BIND setup supplied from install-bind.sh is only supplying the DNS zones for the Minecraft featured servers, so if you don't have a secondary DNS set on your device to one such as 8.8.8.8, this could be why it's throwing an error. If you haven't already I would try setting the secondary DNS as well on your device to something like 8.8.8.8. (I realize in the "Setting up on Linux" guide this isn't clear, so I'll be sure to update that)

gappjust commented 1 year ago

"no connection error" you're getting is related to something else

Yep, figured out and it was a firewall issue.