SpigotMC / BungeeCord

BungeeCord, the 6th in a generation of server portal suites. Efficiently proxies and maintains connections and transport between multiple Minecraft servers.
https://www.spigotmc.org/go/bungeecord
Other
1.57k stars 1.1k forks source link

Forced Hosts #1532

Open meyerzinn opened 9 years ago

meyerzinn commented 9 years ago

I have not been able to successfully configure forced hosts. What should the DNS look like (SRV or A)? My main server (play.xxxxxxxx.net) works perfectly, but when I do get other subdomains to point to the proxy they always end up going to the hub. Here is my config:

groups:
  AniSkywalker:
  - admin
disabled_commands:
- disabledcommandhere
player_limit: -1
stats: 83739531-b555-4f4e-bac2-9aaf8dadbd25
permissions:
  default:
  - bungeecord.command.server
  - bungeecord.command.list
  builder:
  - bungeecord.server.build
  admin:
  - bungeecord.server.build
  - bungeecord.server.development
  - bungeecord.command.alert
  - bungeecord.command.end
  - bungeecord.command.ip
  - bungeecord.command.reload
listeners:
- max_players: 1
  fallback_server: hub
  host: 0.0.0.0:25565
  bind_local_address: true
  ping_passthrough: false
  tab_list: SERVER
  default_server: hub
  forced_hosts:
    build.********.net: build <-- this is the forced host.
  tab_size: 60
  force_default_server: false
  motd: '&6&lRusted&8&lMC &a&l| &b&lUnder Development'
  query_enabled: true
  query_port: 25580
timeout: 30000
connection_throttle: 4000
servers:
  hub:
    address: localhost:25566
    restricted: false
    motd: 'hub'
  factions:
    address: localhost:25567
    restricted: false
    motd: 'factions'
  build:
    address: localhost:25568
    restricted: true
    motd: 'build'
ip_forward: true
online_mode: true
meyerzinn commented 9 years ago

Should I point the SRV record for build to the build port and not the proxy?

minecrafter commented 9 years ago

No, you have to point it to the proxy.

Try turning on force_default_host.

meyerzinn commented 9 years ago

@minecrafter Same issue :/. It lets me join but I go to the hub.

meyerzinn commented 9 years ago

I just added play as a forced host to hub, and disabled forcing the default server. I still get reconnected to the server I left regardless of IP.

md-5 commented 9 years ago

build.****.net: build <-- this is the forced host.

How can we help you when you blank out the address?

meyerzinn commented 9 years ago

@md-5 My apologies, it's rustedmc.net and build.rustedmc.net

md-5 commented 9 years ago

Try using a normal record as opposed to a SRV record, I have a feeling the Minecraft client is sending the resolved SRV name rather than the entered name.

meyerzinn commented 9 years ago

@md-5 So an A record? Will do :)

md-5 commented 9 years ago

Yeah A or CNAME

meyerzinn commented 9 years ago

I have added an A record 'build' pointing to the IP (the Bungee port is 25565 so I shouldn't need to worry about that)

meyerzinn commented 9 years ago

Also, @md-5 I wanted to say thank you for everything you've done for the community. :)

md-5 commented 9 years ago

You'll probably need to remove the SRV record and wait for DNS to refresh.

Thanks

meyerzinn commented 9 years ago

@md-5 With cloudflare the DNS usually takes only a minute.

meyerzinn commented 9 years ago

Yay! It works! solved Thank you so much.

meyerzinn commented 9 years ago

Also, @md-5, what is the significance of bungeecord: true in the spigot.yml? Always been curious.

md-5 commented 9 years ago

Ok, I'm gonna leave this open to remind myself to test / open a Minecraft client bug report.

md-5 commented 9 years ago

Enables you to use ip_forward in bungeecord config so that you get proper skins / uuids. You really should use it.

meyerzinn commented 9 years ago

@md-5 Ok. Sounds good. I'll definitely make a forum post about this.

meyerzinn commented 9 years ago

And great! That's exactly what I needed!

meyerzinn commented 9 years ago

@md-5 Does restart from the command line use "bash ./start.sh" on Ubuntu? If not, what would I do to make it execute bash script?

minecrafter commented 9 years ago

It can, if the script is executable and uses a shebang, i.e.:

#!/bin/bash
java -jar spigot.jar

But Spigot issues don't belong here.

Foorack commented 9 years ago

AFAIK does Minecraft only support A records, not AAAA or SRV. :/

Paulomart commented 9 years ago

Minecraft Supports A and SRV records

Janmm14 commented 9 years ago

@Foorack Minecraft supports SRV and A records.

Foorack commented 9 years ago

@Paulomart @Janmm14 Ok, my fault. :)

meyerzinn commented 9 years ago

Well, SRV records were not working for me. Had to use A records.

kamcio96 commented 9 years ago

it doesn't matter, minecraft client sends what has in server ip field :)

NickEvansDev commented 7 years ago

Why doesn't Minecraft support AAAA records?

Phineas commented 7 years ago

@nick-2017 Because the Minecraft protocol does not support IPv6

NickEvansDev commented 7 years ago

@Phineas I don't know how to embed images on github but: https://image.nick-e.co.uk/i/D6a.png https://image.nick-e.co.uk/i/0VA.png https://image.nick-e.co.uk/i/46p.png

Janmm14 commented 7 years ago

@nick-2017 usually its drag&drop

Phineas commented 7 years ago

@nick-2017 There might be an issue with forced-hosts and utilising IPv6

@md-5