stunnel HOWTO - Re: encrypted passwords

Bradley Bell bradleyb at u.washington.edu
Wed Apr 17 17:46:04 EDT 2002


On Sat, Apr 13, 2002 at 08:37:43AM -0400, Brian Bruns wrote:
> If someone gets this going with MSSQL/FreeTDS I'd love to get a write up 
> to add to the user guide.  Either CIPE or ssh or FreeS/WAN or whatever.
> 

I have succeeded in setting up freetds over stunnel between my linux
webserver, and my W2k SQL server.

Here's how I did it:

1. First get unencrypted freetds working
2. Install openssl and stunnel on the linux box:
   http://www.stunnel.org
3. Download stunnel binary and openssl dll's for Windows from:
   http://www.stunnel.org/download/binaries.html
4. Generate stunnel.pem (complete with Diffie-Hellman parameters) for
   placement on the W2k box. Instructions at:
   http://www.stunnel.org/faq/certs.html
5. Start stunnel on the W2k box:
   stunnel.exe -d 61666 -r localhost:1433
   61666 is just an arbitrary port number.  Does anybody know of a more
   appropriate one to use?
6. Start stunnel on the linux box:
   stunnel -c -d 1433 -r [win2kserver]:61666
   where [win2kserver] is the hostname or IP address of the W2k box.
7. Set up freetds to use the tunnel.  If this is your unencrypted entry in
   freetds.conf:
   [win2kserver]
        host = win2kserver
        port = 1433

   the encrypted equivalent is:
   [win2kserver]
        host = localhost
	port = 1433

-brad

-- 
Bradley Bell
Computer Support Analyst
University of Washington
Classroom Support Services



More information about the FreeTDS mailing list