FreeTDS User Guide: A Guide to Installing, Configuring, and Running FreeTDS | ||
---|---|---|
Prev | Chapter 5. Advanced Configurations | Next |
Contributed by Bradley Bell.
To set up FreeTDS over stunnel between a Linux webserver and a W2k SQL server:
Get unencrypted freetds working
Install openssl and stunnel on the Linux box: stunnel.org
Download the stunnel binary and openssl dll's for Windows.
Generate stunnel.pem (complete with Diffie-Hellman parameters) for placement on the W2k box. See instructions in the stunnel FAQ.
Start stunnel on the W2k box:
$ stunnel.exe -d 61666 -r localhost:1433
61666 is just an arbitrary port number.
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.
Set up FreeTDS to use the tunnel. If this is your unencrypted entry in freetds.conf:
the encrypted equivalent uses: