Have a look at stunnel. This allows you to forward ports on one machine to another port/machine, and transparently encrypt the data using SSL.
What you'd do then would simply be to connect to localhost:12345 (eg), and have stunnel forward this (encrypted) across the network to your internal machine. Another copy of stunnel would be listening on a port on your internal machine, would decrypt the traffic, and forward it on to the database server port. Whether or not you can get stunnel working on Windows though, is another question :) Sorry I've not answered your original question, but I hope this helps, or at least gives you some insight into ways you might solve the problem. Dan On Mon, 2003-09-22 at 20:39, Ken Clarke wrote: > Hi Folks, > > Does anyone on the list have experience connecting to a remote database > through an SSH tunnel? Here's the problem I've been handed: > Write a series of CGI scripts for use on a publicly hosted website which > are capable of retrieving data from an MS SQL server running on a private, > internal LAN. > > I feel that an SSH tunnel is the idea answer since it provides host > authentication (the request comes from client's web host), user > authentication (it's one of my scripts) and data encryption (protects the > database access parameters). > > Here's what I have in mind. They can run Vandyke's VShell behind their > corporate firewall. VShell can be configured to provide ODBC connectivity > to any system DSN on the internal LAN. I can create an SSH connection using > Net::SSH::Perl but this is as far as I get. How do I bring DBI's methods > together with the the tunnel? Can I pass the socket connection to DBD::ODBC > as part of the datasource parameter? > > Any input or alternative suggestions are greatly appreciated. > > >> Ken Clarke > >> Contract Web Programmer / E-commerce Technologist > >> http://PerlProgrammer.net > > >
