Line 37:
Line 37:
*''Install stunnel. For example, on Ubuntu:''
*''Install stunnel. For example, on Ubuntu:''
−
<syntaxhighlight>
+
<syntaxHighlight>
sudo apt-get install stunnel4
sudo apt-get install stunnel4
−
</syntaxhighlight>
+
</syntaxHighlight>
*''Create a configuration file /etc/stunnel/google-ldap.conf (that will contain the location of the certificates) with the following contents (assuming ldap-client.crt is the cert, and ldap-client.key is the key)''
*''Create a configuration file /etc/stunnel/google-ldap.conf (that will contain the location of the certificates) with the following contents (assuming ldap-client.crt is the cert, and ldap-client.key is the key)''
−
<syntaxhighlight>
+
<syntaxHighlight>
[ldap]
[ldap]
client = yes
client = yes
Line 50:
Line 50:
cert = ldap-client.crt
cert = ldap-client.crt
key = ldap-client.key''
key = ldap-client.key''
−
</syntaxhighlight>
+
</syntaxHighlight>
*To enable stunnel, edit /etc/default/stunnel4 and set ENABLED=1
*To enable stunnel, edit /etc/default/stunnel4 and set ENABLED=1
Line 56:
Line 56:
*Restart stunnel.
*Restart stunnel.
−
<syntaxhighlight>
+
<syntaxHighlight>
sudo /etc/init.d/stunnel4 restart
sudo /etc/init.d/stunnel4 restart
−
</syntaxhighlight>
+
</syntaxHighlight>
*''Configure your application to point to ldap://ip.of.stunnel:1636. You can replace “1636” with any unused port if you also change the accept line in the configuration file above. ''
*''Configure your application to point to ldap://ip.of.stunnel:1636. You can replace “1636” with any unused port if you also change the accept line in the configuration file above. ''