Thursday, 15 August 2013

Netcat relay issues

Netcat relay issues

I have a legacy database application that can be accessed via ODBC on port
3000. I have set up a simple netcat relay on a bastion host so that this
ODBC access can be done via the bastion host:
while true ; do nc -n 192.168.1.2 -l 3000 0<backpipe | nc -n 192.168.1.3
3000 1>backpipe ; done
192.168.1.2: bastion host (CentOS 6.x [64])
192.168.1.3: legacy server with ODBC service on port 3000 (Redhat EL 3.x)
It works (kinda), but it is not reliable. What happens is that I often get
errors and other strange behavior when testing the ODBC access via the
bastion host.
Example: Execute a simple query. Works fine (takes only seconds). Execute
a simple query again. Hangs. Use ODBC tool to view tables, get "Unexpected
Error"
Weird inconsistent stuff!
I had expected a netcat relay to be transparent and "invisible" - in other
words, whatever works going directly to the host should work exactly the
same using the relay. Apparently this is not the case in my scenario.
I am looking for help on how to debug / fix this, so that I have a
reliable useful relay.

No comments:

Post a Comment