I'm trying to connect to an Oracle DB from Entity Framework, but the DB rejects direct connections from the PC. I need to connect through a jump server / gateway.
Here's what's working:
From the gateway server I can connect to the DB using both sqlplus and EF. The gateway has a ssh server.
From the local PC I can start an ssh session on the gateway server (and from the ssh session I can continue with connecting to the DB using sqlplus).
This question is similar, but doesn't work (I get timeouts):
In particular, when I run plink -N -L localport:dbserver:dbport yourname@connectionserver
locally on the PC, I get "session granted", but when connecting with EF from the PC, the connection request gets time out. In that case I use the gateway server as DataSource.
I've checked firewall settings, and port 1521 is open on both PC and gateway server.
UPDATED INFO:
When, instead of using ssh port forwarding on the gateway, I use socat tcp-listen:1521,reuseaddr,fork,tcp:<db_server:port>
as port forwarding (on the gateway), I get a response with tnsping <gateway_server>
on the local PC.