Forced-hosts With velocity

I would like to add forced hosts to my velocity server, basically inserting a specific IP takes you directly to a specific server, without going through the lobby. I tried to set it up myself but it doesn't work, what can I do?
15 Replies
Admincraft Meta
Admincraft Meta7mo ago
Thanks for asking your question!
Make sure to provide as much helpful information as possible such as logs/what you tried and what your exact issue is
Make sure to mark solved when issue is solved!!!
/close !close !solved !answered
Requested by alepic7#0
Snowz
Snowz7mo ago
[servers]
# Configure your servers here. Each key represents the server's name, and the value
# represents the IP address of the server to connect to.
server1 = "IP"

[forced-hosts]
# Configure your forced hosts here.
"server1.example.com" = [
"server1"
]
[servers]
# Configure your servers here. Each key represents the server's name, and the value
# represents the IP address of the server to connect to.
server1 = "IP"

[forced-hosts]
# Configure your forced hosts here.
"server1.example.com" = [
"server1"
]
Alepic7
Alepic7OP7mo ago
I understood this part, the only thing I can't do is add the IP in the forced-host, I don't know what IP to put (for the IPs I use a custom domain) I would like to set the IP of the forced-host: modname.mydomain.com but I don't know what to put in the domain's DNS records
Snowz
Snowz7mo ago
i didnt think you need to change anything
Alepic7
Alepic7OP7mo ago
I set everything up like this, is this correct? (I set the DNS record for the proxy IP)
No description
No description
No description
Alepic7
Alepic7OP7mo ago
my domain is elysiansmp.eu
Sebah
Sebah7mo ago
any idea?
Torrent
Torrent7mo ago
can you show any DNS records that actually point the subdomain zemax to your IP and port? because otherwise, it looks like you just put a random domain under forced-hosts and just expected it to work with no DNS records forced-host is NOT the domain people will use for the proxy server. You need to make a DNS record for that. For example, if you want your proxy domain to be zemax.elysiansmp.eu, you need to make an SRV record that points that subdomain zemax to the IP and port for your proxy server. When clients join the proxy server from that domain, they are sent to the backend servers in the order that you configured them under try. Forced-hosts allow you to specify backend servers that people can connect to directly which bypasses the try order. For example, if you put the following there a player could connect to survival directly without going to the lobby first:
"survival.elysiansmp.eu" = ["survival]
"survival.elysiansmp.eu" = ["survival]
But you would first need to make a DNS record that points survival.elysiansmp.eu to your survival server and port. Players would still connect through your velocity proxy server, but they would go straight to the backend server they intend to and not the lobby first.
Alepic7
Alepic7OP7mo ago
I put the DNS records both for the domain that takes me to the lobby, therefore the play.elysiansmp.eu domain, and the records for the forced-host with the IP comeback.elysiansmp.eu (also for the port). and I also put all the setups on velocity, bit it still doesent work
No description
No description
No description
No description
Alepic7
Alepic7OP7mo ago
I don't know what to do anymore in the dns records or somewhere did I enter something wrong?
Torrent
Torrent7mo ago
Have you restarted the proxy server? DNS records can take up to 48 hours to propagate
Sebah
Sebah7mo ago
Server restarted, but still nothing seems to works
No description
Torrent
Torrent7mo ago
Have you properly set up velocity and configured your backend servers to accept incoming connections from the proxy server ?
Alepic7
Alepic7OP7mo ago
Yeah, i think I setup the proxy on paper global and put the offline mod in server.propreties Is this what needs to be done right?
Torrent
Torrent7mo ago
yes and restart the backend server getsockopt means a misconfiguration of velocity OR a DNS issue

Did you find this page helpful?