1

Currently my setup is as follows :-

Database client/library <---------------------> Database

I'd like to have the following :-

Database client/library <---> Proxy <-------------> Database

I'm the admin on a linux machine and im able to write iptable rules, use 3rd party software such as transproxy if required etc.

I'm looking to be able to intercept the requests before sending it to the database and intercepting the responses before sending it back to the database client/library.

Thanks.

1 Answers1

0

It looks like running

$ socat tcp-listen:$port,fork,reuse tcp-connect:$db_host:$port

on proxy box will do what you need. Add option "-v" to display/redirect/debug passing traffic. Socat is available in all major Linux distros, FreeBSD and also as Windows port. "man socat" will bring you some RTFMing for a whole evening about rich ability of this swiss army knife of proxying.

Van Jone
  • 161
  • 2