On oracle server i can connect clear
If i make a tunnel
ssh -L 1521:localhost:1521 -F -n hostremote -vvv
debug1: Connection to port 1521 forwarding to localhost port 1521 requested. debug2: fd 7 setting TCP_NODELAY debug2: fd 7 setting O_NONBLOCK debug3: fd 7 is O_NONBLOCK debug1: channel 2: new [direct-tcpip] channel 2: open failed: connect failed: Connection refused debug2: channel 2: zombie debug2: channel 2: garbage collecting debug1: channel 2: free: direct-tcpip: listening port 1521 for localhost port 1521, connect from 127.0.0.1 port 60882 to 127.0.0.1 port 1521, nchannels 3 debug3: channel 2: status: The following connections are open: ERROR: ORA-12537: TNS: connection close
Usually i do ssh tunnel on directly connected server,for example
On client i make the tunnel and connect with sqlplus on localhost,easy.
The situation now is a little different and more complex
PSHYSICAL SERVER=192.168.0.44 VIRTUALMACHINE WITH NAT=192.168.0.45 eth0 10.3.1.1 eth1 ORACLESERVER=virtual machine 10.3.1.4
I have make a DNAT on VIRTUALMACHINE,i can use telnet 1521 VIRTUALMACHINE and tcptraceroute 1521 return succesfully connection. But after tunnel(succesfully) i have TNS error and no connection.
This is the dnat make with firewalld
forward-ports: port=1521:proto=tcp:toport=1521:toaddr=10.3.1.4 port=1521:proto=udp:toport=1521:toaddr=10.3.1.4