6 months ago
Hey there!
I'm running two services in the same project, and I’m trying to connect from one to the other over port 25575 (RCON for a Minecraft server). I understand that internal networking uses IPv6, and DNS resolves correctly to an internal .railway.internal address. However, when I try to connect using a Python socket from the bot container, the connection to that IPv6 address on port 25575 just times out.
From what I can see:
The target container is listening on
tcp6 :::25575(confirmed via/proc/net/tcp6and a Python bind test).DNS resolution returns a valid IPv6 address.
Both containers have IPv6 addresses on
railnet0.
I just want to confirm:
Is there anything extra I need to do to allow inter-service IPv6 TCP connections?
Are there any known restrictions on connecting to other services on custom ports like 25575?
Thanks in advance!
7 Replies
6 months ago
This thread has been marked as public for community involvement, as it does not contain any sensitive or personal information. Any further activity in this thread will be visible to everyone.
Status changed to Open brody • 6 months ago
6 months ago
This thread was created 4 days ago and has yet to receive a response aside from the status change. Is there anything additional that I need to provide?
6 months ago
Wondering if Railway blocks certain ports internally, or if there’s a workaround (like binding to specific interfaces or using IPv4 instead)?
brandon
Wondering if Railway blocks certain ports internally, or if there’s a workaround (like binding to specific interfaces or using IPv4 instead)?
6 months ago
Unless I'm mistaken, Railway services are only allowed to expose one TCP port. Currently, that port is exposed to actually connect to the application via IPv4. Hence why I'm attempting to use RCON via Railway's IPv6 private networking.
frozonovic
Unless I'm mistaken, Railway services are only allowed to expose one TCP port. Currently, that port is exposed to actually connect to the application via IPv4. Hence why I'm attempting to use RCON via Railway's IPv6 private networking.
6 months ago
If that’s the case, I guess using something like an internal proxy or tunneling everything through the main exposed port might be the only workaround, unless Railway eventually allows more flexibility with internal port access.
6 months ago
Alright, I popped a socat binary in the container and have forwarded a local port to the server's IPv6 RCON address as suggested by buhhhrandon (kudos to you, friend). This works, and the bot can successfully execute RCON commands through this bridge — suggesting the server and bot can reach each other over private networking, but something about direct IPv6 connectivity is going haywire.
I'd love insight on:
Whether direct IPv6 connections between services are supported or intentionally restricted
Whether exposing a second port internally or setting up a reverse proxy is a better long-term solution
Much appreciated for the help.
6 months ago
Hey — sounds like you’ve already done a solid job debugging this!
If the service is bound to tcp6 :::25575 and DNS is resolving to the .railway.internal address, that’s usually enough — inter-service networking over IPv6 should just work inside the same Railway project.
That said, a couple of things to double-check:
Ensure the target service is actually listening on all interfaces, not just
localhostor::1. Even though/proc/net/tcp6shows:::it’s worth explicitly binding to::in your server code if you haven’t.No need for any special configuration to allow custom ports like 25575 — Railway doesn’t block inter-service traffic on non-standard ports internally.
Since you’re using Python sockets, double-check you’re setting up the
AF_INET6socket type and using the full tuple for IPv6 (including flowinfo and scopeid if needed — depending on the library you’re using).
Also, just in case: try doing a simple telnet <service>.railway.internal 25575 or even a small Python test script inside the bot container to confirm the connection manually. Sometimes it helps isolate whether it’s your RCON logic or the actual network connection failing.
brandon
If that’s the case, I guess using something like an internal proxy or tunneling everything through the main exposed port might be the only workaround, unless Railway eventually allows more flexibility with internal port access.
6 months ago
Your suggestion inevitably led to a temporary solution for my problem. Thank you for your help. I think you've earned this reward. Since that, I did some more review and came to the conclusion that the package I was using was forcing IPv4 connections no matter what I tried. I have made a small class, tested it, and verified that it achieves my goal.
