Closed harborwater closed 1 year ago
Could you please provide your configuration files and any error log?
Here are the configs that I am using. Including the console errors.
# server.toml
[server]
bind_addr = "127.0.0.1:2333"
[server.services.minecraft_server]
token = "*****************************************"
bind_addr = "0.0.0.0:25565"
# client.toml
[client]
remote_addr = "xxx.xxx.xx.x:2333" # The address of the server. The port must be the same with the port in `server.bind_addr`
[client.services.minecraft_server]
token = "*****************************************" # Must be the same with the server to pass the validation
local_addr = "127.0.0.1:25565" # The address of the service that needs to be forwarded
May 22 03:59:21.800 ERROR handle{service=minecraft_server}: rathole::client: Failed to run the control channel: Failed to connect to xxx.xxx.xx.x:2333: Connection refused (os error 111). Retry in 1.166338148s...
May 22 04:05:27.973 ERROR handle{service=minecraft_server}: rathole::client: Failed to run the control channel: Failed to connect to xxx.xxx.xx.x:2333: Connection timed out (os error 110). Retry in 562.191118ms...
First, bind_addr = "127.0.0.1:2333"
here your rathole server should listen on public address(or the private address has public access), not loopback, so that your client can connect to it. Second, bind_addr = "0.0.0.0:25565"
here your server service bind address should be a specific address which can connect to your service, 0.0.0.0
only work when you need a service listen on all IPv4 addresses.
I have made those updates to the config files, and seem to still be experiencing the same issue ERROR handle{service=minecraft_server}: rathole::client: Failed to run the control channel: Failed to connect to 138.x.x.x:2333: Connection timed out (os error 110).
Here are the firewall rules for the rathole server;
0.0.0.0/0 TCP 2333 2333 TCP traffic for ports: 2333
0.0.0.0/0 UDP 2333 2333 UDP traffic for ports: 2333
0.0.0.0/0 TCP All 25565 TCP traffic for ports: 25565
Could you please provide your current configuration files?
# server.toml
[server]
bind_addr = "10.0.0.10:2333" # `2333` specifies the port that rathole listens for clients
[server.services.minecraft_server]
token = "***********************************" #
bind_addr = "138.x.xx.137:25565"
# client.toml
[client]
remote_addr = "138.x.xx.137:2333"
[client.services.minecraft_server]
token = "***********************************"
local_addr = "127.0.0.1:25565"
Are you sure your minecraft server is listen on 138.x.xx.137:25565
?
Its supposed to be the public IP of the rathole server?
Its supposed to be the public IP of the rathole server?
Nope, here the bind address of your service should be a specific address that your rathole service can find(connect to) it.
So like this?
# server.toml
[server]
bind_addr = "10.0.0.10:2333" # `2333` specifies the port that rathole listens for clients
[server.services.minecraft_server]
token = "***********************************" #
bind_addr = "172.x.x.42:25565" # local server IP of the client hosting the server
Sorry I may not clearly understand your situation, let me give you an example, if we have a minecraft service listen on rathole client's 127.0.0.1:2000
, so our rathole configuration on server side should be like this:
[server]
bind_addr = "0.0.0.0:2001" # Here I use `0.0.0.0` to listen on all IPv4 addresses.
[server.services.mincecraft]
token = "secret"
bind_addr = "0.0.0.0:2002" # Here I also use `0.0.0.0` to listen on all IPv4 addresses.
Now rathole server will listen on both 2001
and 2002
port, our rathole client gonna connect to 2001
, and all the other minecraft users gonna connect to 2002
. On the client side:
[client]
remote_addr = "myserver.com:2001" # Remote server address and port above.
[client.services.mincecraft]
token = "secret"
local_addr = "127.0.0.1:2000" # Our local minecraft service address.
And now, all the minecraft users connect to server's 2002
gonna actually connect to rathole client's 127.0.0.1:2000
. Am I clear? Hope this can help you :)
I think this may have worked thank you!
Glad to help :)
I am having some trouble configuring rathole to work with Oracle's free tier of cloud services. I have followed the basic quick start guide, I also have opened the appropriate firewall ports, and the VM has a public IP address. However despite this I am still having trouble getting it to talk to the rathole server in the Oracle cloud. If anything is needed I will do my best to provide it.