0

I have a database running on a server (lets call it server A) on port 1522. I want to connect my client to this server A but the ports are not open. I have ssh access to another server (server B) which has connectivity open.

Is there any way where I can use server B as the proxy server and connect the database client from laptop to the database server?

Goal: Laptop MAC OS ===[JDBC]===> DB Server A

Current Access: Laptop MAC OS ===[ssh access]===> Server B ===[JDBC]===> DB Server A

Mac: OS 10.14.1

Server B: SLES 12 OpenSSH_7.2p2 (complete access to the server)

Server A: Oracle DB (only JDBC connectivity from server B)

orak
  • 123
  • 6
  • Very similar (if not duplicate): https://serverfault.com/questions/340865/ssh-tunnel-over-multi-hops-using-putty?rq=1 – Lenniey Jul 11 '19 at 12:48
  • I don't have ssh access to server A from server B. only the service access. – orak Jul 11 '19 at 13:42
  • 1
    What SSH clients and OSes are you using? It can be done by using ProxyJump, for example. – Lenniey Jul 11 '19 at 13:49

1 Answers1

0

You can do this pretty easily by proxying the requests.

Generally SSH is used to do this in an ad-hoc way - see https://www.systutorials.com/944/proxy-using-ssh-tunnel/ This can be a little complicated if you have not used some of the fancier SSH functionality.

Alternatively you can use dedicated proxy servers (like HA Proxy) for production systems. With this you can just say "if something hits port 1522 on this box forward it to port 1522 on the server". This is raw TCP proxy - I am sure there are all kinds of fancy stuff Oracle will sell you to do the same.

TheFiddlerWins
  • 2,973
  • 1
  • 14
  • 22
  • Shouldn't I have ssh access from Server B to Server A as well in order to use SOCKS proxy? I don't have this ssh access – orak Jul 14 '19 at 09:17