Jump (Bastion) Host Configuration issue

indie_hackerHOBBY

10 months ago

I'm trying to set up a jump host to access resources on a private network. I've intentionally disabled public TCP proxy to not expose my production database and Redis instances to the public due to security reasons.

My goal is to setup jump(bastion) host. I configured a Linux Docker container with SSH enabled (based on ubuntu image), but I've encountered some issues. Here's what I've done so far:

  • Spun up a Hardened Ubuntu Docker Image with configured ssh server.

  • Added a TCP Proxy - Configured the proxy to map the SSH port (22) to an external port (e.g., 12111).

  • Tried to SSH into the Container - ssh myuser@xyz.railway.poxy.com -p 12111

  • Encountered the following error - kex_exchange_identification: read: Connection reset by peer Connection reset by x.x.x.x port 12111

Despite my attempts, I haven't been able to successfully SSH into the container. Here are some additional details and troubleshooting steps I've considered:

Ensured SSH Server is Installed and Running:

  • I was able to run image locally and ssh into it

  • I even tried to change the port on the image from 22 to 23221 due to potential security firewalls that might be present in railway itself.

Reviewed Docker Logs and Container Status:

  • Ubuntu container that runs on railway is active without any errors

I'm suspecting there might be some firewalls within railway that block access, but I might be wrong. Has anyone successfully configured a jump host in a similar setup? Any guidance or insights would be greatly appreciated!

5 Replies

indie_hackerHOBBY

9 months ago

Bumping this up, was curious if anyone run into this situation


debashisbiswasHOBBY

7 months ago

Did you end up figuring this out? I’m trying to set up something similar.


indie_hackerHOBBY

7 months ago

Unfortunately, not. I tried several Docker images, including one I built, but no success.

Is that possible to bump this thread up so that more people would see?


7 months ago

SSH is not going to work on Railway.

Perhaps you would be interested in our tailscale guide?

https://docs.railway.app/tutorials/set-up-a-tailscale-subnet-router


indie_hackerHOBBY

7 months ago

Thank you brody, I didn't know it was an option, will look into it. Will come back once I figure out how it works.


Jump (Bastion) Host Configuration issue - Railway Help Station