Skip to content
Add Proxy
poolvossolutions
OP

12 minutes ago

My PostgreSQL service already has a TCP Proxy configured:

  • Public endpoint: metro.proxy.rlwy.net:14615
  • Internal target port: 5432

My local Windows computer can connect to this endpoint, but my Namecheap shared hosting server (premium106) gets Connection refused when connecting to the same hostname and port.

I have also confirmed that Namecheap can establish TCP connections to another external PostgreSQL provider (Aiven).

Please investigate why this Railway TCP Proxy refuses connections from my Namecheap server's outbound IP/network. Is there any Railway proxy restriction or networking issue affecting this connection?

$20 Bounty

2 Replies

Railway
BOT

12 minutes ago

This thread has been opened as a bounty so the community can help solve it.

Status changed to Open Railway • 12 minutes ago


I’d contact Namecheap’s support about this issue.


chrigen

5 minutes ago

Railway's TCP proxy doesn't filter by source IP. If your Windows PC can connect, the proxy and Postgres are fine. "Connection refused" coming only from premium106 points to the hosting side, most likely Namecheap's outbound firewall on non-standard ports.

Shared hosts typically allow outgoing traffic only on a short list of ports. SiteGround, for example, documents the TCP ports open on all its shared servers for outgoing connections (21, 25, 3306, 5432), and other outgoing ports can be opened on request. Your proxy port is 14615, which isn't one of those usual ports. Aiven probably works because its port is already whitelisted on that server, or because the server treats that destination differently.

siteground

Run these two checks over SSH on premium106:

bash

1) Is port 14615 blocked outbound? portquiz.net answers on every port

curl -sv --max-time 8 http://portquiz.net:14615 2>&1 | tail -3

curl -sv --max-time 8 http://portquiz.net:443 2>&1 | tail -3

2) Force IPv4 to the Railway proxy (rules out IPv6/DNS issues)

getent ahosts metro.proxy.rlwy.net

nc -4 -vz -w 8 metro.proxy.rlwy.net 14615

If portquiz fails on 14615 but works on 443: the problem is Namecheap's outbound firewall. Open a ticket with them and ask to allow outgoing TCP to metro.proxy.rlwy.net on port 14615. Shared hosting providers usually do this on request.

If nc -4 works but your app fails: the app is resolving to IPv6 or using a different host/port. Set the connection to IPv4, or use the IP that getent returns.

If both fail and Namecheap won't open the port: run the app somewhere that allows outbound connections, for example on Railway itself, using the private network (postgres.railway.internal:5432, no proxy). Or use a small API on Railway in front of the database.

Note: the TCP proxy port stays the same as long as you don't delete and recreate the proxy, so the firewall rule only needs to be set once.


Welcome!

Sign in to your Railway account to join the conversation.

Loading...