<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Mikotek Blog]]></title><description><![CDATA[技術 / 資訊 / 資安 / 網管 / 資訊分享]]></description><link>http://blog.mikotek.com.tw/</link><generator>Ghost v0.4.2</generator><lastBuildDate>Mon, 06 Apr 2026 22:03:20 GMT</lastBuildDate><atom:link href="http://blog.mikotek.com.tw/rss/" rel="self" type="application/rss+xml"/><ttl>60</ttl><item><title><![CDATA[HowTo：OpenLDAP with Microsoft SQL Server backend on CentOS]]></title><description><![CDATA[<p><img src='http://blog.mikotek.com.tw/content/images/2014/Jun/LDAPworm.gif'  alt="" /></p>

<h6 id="authorseanchangmailtosean_changmikotekcomtw">Author: <a href='mailto:sean_chang@mikotek.com.tw' >Sean Chang</a></h6>

<h3 id="background">Background</h3>

<p>If you would like to join different systems and combine wireless accounts in your current non-Microsoft Active Directory environment by a single auth server, the <del>low-priced</del> easiest way surely is using open source projects to setup your own LDAP Directory service.</p>

<p>The most popular open source LDAP Directory server project is <em><a href='http://www.openldap.org/' "target="_blank">OpenLDAP</a></em>.  However, We can find many OpenLDAP examples on net.  But when it comes to back-sql, especially when you need to integrate authentication by existing user accounts of current system, which were stored in MSSQL backend, you can find only MySQL and PostgreSQL success stories.</p>

<p>We wish this document can deliver some useful hints on how to deal with OpenLDAP with backend MSSQL.</p>

<blockquote>
  <p>LDAP is based on a simpler subset of the standards contained within the <a href='http://en.wikipedia.org/wiki/X.500' "target="_blank">X.500</a> standard.  Different than RDBMS, such as Oracle, MSSQL, MySQL.  LDAP is a tree structure planned for best searching performance.  <strong>We do not recommend using RDBMS as LDAP backend, unless you have a MUST-TO reason</strong>.</p>
</blockquote>

<h3 id="resources">Resources</h3>

<p>You can learn more about LDAP Directory service through these websites.</p>

<ul>
<li><a href='https://tools.ietf.org/rfc/rfc4511.txt' "target="_blank">Network Working Group RFC 4511</a> - IETF.org</li>
<li><a href='http://en.wikipedia.org/wiki/Lightweight_Directory_Access_Protocol' "target="_blank">Lightweight Directory Access Protocol</a> - WIKIPEDIA</li>
<li><a href='http://www.openldap.org/' "target="_blank">OpenLDAP</a> - OpenLDAP open source project site</li>
</ul>

<h3 id="tableofcontents">Table of Contents</h3>

<ol>
<li><a href="#Components Installation">Components Installation</a>  </li>
<li><a href="#freeTDS Installation">freeTDS Installation</a>  </li>
<li><a href="#Configuration of each component">Configuration of each component</a>  </li>
<li><a href="#Setting Up OpenLDAP">Setting Up OpenLDAP</a>  </li>
<li><a href="#Verify OpenLDAP Configurations">Verify OpenLDAP Configurations</a>  </li>
<li><a href="#Misc">Misc.</a>  </li>
<li><a href="#Further Readings">Further Readings</a></li>
</ol>

<h3 id="componentsandsoftwareversion">Components and Software Version</h3>

<ul>
<li>OpenLDAP Server
<ul><li>OS: CentOS 6.5 (64-bit)</li>
<li>OpenLDAP: 2.4.23</li>
<li>unixODBC: 2.2.14</li>
<li>freeTDS: 0.91</li></ul></li>
<li>Remote Database
<ul><li>OS: Microsoft Windows 2008 Server R2</li>
<li>Database: Microsoft SQL Server 2012</li></ul></li>
</ul>

<h3 id="basicscenario">Basic Scenario</h3>

<p>To use OpenLDAP with backend Microsoft SQL Server, you have to find a correct way to link them together.  The following is our scenario: </p>

<ul>
<li>Using freeTDS driver to link Microsoft SQL Server, and set freeTDS as an ODBC datasource</li>
<li>OpenLDAP using unixODBC driver to link with freeTDS ODBC</li>
<li>The logical structure:</li>
</ul>

<p><img src='http://blog.mikotek.com.tw/content/images/2014/May/Basic_Scenario.png'  alt="The logical structure" /></p>

<h3 id="beforewestart">Before We Start</h3>

<p>The following processes begin after you finish the installation of operation system.  We setup our OS using <em>CentOS Minimal Installation</em>, and then <code>wget</code> tool has been installed.</p>

<blockquote>
  <p>You can learn how to install CentOS Minimal in this article: <a href='http://lintut.com/how-to-install-centos-6-5-minimal/' "target="_blank">How to install CentOS 6.5 minimal</a> by <a href='mailto:radenkobogdanovic@gmail.com' >rasho</a> on <a href='http://lintut.com/' "target="_blank">LINTUT</a></p>
</blockquote>

<p><a name="Components Installation"></a></p>

<h3 id="1componentsinstallation">1. Components Installation</h3>

<p>Because we <del>are so lazy</del> hope this document can more clean and clear, we install our components using <code>yum</code> with <code>root</code> account in the following processes.</p>

<p>Of course, you can finish same procedures by using <code>sudo</code> with <code>user account</code>.  And to install all components using <code>rpm</code> is definitely ok too.</p>

<pre><code class="c">#yum install openldap openldap-clients openldap-servers openldap-devel openldap-servers-sql
#yum install unixODBC unixODBC-libs unixODBC-devel
</code></pre>

<p><a name="freeTDS Installation"></a></p>

<h3 id="2freetdsinstallation">2. freeTDS Installation</h3>

<h4 id="21setenvironmentvariable">2.1 Set Environment variable</h4>

<p>Use <code>vi</code> or <code>nano</code> to edit <code>/etc/profile</code>, adding this section at the end of file:</p>

<pre><code class="c"># TDS
    SYBASE=/usr/local
    LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:$SYBASE/lib
    export SYBASE LD_LIBRARY_PATH
</code></pre>

<h4 id="22downloadandunpackfreetds">2.2 Download and unpack freeTDS</h4>

<p>You can find the download link in <a href='http://www.freetds.org/' "target="_blank">freeTDS Project Site</a>.  Generally they will not modify the link of stable version.</p>

<blockquote>
  <p>ps. You may switch to <code>/tmp</code> dictionary first</p>
</blockquote>

<pre><code class="c">#wget ftp://ftp.freetds.org/pub/freetds/stable/freetds-stable.tgz
#tar -zxf freetds-stable.tgz
#cd freetds-0.91 ||REPLACE WITH YOUR VERSION NUMBER
</code></pre>

<h4 id="23installfreetds">2.3 Install freeTDS</h4>

<pre><code class="c">#./configure --with-tdsver=8.0 --with-unixodbc=/usr/local
#make
#make install
</code></pre>

<p>The general freeTDS installation paths is:</p>

<ul>
<li>Library： <code>/usr/local/lib</code></li>
<li>Configuration： <code>/usr/local/etc</code></li>
</ul>

<p><a name="Configuration of each component"></a></p>

<h3 id="3configurationofeachcomponent">3. Configuration of each component</h3>

<h4 id="31prepareldapdatabaseonyourmssqlserver">3.1 Prepare LDAP Database on your MSSQL Server</h4>

<p>Before we start to config all components, the first step is to create sample database and data for LDAP service in your SQL Server.</p>

<p>You can find these samples at the latest version of OpenLDAP on <a href='http://www.openldap.org/software/download/' "target="_blank">OpenLDAP Project site</a>.  Download and unpack it, the sample scripts are located in <code>\servers\slapd\back-sql\rdbms_depend\mssql</code>.  Of course, you can download <a href='http://blog.mikotek.com.tw/content/images/2014/May/mssql_schema_2.4.39.zip' >Sample MSSQL Schema</a> from here.</p>

<p>We recommend you execute these scripts through <a href='http://www.microsoft.com/en-us/download/details.aspx?id=29062' "target="_blank">SQL Server Management Studio</a>:</p>

<ul>
<li><p>Create LDAP database</p>

<blockquote>
  <p>We assume the database name is <code>LDAP</code></p>
</blockquote></li>
<li><p>Execute <code>backsql_create.sql</code> in <code>LDAP</code> database</p>

<blockquote>
  <p>Create OpenLDAP Schama</p>
</blockquote></li>
<li><p>Execute <code>testdb_create.sql</code> in <code>LDAP</code> database</p>

<blockquote>
  <p>Create Sample Data Tables</p>
</blockquote></li>
<li><p>Execute <code>testdb_metadata.sql</code> in <code>LDAP</code> database</p>

<blockquote>
  <p>Create Sample Metadata</p>
</blockquote></li>
<li><p>Execute <code>testdb_data.sql</code> in <code>LDAP</code> database</p>

<blockquote>
  <p>Create Sample Data</p>
</blockquote></li>
</ul>

<h4 id="32freetdstomicrosoftsqlserver">3.2 freeTDS to Microsoft SQL Server</h4>

<p>Use <code>vi</code> or <code>nano</code> to edit <code>/usr/local/etc/freetds.conf</code>, adding this section at the end of file:</p>

<pre><code class="c">[MSSQL]
#REPLACE WITH YOUR MSSQL SERVER IPv4 ADDRESS
host = 192.168.1.100

#REPLACE WITH YOUR MSSQL SERVER LISTENING PORT
port = 1433

tds version = 8.0  
client charset = UTF-8  
</code></pre>

<h4 id="33confirmfreetdsconfiguration">3.3 Confirm freeTDS Configuration</h4>

<p>You can test the connectivity between freeTDS and SQL Server using this command:  </p>

<pre><code class="c">#tsql -S MSSQL -U username -P password
</code></pre>

<p>If your settings were correct, you will see a reponse like this:</p>

<p><img src='http://blog.mikotek.com.tw/content/images/2014/May/tsql.png'  alt="tsql" /></p>

<p>Type <code>exit</code> to leave.</p>

<h4 id="34unixodbctofreetds">3.4 unixODBC to freeTDS</h4>

<h5 id="341odbcinstini">3.4.1 odbcinst.ini</h5>

<p>Use <code>vi</code> or <code>nano</code> to edit <code>/etc/odbcinst.ini</code>.</p>

<ul>
<li><p>There are default <code>PostgreSQL</code> and <code>MySQL</code> settings. We will not use these database, you can mark them as unused.</p></li>
<li><p>Adding this section at the end of file:</p></li>
</ul>

<pre><code class="c">[FreeTDS]
Description=ODBC for SQL Server  
Driver=/usr/local/lib/libtdsodbc.so  
UsageCount=1  
</code></pre>

<h5 id="342odbcini">3.4.2 odbc.ini</h5>

<p>Use <code>vi</code> or <code>nano</code> to edit <code>/etc/odbc.ini</code>, adding this section at the end of file:</p>

<pre><code class="c">[MSODBC]
Driver=FreeTDS  
Description=Mikotek SQL Server  
Trace=No

#REPLACE WITH YOUR MSSQL SERVER IPv4 ADDRESS
Server= 192.168.1.100

#REPLACE WITH YOUR LDAP DATABASE NAME
Database= LDAP

#REPLACE WITH YOUR MSSQL SERVER LISTENING PORT
Port=1433

TDS_Version = 8.0  
Charset = UTF-8  
</code></pre>

<h4 id="35confirmunixodbcconfiguration">3.5 Confirm unixODBC Configuration</h4>

<p>You can test the connectivity between unixODBC and SQL Server using this command:  </p>

<pre><code class="c">#isql -v MSODBC username password
</code></pre>

<p>If your settings were correct, you will see a reponse like this:</p>

<p><img src='http://blog.mikotek.com.tw/content/images/2014/May/isql.png'  alt="isql" /></p>

<p>Type <code>quit</code> to leave。</p>

<p><a name="Setting Up OpenLDAP"></a></p>

<h3 id="4settingupopenldap">4. Setting Up OpenLDAP</h3>

<h4 id="41generateasecurepassword">4.1 Generate a Secure Password</h4>

<p>In later section, we will set up an OpenLDAP administrator and an administrative password.  OpenLDAP supports <code>plaintext</code> password, and an encrypted password like <code>MD5</code>, <code>SHA</code>, <code>CRYPT</code> is supported too.</p>

<p>We are going to use <code>CRYPT</code> password this time, you can generate a secure password by <code>slappasswd -h {crypt}</code>:  </p>

<pre><code class="c">#slappasswd -h {crypt}
New password:  
Re-enter new password:  
{CRYPT}4kXX4T1wXj3Zc
</code></pre>

<p>The <code>{CRYPT}4kXX4T1wXj3Zc</code> is the encrypted password. Copy it, we will need it later.</p>

<h4 id="42copyslapdconffromopenldaptemplate">4.2 Copy slapd.conf from OpenLDAP Template</h4>

<pre><code class="c">#cp /usr/share/openldap-servers/slapd.conf.obsolete /etc/openldap/slapd.conf
</code></pre>

<h4 id="43removeandbackupdefaultbdbdatabase">4.3 Remove and Backup Default BDB Database</h4>

<pre><code class="c">#mv /etc/openldap/slapd.d /etc/openldap/slapd.d.bak
</code></pre>

<h4 id="44slapdconfconfiguration">4.4 slapd.conf Configuration</h4>

<p>Use <code>vi</code> or <code>nano</code> to edit <code>/etc/openldap/slapd.conf</code>.</p>

<h5 id="441sectioninclude">4.4.1 Section: include</h5>

<p>We will need only the following LDAP schemas in this practice:  </p>

<pre><code class="c">include    /etc/openldap/schema/core.schema  
include    /etc/openldap/schema/cosine.schema  
include    /etc/openldap/schema/inetorgperson.schema  
</code></pre>

<p>You can mark other schemas as unused.</p>

<h5 id="442sectionmodule">4.4.2 Section: module</h5>

<p>We are using <code>64-bit</code> system, and use only <code>back_sql</code> module, you can mark other modules as unused.</p>

<pre><code class="c">modulepath /usr/lib64/openldap  
moduleload back_sql.la  
</code></pre>

<h5 id="443sectiontlscertificateconfiguration">4.4.3 Section: TLS Certificate Configuration</h5>

<p>OpenLDAP supports SSL connection, you can set up TLS configuration in this section.</p>

<p>However, we DO NOT include the know-how of SSL setup in this practice.  <strong>You can mark the TLS section as unused for now</strong>.  If you were interested in OpenLDAP SSL configuration, you may find some useful hint in this document: <a href='http://www.zarafa.com/wiki/index.php/Configure_OpenLDAP_with_SSL/TLS' "target="_blank">Configure OpenLDAP with SSL/TLS</a></p>

<h5 id="444sectionaclconfiguration">4.4.4 Section: ACL Configuration</h5>

<h6 id="acl1alowusersviewandchangetheirownpassword">ACL 1: Alow Users view and change their own password</h6>

<pre><code class="sh">access to attrs=userpassword  
    by self write
    by anonymous auth
    by * none
</code></pre>

<h6 id="acl2allowauthenticateduserstoviewlimitanonymoususerstoauth">ACL 2: Allow Authenticated Users to View, Limit Anonymous Users to Auth</h6>

<pre><code class="sh">access to *  
    by self write
    by users read
    by anonymous auth
    by * none
</code></pre>

<h5 id="445sectiondatabasedefinitions">4.4.5 Section: Database Definitions</h5>

<p>There is a default BDB database definition in template config file.  We are going to set up a SQL database, so mark whole default BDB database section as unused.</p>

<p>Adding our SQL database definition at the end of file:  </p>

<pre><code class="c">###################################################
# sql database definitions
###################################################

database        sql  
suffix          "dc=example,dc=com"  
rootdn          "cn=Manager,dc=example,dc=com"

#REPLACE WITH YOUR SECURE PASSWORD
rootpw          {CRYPT}4kXX4T1wXj3Zc

#ODBC DATASOURCE NAME
dbname          MSODBC

#REPLACE WITH YOUR MSSQL LDAP DATABASE USER
dbuser          username

#REPLACE WITH YOUR MSSQL LDAP DATABASE USER PASSWORD
dbpasswd        password

subtree_cond    "ldap_entries.dn LIKE '%'+?"

has_ldapinfo_dn_ru      no  
###################################################
</code></pre>

<h4 id="45ldapconfconfiguration">4.5 ldap.conf Configuration</h4>

<p>Use <code>vi</code> or <code>nano</code> to edit <code>/etc/openldap/ldap.conf</code>.</p>

<p>Define LDAP base, and set the LDAP uri according to your environment:  </p>

<pre><code class="ruby">BASE    dc=example,dc=com  
URI    ldap://ldap.example.com  
</code></pre>

<p><a name="Verify OpenLDAP Configurations"></a></p>

<h3 id="5verifyopenldapconfigurations">5. Verify OpenLDAP Configurations</h3>

<h4 id="51openldapconfigtesting">5.1 OpenLDAP Config Testing</h4>

<p>You can verify your config file using this command:  </p>

<pre><code class="c">#slaptest -u
</code></pre>

<p>If your settings were correct, you will see a reponse like this:  </p>

<pre><code>config file testing succeeded  
</code></pre>

<h4 id="52launchtheslapdaemon">5.2 Launch the Slap Daemon</h4>

<pre><code class="c">#service slapd start
</code></pre>

<h4 id="53testconnectivityanddatawithldapclient">5.3 Test Connectivity and Data with LDAP client</h4>

<p>You can perform a LDAP search by <code>ldapsearch</code>, using this command to verify LDAP working functionally:  </p>

<pre><code class="c">#ldapsearch -x -D cn=Manager,dc=example,dc=com -w YOUR_LDAP_ROOTPW -b dc=example,dc=com
</code></pre>

<blockquote>
  <p>REPLACE <code>YOUR_LDAP_ROOTPW</code> with your definition</p>
</blockquote>

<p>If your settings were correct, you will see a reponse like this:  </p>

<pre><code class="c"># extended LDIF
#
# LDAPv3
# base &lt;dc=example,dc=com&gt; with scope subtree
# filter: sn=Kovalev
# requesting: ALL
#

# Mitya Kovalev, example.com
dn: cn=Mitya Kovalev,dc=example,dc=com  
objectClass: inetOrgPerson  
cn: Mitya Kovalev  
sn: Kovalev  
seeAlso: documentTitle=book1,dc=example,dc=com  
seeAlso: documentTitle=book2,dc=example,dc=com  
givenName: Mitya  
userPassword:: bWl0  
telephoneNumber: 222-3234  
telephoneNumber: 332-2334

# search result
search: 2  
result: 0 Success

# numResponses: 2
# numEntries: 1
</code></pre>

<p><a name="Misc"></a></p>

<h3 id="6misc">6. Misc.</h3>

<h4 id="61automaticlaunchopenldapserviceonsystemboot">6.1 Automatic Launch OpenLDAP service on system boot</h4>

<pre><code class="c">#chkconfig --add ldap
#chkconfig ldap on
</code></pre>

<p><a name="Further Readings"></a></p>

<h3 id="7furtherreadings">7. Further Readings</h3>

<p>For now, you are successfully integrate OpenLDAP with backend Microsoft SQL Server.</p>

<p>If you were interested in LDAP data design and metadata planning, you may find some useful information in these websites:</p>

<ul>
<li><a href='http://www.flatmtn.com/article/setting-ldap-back-sql' "target="_blank">Setting up LDAP with back-sql</a> - Flat Mountain</li>
<li><a href='http://www.wingfoss.com/content/sample-mysql-for-openldap-back-sql' "target="_blank">Sample MySQL schema for OpenLDAP with back-sql</a> - WingFOSS</li>
<li><a href='http://oav.net/mirrors/LDAP-ObjectClasses.html' "target="_blank">Common LDAP schemas</a> - oav.net</li>
</ul>]]></description><link>http://blog.mikotek.com.tw/2014/05/31/openldap-with-microsoft-sql-server-backend-database-on-centos/</link><guid isPermaLink="false">3d1e34f0-f966-48db-8cc2-209d43aa4cbc</guid><category><![CDATA[Know How]]></category><dc:creator><![CDATA[test10]]></dc:creator><pubDate>Sat, 31 May 2014 14:43:44 GMT</pubDate></item><item><title><![CDATA[HowTo：OpenLDAP with Microsoft SQL Server backend on CentOS]]></title><description><![CDATA[<p><img src='http://blog.mikotek.com.tw/content/images/2014/Jun/LDAPworm.gif'  alt="" /></p>

<h6 id="authorseanchangmailtosean_changmikotekcomtw">Author: <a href='mailto:sean_chang@mikotek.com.tw' >Sean Chang</a></h6>

<h3 id="background">Background</h3>

<p>If you would like to join different systems and combine wireless accounts in your current non-Microsoft Active Directory environment by a single auth server, the <del>low-priced</del> easiest way surely is using open source projects to setup your own LDAP Directory service.</p>

<p>The most popular open source LDAP Directory server project is <em><a href='http://www.openldap.org/' "target="_blank">OpenLDAP</a></em>.  However, We can find many OpenLDAP examples on net.  But when it comes to back-sql, especially when you need to integrate authentication by existing user accounts of current system, which were stored in MSSQL backend, you can find only MySQL and PostgreSQL success stories.</p>

<p>We wish this document can deliver some useful hints on how to deal with OpenLDAP with backend MSSQL.</p>

<blockquote>
  <p>LDAP is based on a simpler subset of the standards contained within the <a href='http://en.wikipedia.org/wiki/X.500' "target="_blank">X.500</a> standard.  Different than RDBMS, such as Oracle, MSSQL, MySQL.  LDAP is a tree structure planned for best searching performance.  <strong>We do not recommend using RDBMS as LDAP backend, unless you have a MUST-TO reason</strong>.</p>
</blockquote>

<h3 id="resources">Resources</h3>

<p>You can learn more about LDAP Directory service through these websites.</p>

<ul>
<li><a href='https://tools.ietf.org/rfc/rfc4511.txt' "target="_blank">Network Working Group RFC 4511</a> - IETF.org</li>
<li><a href='http://en.wikipedia.org/wiki/Lightweight_Directory_Access_Protocol' "target="_blank">Lightweight Directory Access Protocol</a> - WIKIPEDIA</li>
<li><a href='http://www.openldap.org/' "target="_blank">OpenLDAP</a> - OpenLDAP open source project site</li>
</ul>

<h3 id="tableofcontents">Table of Contents</h3>

<ol>
<li><a href="#Components Installation">Components Installation</a>  </li>
<li><a href="#freeTDS Installation">freeTDS Installation</a>  </li>
<li><a href="#Configuration of each component">Configuration of each component</a>  </li>
<li><a href="#Setting Up OpenLDAP">Setting Up OpenLDAP</a>  </li>
<li><a href="#Verify OpenLDAP Configurations">Verify OpenLDAP Configurations</a>  </li>
<li><a href="#Misc">Misc.</a>  </li>
<li><a href="#Further Readings">Further Readings</a></li>
</ol>

<h3 id="componentsandsoftwareversion">Components and Software Version</h3>

<ul>
<li>OpenLDAP Server
<ul><li>OS: CentOS 6.5 (64-bit)</li>
<li>OpenLDAP: 2.4.23</li>
<li>unixODBC: 2.2.14</li>
<li>freeTDS: 0.91</li></ul></li>
<li>Remote Database
<ul><li>OS: Microsoft Windows 2008 Server R2</li>
<li>Database: Microsoft SQL Server 2012</li></ul></li>
</ul>

<h3 id="basicscenario">Basic Scenario</h3>

<p>To use OpenLDAP with backend Microsoft SQL Server, you have to find a correct way to link them together.  The following is our scenario: </p>

<ul>
<li>Using freeTDS driver to link Microsoft SQL Server, and set freeTDS as an ODBC datasource</li>
<li>OpenLDAP using unixODBC driver to link with freeTDS ODBC</li>
<li>The logical structure:</li>
</ul>

<p><img src='http://blog.mikotek.com.tw/content/images/2014/May/Basic_Scenario.png'  alt="The logical structure" /></p>

<h3 id="beforewestart">Before We Start</h3>

<p>The following processes begin after you finish the installation of operation system.  We setup our OS using <em>CentOS Minimal Installation</em>, and then <code>wget</code> tool has been installed.</p>

<blockquote>
  <p>You can learn how to install CentOS Minimal in this article: <a href='http://lintut.com/how-to-install-centos-6-5-minimal/' "target="_blank">How to install CentOS 6.5 minimal</a> by <a href='mailto:radenkobogdanovic@gmail.com' >rasho</a> on <a href='http://lintut.com/' "target="_blank">LINTUT</a></p>
</blockquote>

<p><a name="Components Installation"></a></p>

<h3 id="1componentsinstallation">1. Components Installation</h3>

<p>Because we <del>are so lazy</del> hope this document can more clean and clear, we install our components using <code>yum</code> with <code>root</code> account in the following processes.</p>

<p>Of course, you can finish same procedures by using <code>sudo</code> with <code>user account</code>.  And to install all components using <code>rpm</code> is definitely ok too.</p>

<pre><code class="c">#yum install openldap openldap-clients openldap-servers openldap-devel openldap-servers-sql
#yum install unixODBC unixODBC-libs unixODBC-devel
</code></pre>

<p><a name="freeTDS Installation"></a></p>

<h3 id="2freetdsinstallation">2. freeTDS Installation</h3>

<h4 id="21setenvironmentvariable">2.1 Set Environment variable</h4>

<p>Use <code>vi</code> or <code>nano</code> to edit <code>/etc/profile</code>, adding this section at the end of file:</p>

<pre><code class="c"># TDS
    SYBASE=/usr/local
    LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:$SYBASE/lib
    export SYBASE LD_LIBRARY_PATH
</code></pre>

<h4 id="22downloadandunpackfreetds">2.2 Download and unpack freeTDS</h4>

<p>You can find the download link in <a href='http://www.freetds.org/' "target="_blank">freeTDS Project Site</a>.  Generally they will not modify the link of stable version.</p>

<blockquote>
  <p>ps. You may switch to <code>/tmp</code> dictionary first</p>
</blockquote>

<pre><code class="c">#wget ftp://ftp.freetds.org/pub/freetds/stable/freetds-stable.tgz
#tar -zxf freetds-stable.tgz
#cd freetds-0.91 ||REPLACE WITH YOUR VERSION NUMBER
</code></pre>

<h4 id="23installfreetds">2.3 Install freeTDS</h4>

<pre><code class="c">#./configure --with-tdsver=8.0 --with-unixodbc=/usr/local
#make
#make install
</code></pre>

<p>The general freeTDS installation paths is:</p>

<ul>
<li>Library： <code>/usr/local/lib</code></li>
<li>Configuration： <code>/usr/local/etc</code></li>
</ul>

<p><a name="Configuration of each component"></a></p>

<h3 id="3configurationofeachcomponent">3. Configuration of each component</h3>

<h4 id="31prepareldapdatabaseonyourmssqlserver">3.1 Prepare LDAP Database on your MSSQL Server</h4>

<p>Before we start to config all components, the first step is to create sample database and data for LDAP service in your SQL Server.</p>

<p>You can find these samples at the latest version of OpenLDAP on <a href='http://www.openldap.org/software/download/' "target="_blank">OpenLDAP Project site</a>.  Download and unpack it, the sample scripts are located in <code>\servers\slapd\back-sql\rdbms_depend\mssql</code>.  Of course, you can download <a href='http://blog.mikotek.com.tw/content/images/2014/May/mssql_schema_2.4.39.zip' >Sample MSSQL Schema</a> from here.</p>

<p>We recommend you execute these scripts through <a href='http://www.microsoft.com/en-us/download/details.aspx?id=29062' "target="_blank">SQL Server Management Studio</a>:</p>

<ul>
<li><p>Create LDAP database</p>

<blockquote>
  <p>We assume the database name is <code>LDAP</code></p>
</blockquote></li>
<li><p>Execute <code>backsql_create.sql</code> in <code>LDAP</code> database</p>

<blockquote>
  <p>Create OpenLDAP Schama</p>
</blockquote></li>
<li><p>Execute <code>testdb_create.sql</code> in <code>LDAP</code> database</p>

<blockquote>
  <p>Create Sample Data Tables</p>
</blockquote></li>
<li><p>Execute <code>testdb_metadata.sql</code> in <code>LDAP</code> database</p>

<blockquote>
  <p>Create Sample Metadata</p>
</blockquote></li>
<li><p>Execute <code>testdb_data.sql</code> in <code>LDAP</code> database</p>

<blockquote>
  <p>Create Sample Data</p>
</blockquote></li>
</ul>

<h4 id="32freetdstomicrosoftsqlserver">3.2 freeTDS to Microsoft SQL Server</h4>

<p>Use <code>vi</code> or <code>nano</code> to edit <code>/usr/local/etc/freetds.conf</code>, adding this section at the end of file:</p>

<pre><code class="c">[MSSQL]
#REPLACE WITH YOUR MSSQL SERVER IPv4 ADDRESS
host = 192.168.1.100

#REPLACE WITH YOUR MSSQL SERVER LISTENING PORT
port = 1433

tds version = 8.0  
client charset = UTF-8  
</code></pre>

<h4 id="33confirmfreetdsconfiguration">3.3 Confirm freeTDS Configuration</h4>

<p>You can test the connectivity between freeTDS and SQL Server using this command:  </p>

<pre><code class="c">#tsql -S MSSQL -U username -P password
</code></pre>

<p>If your settings were correct, you will see a reponse like this:</p>

<p><img src='http://blog.mikotek.com.tw/content/images/2014/May/tsql.png'  alt="tsql" /></p>

<p>Type <code>exit</code> to leave.</p>

<h4 id="34unixodbctofreetds">3.4 unixODBC to freeTDS</h4>

<h5 id="341odbcinstini">3.4.1 odbcinst.ini</h5>

<p>Use <code>vi</code> or <code>nano</code> to edit <code>/etc/odbcinst.ini</code>.</p>

<ul>
<li><p>There are default <code>PostgreSQL</code> and <code>MySQL</code> settings. We will not use these database, you can mark them as unused.</p></li>
<li><p>Adding this section at the end of file:</p></li>
</ul>

<pre><code class="c">[FreeTDS]
Description=ODBC for SQL Server  
Driver=/usr/local/lib/libtdsodbc.so  
UsageCount=1  
</code></pre>

<h5 id="342odbcini">3.4.2 odbc.ini</h5>

<p>Use <code>vi</code> or <code>nano</code> to edit <code>/etc/odbc.ini</code>, adding this section at the end of file:</p>

<pre><code class="c">[MSODBC]
Driver=FreeTDS  
Description=Mikotek SQL Server  
Trace=No

#REPLACE WITH YOUR MSSQL SERVER IPv4 ADDRESS
Server= 192.168.1.100

#REPLACE WITH YOUR LDAP DATABASE NAME
Database= LDAP

#REPLACE WITH YOUR MSSQL SERVER LISTENING PORT
Port=1433

TDS_Version = 8.0  
Charset = UTF-8  
</code></pre>

<h4 id="35confirmunixodbcconfiguration">3.5 Confirm unixODBC Configuration</h4>

<p>You can test the connectivity between unixODBC and SQL Server using this command:  </p>

<pre><code class="c">#isql -v MSODBC username password
</code></pre>

<p>If your settings were correct, you will see a reponse like this:</p>

<p><img src='http://blog.mikotek.com.tw/content/images/2014/May/isql.png'  alt="isql" /></p>

<p>Type <code>quit</code> to leave。</p>

<p><a name="Setting Up OpenLDAP"></a></p>

<h3 id="4settingupopenldap">4. Setting Up OpenLDAP</h3>

<h4 id="41generateasecurepassword">4.1 Generate a Secure Password</h4>

<p>In later section, we will set up an OpenLDAP administrator and an administrative password.  OpenLDAP supports <code>plaintext</code> password, and an encrypted password like <code>MD5</code>, <code>SHA</code>, <code>CRYPT</code> is supported too.</p>

<p>We are going to use <code>CRYPT</code> password this time, you can generate a secure password by <code>slappasswd -h {crypt}</code>:  </p>

<pre><code class="c">#slappasswd -h {crypt}
New password:  
Re-enter new password:  
{CRYPT}4kXX4T1wXj3Zc
</code></pre>

<p>The <code>{CRYPT}4kXX4T1wXj3Zc</code> is the encrypted password. Copy it, we will need it later.</p>

<h4 id="42copyslapdconffromopenldaptemplate">4.2 Copy slapd.conf from OpenLDAP Template</h4>

<pre><code class="c">#cp /usr/share/openldap-servers/slapd.conf.obsolete /etc/openldap/slapd.conf
</code></pre>

<h4 id="43removeandbackupdefaultbdbdatabase">4.3 Remove and Backup Default BDB Database</h4>

<pre><code class="c">#mv /etc/openldap/slapd.d /etc/openldap/slapd.d.bak
</code></pre>

<h4 id="44slapdconfconfiguration">4.4 slapd.conf Configuration</h4>

<p>Use <code>vi</code> or <code>nano</code> to edit <code>/etc/openldap/slapd.conf</code>.</p>

<h5 id="441sectioninclude">4.4.1 Section: include</h5>

<p>We will need only the following LDAP schemas in this practice:  </p>

<pre><code class="c">include    /etc/openldap/schema/core.schema  
include    /etc/openldap/schema/cosine.schema  
include    /etc/openldap/schema/inetorgperson.schema  
</code></pre>

<p>You can mark other schemas as unused.</p>

<h5 id="442sectionmodule">4.4.2 Section: module</h5>

<p>We are using <code>64-bit</code> system, and use only <code>back_sql</code> module, you can mark other modules as unused.</p>

<pre><code class="c">modulepath /usr/lib64/openldap  
moduleload back_sql.la  
</code></pre>

<h5 id="443sectiontlscertificateconfiguration">4.4.3 Section: TLS Certificate Configuration</h5>

<p>OpenLDAP supports SSL connection, you can set up TLS configuration in this section.</p>

<p>However, we DO NOT include the know-how of SSL setup in this practice.  <strong>You can mark the TLS section as unused for now</strong>.  If you were interested in OpenLDAP SSL configuration, you may find some useful hint in this document: <a href='http://www.zarafa.com/wiki/index.php/Configure_OpenLDAP_with_SSL/TLS' "target="_blank">Configure OpenLDAP with SSL/TLS</a></p>

<h5 id="444sectionaclconfiguration">4.4.4 Section: ACL Configuration</h5>

<h6 id="acl1alowusersviewandchangetheirownpassword">ACL 1: Alow Users view and change their own password</h6>

<pre><code class="sh">access to attrs=userpassword  
    by self write
    by anonymous auth
    by * none
</code></pre>

<h6 id="acl2allowauthenticateduserstoviewlimitanonymoususerstoauth">ACL 2: Allow Authenticated Users to View, Limit Anonymous Users to Auth</h6>

<pre><code class="sh">access to *  
    by self write
    by users read
    by anonymous auth
    by * none
</code></pre>

<h5 id="445sectiondatabasedefinitions">4.4.5 Section: Database Definitions</h5>

<p>There is a default BDB database definition in template config file.  We are going to set up a SQL database, so mark whole default BDB database section as unused.</p>

<p>Adding our SQL database definition at the end of file:  </p>

<pre><code class="c">###################################################
# sql database definitions
###################################################

database        sql  
suffix          "dc=example,dc=com"  
rootdn          "cn=Manager,dc=example,dc=com"

#REPLACE WITH YOUR SECURE PASSWORD
rootpw          {CRYPT}4kXX4T1wXj3Zc

#ODBC DATASOURCE NAME
dbname          MSODBC

#REPLACE WITH YOUR MSSQL LDAP DATABASE USER
dbuser          username

#REPLACE WITH YOUR MSSQL LDAP DATABASE USER PASSWORD
dbpasswd        password

subtree_cond    "ldap_entries.dn LIKE '%'+?"

has_ldapinfo_dn_ru      no  
###################################################
</code></pre>

<h4 id="45ldapconfconfiguration">4.5 ldap.conf Configuration</h4>

<p>Use <code>vi</code> or <code>nano</code> to edit <code>/etc/openldap/ldap.conf</code>.</p>

<p>Define LDAP base, and set the LDAP uri according to your environment:  </p>

<pre><code class="ruby">BASE    dc=example,dc=com  
URI    ldap://ldap.example.com  
</code></pre>

<p><a name="Verify OpenLDAP Configurations"></a></p>

<h3 id="5verifyopenldapconfigurations">5. Verify OpenLDAP Configurations</h3>

<h4 id="51openldapconfigtesting">5.1 OpenLDAP Config Testing</h4>

<p>You can verify your config file using this command:  </p>

<pre><code class="c">#slaptest -u
</code></pre>

<p>If your settings were correct, you will see a reponse like this:  </p>

<pre><code>config file testing succeeded  
</code></pre>

<h4 id="52launchtheslapdaemon">5.2 Launch the Slap Daemon</h4>

<pre><code class="c">#service slapd start
</code></pre>

<h4 id="53testconnectivityanddatawithldapclient">5.3 Test Connectivity and Data with LDAP client</h4>

<p>You can perform a LDAP search by <code>ldapsearch</code>, using this command to verify LDAP working functionally:  </p>

<pre><code class="c">#ldapsearch -x -D cn=Manager,dc=example,dc=com -w YOUR_LDAP_ROOTPW -b dc=example,dc=com
</code></pre>

<blockquote>
  <p>REPLACE <code>YOUR_LDAP_ROOTPW</code> with your definition</p>
</blockquote>

<p>If your settings were correct, you will see a reponse like this:  </p>

<pre><code class="c"># extended LDIF
#
# LDAPv3
# base &lt;dc=example,dc=com&gt; with scope subtree
# filter: sn=Kovalev
# requesting: ALL
#

# Mitya Kovalev, example.com
dn: cn=Mitya Kovalev,dc=example,dc=com  
objectClass: inetOrgPerson  
cn: Mitya Kovalev  
sn: Kovalev  
seeAlso: documentTitle=book1,dc=example,dc=com  
seeAlso: documentTitle=book2,dc=example,dc=com  
givenName: Mitya  
userPassword:: bWl0  
telephoneNumber: 222-3234  
telephoneNumber: 332-2334

# search result
search: 2  
result: 0 Success

# numResponses: 2
# numEntries: 1
</code></pre>

<p><a name="Misc"></a></p>

<h3 id="6misc">6. Misc.</h3>

<h4 id="61automaticlaunchopenldapserviceonsystemboot">6.1 Automatic Launch OpenLDAP service on system boot</h4>

<pre><code class="c">#chkconfig --add ldap
#chkconfig ldap on
</code></pre>

<p><a name="Further Readings"></a></p>

<h3 id="7furtherreadings">7. Further Readings</h3>

<p>For now, you are successfully integrate OpenLDAP with backend Microsoft SQL Server.</p>

<p>If you were interested in LDAP data design and metadata planning, you may find some useful information in these websites:</p>

<ul>
<li><a href='http://www.flatmtn.com/article/setting-ldap-back-sql' "target="_blank">Setting up LDAP with back-sql</a> - Flat Mountain</li>
<li><a href='http://www.wingfoss.com/content/sample-mysql-for-openldap-back-sql' "target="_blank">Sample MySQL schema for OpenLDAP with back-sql</a> - WingFOSS</li>
<li><a href='http://oav.net/mirrors/LDAP-ObjectClasses.html' "target="_blank">Common LDAP schemas</a> - oav.net</li>
</ul>]]></description><link>http://blog.mikotek.com.tw/2014/05/31/openldap-with-microsoft-sql-server-backend-database-on-centos-2/</link><guid isPermaLink="false">3d1e34f0-f966-48db-8cc2-209d43aa4cbc</guid><category><![CDATA[Know How]]></category><dc:creator><![CDATA[test10]]></dc:creator><pubDate>Sat, 31 May 2014 14:43:44 GMT</pubDate></item><item><title><![CDATA[HowTo：OpenLDAP with Microsoft SQL Server backend on CentOS]]></title><description><![CDATA[<p><img src='http://blog.mikotek.com.tw/content/images/2014/Jun/LDAPworm.gif'  alt="" /></p>

<h6 id="authorseanchangmailtosean_changmikotekcomtw">Author: <a href='mailto:sean_chang@mikotek.com.tw' >Sean Chang</a></h6>

<h3 id="background">Background</h3>

<p>If you would like to join different systems and combine wireless accounts in your current non-Microsoft Active Directory environment by a single auth server, the <del>low-priced</del> easiest way surely is using open source projects to setup your own LDAP Directory service.</p>

<p>The most popular open source LDAP Directory server project is <em><a href='http://www.openldap.org/' "target="_blank">OpenLDAP</a></em>.  However, We can find many OpenLDAP examples on net.  But when it comes to back-sql, especially when you need to integrate authentication by existing user accounts of current system, which were stored in MSSQL backend, you can find only MySQL and PostgreSQL success stories.</p>

<p>We wish this document can deliver some useful hints on how to deal with OpenLDAP with backend MSSQL.</p>

<blockquote>
  <p>LDAP is based on a simpler subset of the standards contained within the <a href='http://en.wikipedia.org/wiki/X.500' "target="_blank">X.500</a> standard.  Different than RDBMS, such as Oracle, MSSQL, MySQL.  LDAP is a tree structure planned for best searching performance.  <strong>We do not recommend using RDBMS as LDAP backend, unless you have a MUST-TO reason</strong>.</p>
</blockquote>

<h3 id="resources">Resources</h3>

<p>You can learn more about LDAP Directory service through these websites.</p>

<ul>
<li><a href='https://tools.ietf.org/rfc/rfc4511.txt' "target="_blank">Network Working Group RFC 4511</a> - IETF.org</li>
<li><a href='http://en.wikipedia.org/wiki/Lightweight_Directory_Access_Protocol' "target="_blank">Lightweight Directory Access Protocol</a> - WIKIPEDIA</li>
<li><a href='http://www.openldap.org/' "target="_blank">OpenLDAP</a> - OpenLDAP open source project site</li>
</ul>

<h3 id="tableofcontents">Table of Contents</h3>

<ol>
<li><a href="#Components Installation">Components Installation</a>  </li>
<li><a href="#freeTDS Installation">freeTDS Installation</a>  </li>
<li><a href="#Configuration of each component">Configuration of each component</a>  </li>
<li><a href="#Setting Up OpenLDAP">Setting Up OpenLDAP</a>  </li>
<li><a href="#Verify OpenLDAP Configurations">Verify OpenLDAP Configurations</a>  </li>
<li><a href="#Misc">Misc.</a>  </li>
<li><a href="#Further Readings">Further Readings</a></li>
</ol>

<h3 id="componentsandsoftwareversion">Components and Software Version</h3>

<ul>
<li>OpenLDAP Server
<ul><li>OS: CentOS 6.5 (64-bit)</li>
<li>OpenLDAP: 2.4.23</li>
<li>unixODBC: 2.2.14</li>
<li>freeTDS: 0.91</li></ul></li>
<li>Remote Database
<ul><li>OS: Microsoft Windows 2008 Server R2</li>
<li>Database: Microsoft SQL Server 2012</li></ul></li>
</ul>

<h3 id="basicscenario">Basic Scenario</h3>

<p>To use OpenLDAP with backend Microsoft SQL Server, you have to find a correct way to link them together.  The following is our scenario: </p>

<ul>
<li>Using freeTDS driver to link Microsoft SQL Server, and set freeTDS as an ODBC datasource</li>
<li>OpenLDAP using unixODBC driver to link with freeTDS ODBC</li>
<li>The logical structure:</li>
</ul>

<p><img src='http://blog.mikotek.com.tw/content/images/2014/May/Basic_Scenario.png'  alt="The logical structure" /></p>

<h3 id="beforewestart">Before We Start</h3>

<p>The following processes begin after you finish the installation of operation system.  We setup our OS using <em>CentOS Minimal Installation</em>, and then <code>wget</code> tool has been installed.</p>

<blockquote>
  <p>You can learn how to install CentOS Minimal in this article: <a href='http://lintut.com/how-to-install-centos-6-5-minimal/' "target="_blank">How to install CentOS 6.5 minimal</a> by <a href='mailto:radenkobogdanovic@gmail.com' >rasho</a> on <a href='http://lintut.com/' "target="_blank">LINTUT</a></p>
</blockquote>

<p><a name="Components Installation"></a></p>

<h3 id="1componentsinstallation">1. Components Installation</h3>

<p>Because we <del>are so lazy</del> hope this document can more clean and clear, we install our components using <code>yum</code> with <code>root</code> account in the following processes.</p>

<p>Of course, you can finish same procedures by using <code>sudo</code> with <code>user account</code>.  And to install all components using <code>rpm</code> is definitely ok too.</p>

<pre><code class="c">#yum install openldap openldap-clients openldap-servers openldap-devel openldap-servers-sql
#yum install unixODBC unixODBC-libs unixODBC-devel
</code></pre>

<p><a name="freeTDS Installation"></a></p>

<h3 id="2freetdsinstallation">2. freeTDS Installation</h3>

<h4 id="21setenvironmentvariable">2.1 Set Environment variable</h4>

<p>Use <code>vi</code> or <code>nano</code> to edit <code>/etc/profile</code>, adding this section at the end of file:</p>

<pre><code class="c"># TDS
    SYBASE=/usr/local
    LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:$SYBASE/lib
    export SYBASE LD_LIBRARY_PATH
</code></pre>

<h4 id="22downloadandunpackfreetds">2.2 Download and unpack freeTDS</h4>

<p>You can find the download link in <a href='http://www.freetds.org/' "target="_blank">freeTDS Project Site</a>.  Generally they will not modify the link of stable version.</p>

<blockquote>
  <p>ps. You may switch to <code>/tmp</code> dictionary first</p>
</blockquote>

<pre><code class="c">#wget ftp://ftp.freetds.org/pub/freetds/stable/freetds-stable.tgz
#tar -zxf freetds-stable.tgz
#cd freetds-0.91 ||REPLACE WITH YOUR VERSION NUMBER
</code></pre>

<h4 id="23installfreetds">2.3 Install freeTDS</h4>

<pre><code class="c">#./configure --with-tdsver=8.0 --with-unixodbc=/usr/local
#make
#make install
</code></pre>

<p>The general freeTDS installation paths is:</p>

<ul>
<li>Library： <code>/usr/local/lib</code></li>
<li>Configuration： <code>/usr/local/etc</code></li>
</ul>

<p><a name="Configuration of each component"></a></p>

<h3 id="3configurationofeachcomponent">3. Configuration of each component</h3>

<h4 id="31prepareldapdatabaseonyourmssqlserver">3.1 Prepare LDAP Database on your MSSQL Server</h4>

<p>Before we start to config all components, the first step is to create sample database and data for LDAP service in your SQL Server.</p>

<p>You can find these samples at the latest version of OpenLDAP on <a href='http://www.openldap.org/software/download/' "target="_blank">OpenLDAP Project site</a>.  Download and unpack it, the sample scripts are located in <code>\servers\slapd\back-sql\rdbms_depend\mssql</code>.  Of course, you can download <a href='http://blog.mikotek.com.tw/content/images/2014/May/mssql_schema_2.4.39.zip' >Sample MSSQL Schema</a> from here.</p>

<p>We recommend you execute these scripts through <a href='http://www.microsoft.com/en-us/download/details.aspx?id=29062' "target="_blank">SQL Server Management Studio</a>:</p>

<ul>
<li><p>Create LDAP database</p>

<blockquote>
  <p>We assume the database name is <code>LDAP</code></p>
</blockquote></li>
<li><p>Execute <code>backsql_create.sql</code> in <code>LDAP</code> database</p>

<blockquote>
  <p>Create OpenLDAP Schama</p>
</blockquote></li>
<li><p>Execute <code>testdb_create.sql</code> in <code>LDAP</code> database</p>

<blockquote>
  <p>Create Sample Data Tables</p>
</blockquote></li>
<li><p>Execute <code>testdb_metadata.sql</code> in <code>LDAP</code> database</p>

<blockquote>
  <p>Create Sample Metadata</p>
</blockquote></li>
<li><p>Execute <code>testdb_data.sql</code> in <code>LDAP</code> database</p>

<blockquote>
  <p>Create Sample Data</p>
</blockquote></li>
</ul>

<h4 id="32freetdstomicrosoftsqlserver">3.2 freeTDS to Microsoft SQL Server</h4>

<p>Use <code>vi</code> or <code>nano</code> to edit <code>/usr/local/etc/freetds.conf</code>, adding this section at the end of file:</p>

<pre><code class="c">[MSSQL]
#REPLACE WITH YOUR MSSQL SERVER IPv4 ADDRESS
host = 192.168.1.100

#REPLACE WITH YOUR MSSQL SERVER LISTENING PORT
port = 1433

tds version = 8.0  
client charset = UTF-8  
</code></pre>

<h4 id="33confirmfreetdsconfiguration">3.3 Confirm freeTDS Configuration</h4>

<p>You can test the connectivity between freeTDS and SQL Server using this command:  </p>

<pre><code class="c">#tsql -S MSSQL -U username -P password
</code></pre>

<p>If your settings were correct, you will see a reponse like this:</p>

<p><img src='http://blog.mikotek.com.tw/content/images/2014/May/tsql.png'  alt="tsql" /></p>

<p>Type <code>exit</code> to leave.</p>

<h4 id="34unixodbctofreetds">3.4 unixODBC to freeTDS</h4>

<h5 id="341odbcinstini">3.4.1 odbcinst.ini</h5>

<p>Use <code>vi</code> or <code>nano</code> to edit <code>/etc/odbcinst.ini</code>.</p>

<ul>
<li><p>There are default <code>PostgreSQL</code> and <code>MySQL</code> settings. We will not use these database, you can mark them as unused.</p></li>
<li><p>Adding this section at the end of file:</p></li>
</ul>

<pre><code class="c">[FreeTDS]
Description=ODBC for SQL Server  
Driver=/usr/local/lib/libtdsodbc.so  
UsageCount=1  
</code></pre>

<h5 id="342odbcini">3.4.2 odbc.ini</h5>

<p>Use <code>vi</code> or <code>nano</code> to edit <code>/etc/odbc.ini</code>, adding this section at the end of file:</p>

<pre><code class="c">[MSODBC]
Driver=FreeTDS  
Description=Mikotek SQL Server  
Trace=No

#REPLACE WITH YOUR MSSQL SERVER IPv4 ADDRESS
Server= 192.168.1.100

#REPLACE WITH YOUR LDAP DATABASE NAME
Database= LDAP

#REPLACE WITH YOUR MSSQL SERVER LISTENING PORT
Port=1433

TDS_Version = 8.0  
Charset = UTF-8  
</code></pre>

<h4 id="35confirmunixodbcconfiguration">3.5 Confirm unixODBC Configuration</h4>

<p>You can test the connectivity between unixODBC and SQL Server using this command:  </p>

<pre><code class="c">#isql -v MSODBC username password
</code></pre>

<p>If your settings were correct, you will see a reponse like this:</p>

<p><img src='http://blog.mikotek.com.tw/content/images/2014/May/isql.png'  alt="isql" /></p>

<p>Type <code>quit</code> to leave。</p>

<p><a name="Setting Up OpenLDAP"></a></p>

<h3 id="4settingupopenldap">4. Setting Up OpenLDAP</h3>

<h4 id="41generateasecurepassword">4.1 Generate a Secure Password</h4>

<p>In later section, we will set up an OpenLDAP administrator and an administrative password.  OpenLDAP supports <code>plaintext</code> password, and an encrypted password like <code>MD5</code>, <code>SHA</code>, <code>CRYPT</code> is supported too.</p>

<p>We are going to use <code>CRYPT</code> password this time, you can generate a secure password by <code>slappasswd -h {crypt}</code>:  </p>

<pre><code class="c">#slappasswd -h {crypt}
New password:  
Re-enter new password:  
{CRYPT}4kXX4T1wXj3Zc
</code></pre>

<p>The <code>{CRYPT}4kXX4T1wXj3Zc</code> is the encrypted password. Copy it, we will need it later.</p>

<h4 id="42copyslapdconffromopenldaptemplate">4.2 Copy slapd.conf from OpenLDAP Template</h4>

<pre><code class="c">#cp /usr/share/openldap-servers/slapd.conf.obsolete /etc/openldap/slapd.conf
</code></pre>

<h4 id="43removeandbackupdefaultbdbdatabase">4.3 Remove and Backup Default BDB Database</h4>

<pre><code class="c">#mv /etc/openldap/slapd.d /etc/openldap/slapd.d.bak
</code></pre>

<h4 id="44slapdconfconfiguration">4.4 slapd.conf Configuration</h4>

<p>Use <code>vi</code> or <code>nano</code> to edit <code>/etc/openldap/slapd.conf</code>.</p>

<h5 id="441sectioninclude">4.4.1 Section: include</h5>

<p>We will need only the following LDAP schemas in this practice:  </p>

<pre><code class="c">include    /etc/openldap/schema/core.schema  
include    /etc/openldap/schema/cosine.schema  
include    /etc/openldap/schema/inetorgperson.schema  
</code></pre>

<p>You can mark other schemas as unused.</p>

<h5 id="442sectionmodule">4.4.2 Section: module</h5>

<p>We are using <code>64-bit</code> system, and use only <code>back_sql</code> module, you can mark other modules as unused.</p>

<pre><code class="c">modulepath /usr/lib64/openldap  
moduleload back_sql.la  
</code></pre>

<h5 id="443sectiontlscertificateconfiguration">4.4.3 Section: TLS Certificate Configuration</h5>

<p>OpenLDAP supports SSL connection, you can set up TLS configuration in this section.</p>

<p>However, we DO NOT include the know-how of SSL setup in this practice.  <strong>You can mark the TLS section as unused for now</strong>.  If you were interested in OpenLDAP SSL configuration, you may find some useful hint in this document: <a href='http://www.zarafa.com/wiki/index.php/Configure_OpenLDAP_with_SSL/TLS' "target="_blank">Configure OpenLDAP with SSL/TLS</a></p>

<h5 id="444sectionaclconfiguration">4.4.4 Section: ACL Configuration</h5>

<h6 id="acl1alowusersviewandchangetheirownpassword">ACL 1: Alow Users view and change their own password</h6>

<pre><code class="sh">access to attrs=userpassword  
    by self write
    by anonymous auth
    by * none
</code></pre>

<h6 id="acl2allowauthenticateduserstoviewlimitanonymoususerstoauth">ACL 2: Allow Authenticated Users to View, Limit Anonymous Users to Auth</h6>

<pre><code class="sh">access to *  
    by self write
    by users read
    by anonymous auth
    by * none
</code></pre>

<h5 id="445sectiondatabasedefinitions">4.4.5 Section: Database Definitions</h5>

<p>There is a default BDB database definition in template config file.  We are going to set up a SQL database, so mark whole default BDB database section as unused.</p>

<p>Adding our SQL database definition at the end of file:  </p>

<pre><code class="c">###################################################
# sql database definitions
###################################################

database        sql  
suffix          "dc=example,dc=com"  
rootdn          "cn=Manager,dc=example,dc=com"

#REPLACE WITH YOUR SECURE PASSWORD
rootpw          {CRYPT}4kXX4T1wXj3Zc

#ODBC DATASOURCE NAME
dbname          MSODBC

#REPLACE WITH YOUR MSSQL LDAP DATABASE USER
dbuser          username

#REPLACE WITH YOUR MSSQL LDAP DATABASE USER PASSWORD
dbpasswd        password

subtree_cond    "ldap_entries.dn LIKE '%'+?"

has_ldapinfo_dn_ru      no  
###################################################
</code></pre>

<h4 id="45ldapconfconfiguration">4.5 ldap.conf Configuration</h4>

<p>Use <code>vi</code> or <code>nano</code> to edit <code>/etc/openldap/ldap.conf</code>.</p>

<p>Define LDAP base, and set the LDAP uri according to your environment:  </p>

<pre><code class="ruby">BASE    dc=example,dc=com  
URI    ldap://ldap.example.com  
</code></pre>

<p><a name="Verify OpenLDAP Configurations"></a></p>

<h3 id="5verifyopenldapconfigurations">5. Verify OpenLDAP Configurations</h3>

<h4 id="51openldapconfigtesting">5.1 OpenLDAP Config Testing</h4>

<p>You can verify your config file using this command:  </p>

<pre><code class="c">#slaptest -u
</code></pre>

<p>If your settings were correct, you will see a reponse like this:  </p>

<pre><code>config file testing succeeded  
</code></pre>

<h4 id="52launchtheslapdaemon">5.2 Launch the Slap Daemon</h4>

<pre><code class="c">#service slapd start
</code></pre>

<h4 id="53testconnectivityanddatawithldapclient">5.3 Test Connectivity and Data with LDAP client</h4>

<p>You can perform a LDAP search by <code>ldapsearch</code>, using this command to verify LDAP working functionally:  </p>

<pre><code class="c">#ldapsearch -x -D cn=Manager,dc=example,dc=com -w YOUR_LDAP_ROOTPW -b dc=example,dc=com
</code></pre>

<blockquote>
  <p>REPLACE <code>YOUR_LDAP_ROOTPW</code> with your definition</p>
</blockquote>

<p>If your settings were correct, you will see a reponse like this:  </p>

<pre><code class="c"># extended LDIF
#
# LDAPv3
# base &lt;dc=example,dc=com&gt; with scope subtree
# filter: sn=Kovalev
# requesting: ALL
#

# Mitya Kovalev, example.com
dn: cn=Mitya Kovalev,dc=example,dc=com  
objectClass: inetOrgPerson  
cn: Mitya Kovalev  
sn: Kovalev  
seeAlso: documentTitle=book1,dc=example,dc=com  
seeAlso: documentTitle=book2,dc=example,dc=com  
givenName: Mitya  
userPassword:: bWl0  
telephoneNumber: 222-3234  
telephoneNumber: 332-2334

# search result
search: 2  
result: 0 Success

# numResponses: 2
# numEntries: 1
</code></pre>

<p><a name="Misc"></a></p>

<h3 id="6misc">6. Misc.</h3>

<h4 id="61automaticlaunchopenldapserviceonsystemboot">6.1 Automatic Launch OpenLDAP service on system boot</h4>

<pre><code class="c">#chkconfig --add ldap
#chkconfig ldap on
</code></pre>

<p><a name="Further Readings"></a></p>

<h3 id="7furtherreadings">7. Further Readings</h3>

<p>For now, you are successfully integrate OpenLDAP with backend Microsoft SQL Server.</p>

<p>If you were interested in LDAP data design and metadata planning, you may find some useful information in these websites:</p>

<ul>
<li><a href='http://www.flatmtn.com/article/setting-ldap-back-sql' "target="_blank">Setting up LDAP with back-sql</a> - Flat Mountain</li>
<li><a href='http://www.wingfoss.com/content/sample-mysql-for-openldap-back-sql' "target="_blank">Sample MySQL schema for OpenLDAP with back-sql</a> - WingFOSS</li>
<li><a href='http://oav.net/mirrors/LDAP-ObjectClasses.html' "target="_blank">Common LDAP schemas</a> - oav.net</li>
</ul>]]></description><link>http://blog.mikotek.com.tw/2014/05/31/openldap-with-microsoft-sql-server-backend-database-on-centos-2-2/</link><guid isPermaLink="false">3d1e34f0-f966-48db-8cc2-209d43aa4cbc</guid><category><![CDATA[Know How]]></category><dc:creator><![CDATA[test10]]></dc:creator><pubDate>Sat, 31 May 2014 14:43:44 GMT</pubDate></item><item><title><![CDATA[HowTo：OpenLDAP with Microsoft SQL Server backend on CentOS]]></title><description><![CDATA[<p><img src='http://blog.mikotek.com.tw/content/images/2014/Jun/LDAPworm.gif'  alt="" /></p>

<h6 id="authorseanchangmailtosean_changmikotekcomtw">Author: <a href='mailto:sean_chang@mikotek.com.tw' >Sean Chang</a></h6>

<h3 id="background">Background</h3>

<p>If you would like to join different systems and combine wireless accounts in your current non-Microsoft Active Directory environment by a single auth server, the <del>low-priced</del> easiest way surely is using open source projects to setup your own LDAP Directory service.</p>

<p>The most popular open source LDAP Directory server project is <em><a href='http://www.openldap.org/' "target="_blank">OpenLDAP</a></em>.  However, We can find many OpenLDAP examples on net.  But when it comes to back-sql, especially when you need to integrate authentication by existing user accounts of current system, which were stored in MSSQL backend, you can find only MySQL and PostgreSQL success stories.</p>

<p>We wish this document can deliver some useful hints on how to deal with OpenLDAP with backend MSSQL.</p>

<blockquote>
  <p>LDAP is based on a simpler subset of the standards contained within the <a href='http://en.wikipedia.org/wiki/X.500' "target="_blank">X.500</a> standard.  Different than RDBMS, such as Oracle, MSSQL, MySQL.  LDAP is a tree structure planned for best searching performance.  <strong>We do not recommend using RDBMS as LDAP backend, unless you have a MUST-TO reason</strong>.</p>
</blockquote>

<h3 id="resources">Resources</h3>

<p>You can learn more about LDAP Directory service through these websites.</p>

<ul>
<li><a href='https://tools.ietf.org/rfc/rfc4511.txt' "target="_blank">Network Working Group RFC 4511</a> - IETF.org</li>
<li><a href='http://en.wikipedia.org/wiki/Lightweight_Directory_Access_Protocol' "target="_blank">Lightweight Directory Access Protocol</a> - WIKIPEDIA</li>
<li><a href='http://www.openldap.org/' "target="_blank">OpenLDAP</a> - OpenLDAP open source project site</li>
</ul>

<h3 id="tableofcontents">Table of Contents</h3>

<ol>
<li><a href="#Components Installation">Components Installation</a>  </li>
<li><a href="#freeTDS Installation">freeTDS Installation</a>  </li>
<li><a href="#Configuration of each component">Configuration of each component</a>  </li>
<li><a href="#Setting Up OpenLDAP">Setting Up OpenLDAP</a>  </li>
<li><a href="#Verify OpenLDAP Configurations">Verify OpenLDAP Configurations</a>  </li>
<li><a href="#Misc">Misc.</a>  </li>
<li><a href="#Further Readings">Further Readings</a></li>
</ol>

<h3 id="componentsandsoftwareversion">Components and Software Version</h3>

<ul>
<li>OpenLDAP Server
<ul><li>OS: CentOS 6.5 (64-bit)</li>
<li>OpenLDAP: 2.4.23</li>
<li>unixODBC: 2.2.14</li>
<li>freeTDS: 0.91</li></ul></li>
<li>Remote Database
<ul><li>OS: Microsoft Windows 2008 Server R2</li>
<li>Database: Microsoft SQL Server 2012</li></ul></li>
</ul>

<h3 id="basicscenario">Basic Scenario</h3>

<p>To use OpenLDAP with backend Microsoft SQL Server, you have to find a correct way to link them together.  The following is our scenario: </p>

<ul>
<li>Using freeTDS driver to link Microsoft SQL Server, and set freeTDS as an ODBC datasource</li>
<li>OpenLDAP using unixODBC driver to link with freeTDS ODBC</li>
<li>The logical structure:</li>
</ul>

<p><img src='http://blog.mikotek.com.tw/content/images/2014/May/Basic_Scenario.png'  alt="The logical structure" /></p>

<h3 id="beforewestart">Before We Start</h3>

<p>The following processes begin after you finish the installation of operation system.  We setup our OS using <em>CentOS Minimal Installation</em>, and then <code>wget</code> tool has been installed.</p>

<blockquote>
  <p>You can learn how to install CentOS Minimal in this article: <a href='http://lintut.com/how-to-install-centos-6-5-minimal/' "target="_blank">How to install CentOS 6.5 minimal</a> by <a href='mailto:radenkobogdanovic@gmail.com' >rasho</a> on <a href='http://lintut.com/' "target="_blank">LINTUT</a></p>
</blockquote>

<p><a name="Components Installation"></a></p>

<h3 id="1componentsinstallation">1. Components Installation</h3>

<p>Because we <del>are so lazy</del> hope this document can more clean and clear, we install our components using <code>yum</code> with <code>root</code> account in the following processes.</p>

<p>Of course, you can finish same procedures by using <code>sudo</code> with <code>user account</code>.  And to install all components using <code>rpm</code> is definitely ok too.</p>

<pre><code class="c">#yum install openldap openldap-clients openldap-servers openldap-devel openldap-servers-sql
#yum install unixODBC unixODBC-libs unixODBC-devel
</code></pre>

<p><a name="freeTDS Installation"></a></p>

<h3 id="2freetdsinstallation">2. freeTDS Installation</h3>

<h4 id="21setenvironmentvariable">2.1 Set Environment variable</h4>

<p>Use <code>vi</code> or <code>nano</code> to edit <code>/etc/profile</code>, adding this section at the end of file:</p>

<pre><code class="c"># TDS
    SYBASE=/usr/local
    LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:$SYBASE/lib
    export SYBASE LD_LIBRARY_PATH
</code></pre>

<h4 id="22downloadandunpackfreetds">2.2 Download and unpack freeTDS</h4>

<p>You can find the download link in <a href='http://www.freetds.org/' "target="_blank">freeTDS Project Site</a>.  Generally they will not modify the link of stable version.</p>

<blockquote>
  <p>ps. You may switch to <code>/tmp</code> dictionary first</p>
</blockquote>

<pre><code class="c">#wget ftp://ftp.freetds.org/pub/freetds/stable/freetds-stable.tgz
#tar -zxf freetds-stable.tgz
#cd freetds-0.91 ||REPLACE WITH YOUR VERSION NUMBER
</code></pre>

<h4 id="23installfreetds">2.3 Install freeTDS</h4>

<pre><code class="c">#./configure --with-tdsver=8.0 --with-unixodbc=/usr/local
#make
#make install
</code></pre>

<p>The general freeTDS installation paths is:</p>

<ul>
<li>Library： <code>/usr/local/lib</code></li>
<li>Configuration： <code>/usr/local/etc</code></li>
</ul>

<p><a name="Configuration of each component"></a></p>

<h3 id="3configurationofeachcomponent">3. Configuration of each component</h3>

<h4 id="31prepareldapdatabaseonyourmssqlserver">3.1 Prepare LDAP Database on your MSSQL Server</h4>

<p>Before we start to config all components, the first step is to create sample database and data for LDAP service in your SQL Server.</p>

<p>You can find these samples at the latest version of OpenLDAP on <a href='http://www.openldap.org/software/download/' "target="_blank">OpenLDAP Project site</a>.  Download and unpack it, the sample scripts are located in <code>\servers\slapd\back-sql\rdbms_depend\mssql</code>.  Of course, you can download <a href='http://blog.mikotek.com.tw/content/images/2014/May/mssql_schema_2.4.39.zip' >Sample MSSQL Schema</a> from here.</p>

<p>We recommend you execute these scripts through <a href='http://www.microsoft.com/en-us/download/details.aspx?id=29062' "target="_blank">SQL Server Management Studio</a>:</p>

<ul>
<li><p>Create LDAP database</p>

<blockquote>
  <p>We assume the database name is <code>LDAP</code></p>
</blockquote></li>
<li><p>Execute <code>backsql_create.sql</code> in <code>LDAP</code> database</p>

<blockquote>
  <p>Create OpenLDAP Schama</p>
</blockquote></li>
<li><p>Execute <code>testdb_create.sql</code> in <code>LDAP</code> database</p>

<blockquote>
  <p>Create Sample Data Tables</p>
</blockquote></li>
<li><p>Execute <code>testdb_metadata.sql</code> in <code>LDAP</code> database</p>

<blockquote>
  <p>Create Sample Metadata</p>
</blockquote></li>
<li><p>Execute <code>testdb_data.sql</code> in <code>LDAP</code> database</p>

<blockquote>
  <p>Create Sample Data</p>
</blockquote></li>
</ul>

<h4 id="32freetdstomicrosoftsqlserver">3.2 freeTDS to Microsoft SQL Server</h4>

<p>Use <code>vi</code> or <code>nano</code> to edit <code>/usr/local/etc/freetds.conf</code>, adding this section at the end of file:</p>

<pre><code class="c">[MSSQL]
#REPLACE WITH YOUR MSSQL SERVER IPv4 ADDRESS
host = 192.168.1.100

#REPLACE WITH YOUR MSSQL SERVER LISTENING PORT
port = 1433

tds version = 8.0  
client charset = UTF-8  
</code></pre>

<h4 id="33confirmfreetdsconfiguration">3.3 Confirm freeTDS Configuration</h4>

<p>You can test the connectivity between freeTDS and SQL Server using this command:  </p>

<pre><code class="c">#tsql -S MSSQL -U username -P password
</code></pre>

<p>If your settings were correct, you will see a reponse like this:</p>

<p><img src='http://blog.mikotek.com.tw/content/images/2014/May/tsql.png'  alt="tsql" /></p>

<p>Type <code>exit</code> to leave.</p>

<h4 id="34unixodbctofreetds">3.4 unixODBC to freeTDS</h4>

<h5 id="341odbcinstini">3.4.1 odbcinst.ini</h5>

<p>Use <code>vi</code> or <code>nano</code> to edit <code>/etc/odbcinst.ini</code>.</p>

<ul>
<li><p>There are default <code>PostgreSQL</code> and <code>MySQL</code> settings. We will not use these database, you can mark them as unused.</p></li>
<li><p>Adding this section at the end of file:</p></li>
</ul>

<pre><code class="c">[FreeTDS]
Description=ODBC for SQL Server  
Driver=/usr/local/lib/libtdsodbc.so  
UsageCount=1  
</code></pre>

<h5 id="342odbcini">3.4.2 odbc.ini</h5>

<p>Use <code>vi</code> or <code>nano</code> to edit <code>/etc/odbc.ini</code>, adding this section at the end of file:</p>

<pre><code class="c">[MSODBC]
Driver=FreeTDS  
Description=Mikotek SQL Server  
Trace=No

#REPLACE WITH YOUR MSSQL SERVER IPv4 ADDRESS
Server= 192.168.1.100

#REPLACE WITH YOUR LDAP DATABASE NAME
Database= LDAP

#REPLACE WITH YOUR MSSQL SERVER LISTENING PORT
Port=1433

TDS_Version = 8.0  
Charset = UTF-8  
</code></pre>

<h4 id="35confirmunixodbcconfiguration">3.5 Confirm unixODBC Configuration</h4>

<p>You can test the connectivity between unixODBC and SQL Server using this command:  </p>

<pre><code class="c">#isql -v MSODBC username password
</code></pre>

<p>If your settings were correct, you will see a reponse like this:</p>

<p><img src='http://blog.mikotek.com.tw/content/images/2014/May/isql.png'  alt="isql" /></p>

<p>Type <code>quit</code> to leave。</p>

<p><a name="Setting Up OpenLDAP"></a></p>

<h3 id="4settingupopenldap">4. Setting Up OpenLDAP</h3>

<h4 id="41generateasecurepassword">4.1 Generate a Secure Password</h4>

<p>In later section, we will set up an OpenLDAP administrator and an administrative password.  OpenLDAP supports <code>plaintext</code> password, and an encrypted password like <code>MD5</code>, <code>SHA</code>, <code>CRYPT</code> is supported too.</p>

<p>We are going to use <code>CRYPT</code> password this time, you can generate a secure password by <code>slappasswd -h {crypt}</code>:  </p>

<pre><code class="c">#slappasswd -h {crypt}
New password:  
Re-enter new password:  
{CRYPT}4kXX4T1wXj3Zc
</code></pre>

<p>The <code>{CRYPT}4kXX4T1wXj3Zc</code> is the encrypted password. Copy it, we will need it later.</p>

<h4 id="42copyslapdconffromopenldaptemplate">4.2 Copy slapd.conf from OpenLDAP Template</h4>

<pre><code class="c">#cp /usr/share/openldap-servers/slapd.conf.obsolete /etc/openldap/slapd.conf
</code></pre>

<h4 id="43removeandbackupdefaultbdbdatabase">4.3 Remove and Backup Default BDB Database</h4>

<pre><code class="c">#mv /etc/openldap/slapd.d /etc/openldap/slapd.d.bak
</code></pre>

<h4 id="44slapdconfconfiguration">4.4 slapd.conf Configuration</h4>

<p>Use <code>vi</code> or <code>nano</code> to edit <code>/etc/openldap/slapd.conf</code>.</p>

<h5 id="441sectioninclude">4.4.1 Section: include</h5>

<p>We will need only the following LDAP schemas in this practice:  </p>

<pre><code class="c">include    /etc/openldap/schema/core.schema  
include    /etc/openldap/schema/cosine.schema  
include    /etc/openldap/schema/inetorgperson.schema  
</code></pre>

<p>You can mark other schemas as unused.</p>

<h5 id="442sectionmodule">4.4.2 Section: module</h5>

<p>We are using <code>64-bit</code> system, and use only <code>back_sql</code> module, you can mark other modules as unused.</p>

<pre><code class="c">modulepath /usr/lib64/openldap  
moduleload back_sql.la  
</code></pre>

<h5 id="443sectiontlscertificateconfiguration">4.4.3 Section: TLS Certificate Configuration</h5>

<p>OpenLDAP supports SSL connection, you can set up TLS configuration in this section.</p>

<p>However, we DO NOT include the know-how of SSL setup in this practice.  <strong>You can mark the TLS section as unused for now</strong>.  If you were interested in OpenLDAP SSL configuration, you may find some useful hint in this document: <a href='http://www.zarafa.com/wiki/index.php/Configure_OpenLDAP_with_SSL/TLS' "target="_blank">Configure OpenLDAP with SSL/TLS</a></p>

<h5 id="444sectionaclconfiguration">4.4.4 Section: ACL Configuration</h5>

<h6 id="acl1alowusersviewandchangetheirownpassword">ACL 1: Alow Users view and change their own password</h6>

<pre><code class="sh">access to attrs=userpassword  
    by self write
    by anonymous auth
    by * none
</code></pre>

<h6 id="acl2allowauthenticateduserstoviewlimitanonymoususerstoauth">ACL 2: Allow Authenticated Users to View, Limit Anonymous Users to Auth</h6>

<pre><code class="sh">access to *  
    by self write
    by users read
    by anonymous auth
    by * none
</code></pre>

<h5 id="445sectiondatabasedefinitions">4.4.5 Section: Database Definitions</h5>

<p>There is a default BDB database definition in template config file.  We are going to set up a SQL database, so mark whole default BDB database section as unused.</p>

<p>Adding our SQL database definition at the end of file:  </p>

<pre><code class="c">###################################################
# sql database definitions
###################################################

database        sql  
suffix          "dc=example,dc=com"  
rootdn          "cn=Manager,dc=example,dc=com"

#REPLACE WITH YOUR SECURE PASSWORD
rootpw          {CRYPT}4kXX4T1wXj3Zc

#ODBC DATASOURCE NAME
dbname          MSODBC

#REPLACE WITH YOUR MSSQL LDAP DATABASE USER
dbuser          username

#REPLACE WITH YOUR MSSQL LDAP DATABASE USER PASSWORD
dbpasswd        password

subtree_cond    "ldap_entries.dn LIKE '%'+?"

has_ldapinfo_dn_ru      no  
###################################################
</code></pre>

<h4 id="45ldapconfconfiguration">4.5 ldap.conf Configuration</h4>

<p>Use <code>vi</code> or <code>nano</code> to edit <code>/etc/openldap/ldap.conf</code>.</p>

<p>Define LDAP base, and set the LDAP uri according to your environment:  </p>

<pre><code class="ruby">BASE    dc=example,dc=com  
URI    ldap://ldap.example.com  
</code></pre>

<p><a name="Verify OpenLDAP Configurations"></a></p>

<h3 id="5verifyopenldapconfigurations">5. Verify OpenLDAP Configurations</h3>

<h4 id="51openldapconfigtesting">5.1 OpenLDAP Config Testing</h4>

<p>You can verify your config file using this command:  </p>

<pre><code class="c">#slaptest -u
</code></pre>

<p>If your settings were correct, you will see a reponse like this:  </p>

<pre><code>config file testing succeeded  
</code></pre>

<h4 id="52launchtheslapdaemon">5.2 Launch the Slap Daemon</h4>

<pre><code class="c">#service slapd start
</code></pre>

<h4 id="53testconnectivityanddatawithldapclient">5.3 Test Connectivity and Data with LDAP client</h4>

<p>You can perform a LDAP search by <code>ldapsearch</code>, using this command to verify LDAP working functionally:  </p>

<pre><code class="c">#ldapsearch -x -D cn=Manager,dc=example,dc=com -w YOUR_LDAP_ROOTPW -b dc=example,dc=com
</code></pre>

<blockquote>
  <p>REPLACE <code>YOUR_LDAP_ROOTPW</code> with your definition</p>
</blockquote>

<p>If your settings were correct, you will see a reponse like this:  </p>

<pre><code class="c"># extended LDIF
#
# LDAPv3
# base &lt;dc=example,dc=com&gt; with scope subtree
# filter: sn=Kovalev
# requesting: ALL
#

# Mitya Kovalev, example.com
dn: cn=Mitya Kovalev,dc=example,dc=com  
objectClass: inetOrgPerson  
cn: Mitya Kovalev  
sn: Kovalev  
seeAlso: documentTitle=book1,dc=example,dc=com  
seeAlso: documentTitle=book2,dc=example,dc=com  
givenName: Mitya  
userPassword:: bWl0  
telephoneNumber: 222-3234  
telephoneNumber: 332-2334

# search result
search: 2  
result: 0 Success

# numResponses: 2
# numEntries: 1
</code></pre>

<p><a name="Misc"></a></p>

<h3 id="6misc">6. Misc.</h3>

<h4 id="61automaticlaunchopenldapserviceonsystemboot">6.1 Automatic Launch OpenLDAP service on system boot</h4>

<pre><code class="c">#chkconfig --add ldap
#chkconfig ldap on
</code></pre>

<p><a name="Further Readings"></a></p>

<h3 id="7furtherreadings">7. Further Readings</h3>

<p>For now, you are successfully integrate OpenLDAP with backend Microsoft SQL Server.</p>

<p>If you were interested in LDAP data design and metadata planning, you may find some useful information in these websites:</p>

<ul>
<li><a href='http://www.flatmtn.com/article/setting-ldap-back-sql' "target="_blank">Setting up LDAP with back-sql</a> - Flat Mountain</li>
<li><a href='http://www.wingfoss.com/content/sample-mysql-for-openldap-back-sql' "target="_blank">Sample MySQL schema for OpenLDAP with back-sql</a> - WingFOSS</li>
<li><a href='http://oav.net/mirrors/LDAP-ObjectClasses.html' "target="_blank">Common LDAP schemas</a> - oav.net</li>
</ul>]]></description><link>http://blog.mikotek.com.tw/2014/05/31/openldap-with-microsoft-sql-server-backend-database-on-centos-3/</link><guid isPermaLink="false">3d1e34f0-f966-48db-8cc2-209d43aa4cbc</guid><category><![CDATA[Know How]]></category><dc:creator><![CDATA[test10]]></dc:creator><pubDate>Sat, 31 May 2014 14:43:44 GMT</pubDate></item><item><title><![CDATA[IE瀏覽器出現重大安全漏洞]]></title><description><![CDATA[<p><img src='http://blog.mikotek.com.tw/content/images/2014/May/internet_explorer.png'  alt="INTERNET EXPLORER" /></p>

<h4 id="microsoftinternetexplorerie">微軟 MICROSOFT 知名瀏覽器 INTERNET EXPLORER (IE) 驚爆重大安全漏洞，</h4>

<h4 id="">美國及英國政府資安當局罕見地聯手呼籲民眾應立即停用該瀏覽器。</h4>

<p>率先發現這個資安漏洞的資安公司 FireEye 指出，駭客可經由 IE 的安全漏洞銜接 Flash 技術進行零時差攻擊(zero-day exploit)，雖然目前僅發現駭客利用 IE9、IE10 及 IE11 對美國國防及金融機構進行零時攻擊，然而這個安全漏洞自 IE6 版以上就已存在。</p>

<p>根據<a href='http://www.cnet.com/news/stop-using-ie-until-bug-is-fixed-says-us/' "target="_blank">《CNET》報導</a>，美國國家安全部轄下的電腦緊急應變小組 (US-CERT) 及英國政府對等單位雖然定期會發布網路瀏覽器安全性建議，但像這次聯手呼籲民眾停用特定瀏覽器，則非常罕見。</p>

<p>一般民眾要怎麼自我保護?  永磐科技提供您下列兩種建議：</p>

<ol>
<li><p>於微軟修復該漏洞前，暫時停用 Internet Explorer 瀏覽器</p></li>
<li><p>若因為種種原因，非得使用 Internet Explorer 瀏覽器不可，你可以選擇：</p>

<ul><li><p>停用 IE 的 Flash 外掛程式</p></li>
<li><p>安裝微軟 <a href='http://technet.microsoft.com/zh-tw/security/jj653751' "target="_blank">EMET (Enhanced Mitigation Experience Toolkit)</a> 安全防禦應用程式，並於 IE 中啟用</p></li></ul></li>
</ol>]]></description><link>http://blog.mikotek.com.tw/2014/04/29/ie_vulnerability/</link><guid isPermaLink="false">d982faa6-0321-4597-83cb-c8ed78c0eff5</guid><category><![CDATA[Information]]></category><category><![CDATA[Security]]></category><dc:creator><![CDATA[test10]]></dc:creator><pubDate>Tue, 29 Apr 2014 04:00:00 GMT</pubDate></item><item><title><![CDATA[IE瀏覽器出現重大安全漏洞]]></title><description><![CDATA[<p><img src='http://blog.mikotek.com.tw/content/images/2014/May/internet_explorer.png'  alt="INTERNET EXPLORER" /></p>

<h4 id="microsoftinternetexplorerie">微軟 MICROSOFT 知名瀏覽器 INTERNET EXPLORER (IE) 驚爆重大安全漏洞，</h4>

<h4 id="">美國及英國政府資安當局罕見地聯手呼籲民眾應立即停用該瀏覽器。</h4>

<p>率先發現這個資安漏洞的資安公司 FireEye 指出，駭客可經由 IE 的安全漏洞銜接 Flash 技術進行零時差攻擊(zero-day exploit)，雖然目前僅發現駭客利用 IE9、IE10 及 IE11 對美國國防及金融機構進行零時攻擊，然而這個安全漏洞自 IE6 版以上就已存在。</p>

<p>根據<a href='http://www.cnet.com/news/stop-using-ie-until-bug-is-fixed-says-us/' "target="_blank">《CNET》報導</a>，美國國家安全部轄下的電腦緊急應變小組 (US-CERT) 及英國政府對等單位雖然定期會發布網路瀏覽器安全性建議，但像這次聯手呼籲民眾停用特定瀏覽器，則非常罕見。</p>

<p>一般民眾要怎麼自我保護?  永磐科技提供您下列兩種建議：</p>

<ol>
<li><p>於微軟修復該漏洞前，暫時停用 Internet Explorer 瀏覽器</p></li>
<li><p>若因為種種原因，非得使用 Internet Explorer 瀏覽器不可，你可以選擇：</p>

<ul><li><p>停用 IE 的 Flash 外掛程式</p></li>
<li><p>安裝微軟 <a href='http://technet.microsoft.com/zh-tw/security/jj653751' "target="_blank">EMET (Enhanced Mitigation Experience Toolkit)</a> 安全防禦應用程式，並於 IE 中啟用</p></li></ul></li>
</ol>]]></description><link>http://blog.mikotek.com.tw/2014/04/29/ie_vulnerability-2/</link><guid isPermaLink="false">d982faa6-0321-4597-83cb-c8ed78c0eff5</guid><category><![CDATA[Information]]></category><category><![CDATA[Security]]></category><dc:creator><![CDATA[test10]]></dc:creator><pubDate>Tue, 29 Apr 2014 04:00:00 GMT</pubDate></item><item><title><![CDATA[IE瀏覽器出現重大安全漏洞]]></title><description><![CDATA[<p><img src='http://blog.mikotek.com.tw/content/images/2014/May/internet_explorer.png'  alt="INTERNET EXPLORER" /></p>

<h4 id="microsoftinternetexplorerie">微軟 MICROSOFT 知名瀏覽器 INTERNET EXPLORER (IE) 驚爆重大安全漏洞，</h4>

<h4 id="">美國及英國政府資安當局罕見地聯手呼籲民眾應立即停用該瀏覽器。</h4>

<p>率先發現這個資安漏洞的資安公司 FireEye 指出，駭客可經由 IE 的安全漏洞銜接 Flash 技術進行零時差攻擊(zero-day exploit)，雖然目前僅發現駭客利用 IE9、IE10 及 IE11 對美國國防及金融機構進行零時攻擊，然而這個安全漏洞自 IE6 版以上就已存在。</p>

<p>根據<a href='http://www.cnet.com/news/stop-using-ie-until-bug-is-fixed-says-us/' "target="_blank">《CNET》報導</a>，美國國家安全部轄下的電腦緊急應變小組 (US-CERT) 及英國政府對等單位雖然定期會發布網路瀏覽器安全性建議，但像這次聯手呼籲民眾停用特定瀏覽器，則非常罕見。</p>

<p>一般民眾要怎麼自我保護?  永磐科技提供您下列兩種建議：</p>

<ol>
<li><p>於微軟修復該漏洞前，暫時停用 Internet Explorer 瀏覽器</p></li>
<li><p>若因為種種原因，非得使用 Internet Explorer 瀏覽器不可，你可以選擇：</p>

<ul><li><p>停用 IE 的 Flash 外掛程式</p></li>
<li><p>安裝微軟 <a href='http://technet.microsoft.com/zh-tw/security/jj653751' "target="_blank">EMET (Enhanced Mitigation Experience Toolkit)</a> 安全防禦應用程式，並於 IE 中啟用</p></li></ul></li>
</ol>]]></description><link>http://blog.mikotek.com.tw/2014/04/29/ie_vulnerability-2-2/</link><guid isPermaLink="false">d982faa6-0321-4597-83cb-c8ed78c0eff5</guid><category><![CDATA[Information]]></category><category><![CDATA[Security]]></category><dc:creator><![CDATA[test10]]></dc:creator><pubDate>Tue, 29 Apr 2014 04:00:00 GMT</pubDate></item><item><title><![CDATA[IE瀏覽器出現重大安全漏洞]]></title><description><![CDATA[<p><img src='http://blog.mikotek.com.tw/content/images/2014/May/internet_explorer.png'  alt="INTERNET EXPLORER" /></p>

<h4 id="microsoftinternetexplorerie">微軟 MICROSOFT 知名瀏覽器 INTERNET EXPLORER (IE) 驚爆重大安全漏洞，</h4>

<h4 id="">美國及英國政府資安當局罕見地聯手呼籲民眾應立即停用該瀏覽器。</h4>

<p>率先發現這個資安漏洞的資安公司 FireEye 指出，駭客可經由 IE 的安全漏洞銜接 Flash 技術進行零時差攻擊(zero-day exploit)，雖然目前僅發現駭客利用 IE9、IE10 及 IE11 對美國國防及金融機構進行零時攻擊，然而這個安全漏洞自 IE6 版以上就已存在。</p>

<p>根據<a href='http://www.cnet.com/news/stop-using-ie-until-bug-is-fixed-says-us/' "target="_blank">《CNET》報導</a>，美國國家安全部轄下的電腦緊急應變小組 (US-CERT) 及英國政府對等單位雖然定期會發布網路瀏覽器安全性建議，但像這次聯手呼籲民眾停用特定瀏覽器，則非常罕見。</p>

<p>一般民眾要怎麼自我保護?  永磐科技提供您下列兩種建議：</p>

<ol>
<li><p>於微軟修復該漏洞前，暫時停用 Internet Explorer 瀏覽器</p></li>
<li><p>若因為種種原因，非得使用 Internet Explorer 瀏覽器不可，你可以選擇：</p>

<ul><li><p>停用 IE 的 Flash 外掛程式</p></li>
<li><p>安裝微軟 <a href='http://technet.microsoft.com/zh-tw/security/jj653751' "target="_blank">EMET (Enhanced Mitigation Experience Toolkit)</a> 安全防禦應用程式，並於 IE 中啟用</p></li></ul></li>
</ol>]]></description><link>http://blog.mikotek.com.tw/2014/04/29/ie_vulnerability-3/</link><guid isPermaLink="false">d982faa6-0321-4597-83cb-c8ed78c0eff5</guid><category><![CDATA[Information]]></category><category><![CDATA[Security]]></category><dc:creator><![CDATA[test10]]></dc:creator><pubDate>Tue, 29 Apr 2014 04:00:00 GMT</pubDate></item><item><title><![CDATA[OPENSSL憑證發現重大資訊安全漏洞]]></title><description><![CDATA[<p><img src='http://blog.mikotek.com.tw/content/images/2014/May/heartbleed.png'  alt="Heartbleed" /></p>

<h4 id="201447openssl">2014年4月7日 OPENSSL 發布了一個重大資安漏洞發現</h4>

<h4 id="cve20140160httpwebnvdnistgovviewvulndetailvulnidcve20140160target_blankheartbleed">弱點編號：<a href='http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2014-0160' "target="_blank">CVE-2014-0160</a>，代號「HEARTBLEED」。</h4>

<p>OpenSSL針對此弱點說明如下：</p>

<blockquote>
  <p>OpenSSL Security Advisory [07 Apr 2014]<br/> ========================================  <br/><br/>TLS heartbeat read overrun (CVE-2014-0160)<br/> ==========================================  <br/>A missing bounds check in the handling of the TLS heartbeat extension can be used to reveal up to 64k of memory to a connected client or server. <br/><br/> Only 1.0.1 and 1.0.2-beta releases of OpenSSL are affected including 1.0.1f and 1.0.2-beta1.  <br/><br/>Thanks for Neel Mehta of Google Security for discovering this bug and to Adam Langley <a href='http://blog.mikotek.com.tw/&' #x6d;&#x61;&#x69;&#108;&#116;&#111;:&#x61;&#103;&#108;&#x40;&#x63;&#104;&#x72;&#111;m&#x69;&#117;&#109;&#46;&#x6f;&#114;&#103;">&#x61;&#103;&#108;&#x40;&#x63;&#104;&#x72;&#111;m&#x69;&#117;&#109;&#46;&#x6f;&#114;&#103;</a> and Bodo Moeller <a href='http://blog.mikotek.com.tw/&' #109;&#97;&#x69;&#108;&#x74;&#x6f;:&#98;&#x6d;&#111;&#x65;&#x6c;&#108;&#x65;&#114;&#64;&#97;&#x63;m.&#x6f;&#114;&#x67;">&#98;&#x6d;&#111;&#x65;&#x6c;&#108;&#x65;&#114;&#64;&#97;&#x63;m.&#x6f;&#114;&#x67;</a> for preparing the fix.  <br/><br/>Affected users should upgrade to OpenSSL 1.0.1g. Users unable to immediately upgrade can alternatively recompile OpenSSL with -DOPENSSL<em>NO</em>HEARTBEATS.  <br/><br/>1.0.2 will be fixed in 1.0.2-beta2.</p>
</blockquote>

<p>這個漏洞能讓攻擊者從伺服器記憶體中讀取 64 KB 的資料，被竊取的資料可能包含 ssl private key、session cookie、使用者密碼等，因此最嚴重可能因此導致伺服器遭到入侵或被盜取使用者帳號、密碼。</p>

<p>由於OpenSSL憑證加解密被廣泛應用於網站及應用服務，大多數安全需求性較高的網路服務，諸如：網路銀行、線上交易、會員系統等都採用OpenSSL HTTPS加密。因此該漏洞將導致全球使用OpenSSL的線上金融服務面臨重大衝擊。</p>

<p>受影響的OpenSSL版本為 1.0.1 ~ 1.0.1f 及 1.0.2-beta，目前OpenSSL已發布對應的修復更新版本 1.0.1g 、1.0.2-beta1。</p>

<h5 id="opensslheartbleedtesthttpfilippoioheartbleedtarget_blank">採用OpenSSL加密的企業可透過 <a href='http://filippo.io/Heartbleed/' "target="_blank">Heartbleed test</a> 網站自我檢測內部的系統是否有受到影響</h5>

<h5 id="openssl">若有受到影響請務必立即更新OpenSSL版本！</h5>

<blockquote>
  <p>更多關於Heartbleed漏洞可參考 <a href='http://heartbleed.com/' "target="_blank">http://heartbleed.com</a></p>
</blockquote>]]></description><link>http://blog.mikotek.com.tw/2014/04/09/openssl-cve-2014-0160/</link><guid isPermaLink="false">672621e3-750a-4a92-be67-2c6f5c899634</guid><category><![CDATA[Security]]></category><category><![CDATA[Information]]></category><dc:creator><![CDATA[test10]]></dc:creator><pubDate>Wed, 09 Apr 2014 04:00:00 GMT</pubDate></item><item><title><![CDATA[OPENSSL憑證發現重大資訊安全漏洞]]></title><description><![CDATA[<p><img src='http://blog.mikotek.com.tw/content/images/2014/May/heartbleed.png'  alt="Heartbleed" /></p>

<h4 id="201447openssl">2014年4月7日 OPENSSL 發布了一個重大資安漏洞發現</h4>

<h4 id="cve20140160httpwebnvdnistgovviewvulndetailvulnidcve20140160target_blankheartbleed">弱點編號：<a href='http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2014-0160' "target="_blank">CVE-2014-0160</a>，代號「HEARTBLEED」。</h4>

<p>OpenSSL針對此弱點說明如下：</p>

<blockquote>
  <p>OpenSSL Security Advisory [07 Apr 2014]<br/> ========================================  <br/><br/>TLS heartbeat read overrun (CVE-2014-0160)<br/> ==========================================  <br/>A missing bounds check in the handling of the TLS heartbeat extension can be used to reveal up to 64k of memory to a connected client or server. <br/><br/> Only 1.0.1 and 1.0.2-beta releases of OpenSSL are affected including 1.0.1f and 1.0.2-beta1.  <br/><br/>Thanks for Neel Mehta of Google Security for discovering this bug and to Adam Langley <a href='http://blog.mikotek.com.tw/&' #x6d;&#97;&#105;&#x6c;&#116;&#111;:&#x61;&#103;l&#x40;&#99;&#x68;&#x72;&#x6f;&#109;&#105;&#x75;m&#x2e;&#111;&#114;&#103;">&#x61;&#103;l&#x40;&#99;&#x68;&#x72;&#x6f;&#109;&#105;&#x75;m&#x2e;&#111;&#114;&#103;</a> and Bodo Moeller <a href='http://blog.mikotek.com.tw/&' #109;&#97;&#105;l&#116;&#x6f;:&#98;&#x6d;&#x6f;&#x65;&#x6c;&#x6c;&#x65;&#114;&#64;&#97;&#x63;&#x6d;&#46;&#111;&#x72;&#103;">&#98;&#x6d;&#x6f;&#x65;&#x6c;&#x6c;&#x65;&#114;&#64;&#97;&#x63;&#x6d;&#46;&#111;&#x72;&#103;</a> for preparing the fix.  <br/><br/>Affected users should upgrade to OpenSSL 1.0.1g. Users unable to immediately upgrade can alternatively recompile OpenSSL with -DOPENSSL<em>NO</em>HEARTBEATS.  <br/><br/>1.0.2 will be fixed in 1.0.2-beta2.</p>
</blockquote>

<p>這個漏洞能讓攻擊者從伺服器記憶體中讀取 64 KB 的資料，被竊取的資料可能包含 ssl private key、session cookie、使用者密碼等，因此最嚴重可能因此導致伺服器遭到入侵或被盜取使用者帳號、密碼。</p>

<p>由於OpenSSL憑證加解密被廣泛應用於網站及應用服務，大多數安全需求性較高的網路服務，諸如：網路銀行、線上交易、會員系統等都採用OpenSSL HTTPS加密。因此該漏洞將導致全球使用OpenSSL的線上金融服務面臨重大衝擊。</p>

<p>受影響的OpenSSL版本為 1.0.1 ~ 1.0.1f 及 1.0.2-beta，目前OpenSSL已發布對應的修復更新版本 1.0.1g 、1.0.2-beta1。</p>

<h5 id="opensslheartbleedtesthttpfilippoioheartbleedtarget_blank">採用OpenSSL加密的企業可透過 <a href='http://filippo.io/Heartbleed/' "target="_blank">Heartbleed test</a> 網站自我檢測內部的系統是否有受到影響</h5>

<h5 id="openssl">若有受到影響請務必立即更新OpenSSL版本！</h5>

<blockquote>
  <p>更多關於Heartbleed漏洞可參考 <a href='http://heartbleed.com/' "target="_blank">http://heartbleed.com</a></p>
</blockquote>]]></description><link>http://blog.mikotek.com.tw/2014/04/09/openssl-cve-2014-0160-2/</link><guid isPermaLink="false">672621e3-750a-4a92-be67-2c6f5c899634</guid><category><![CDATA[Information]]></category><category><![CDATA[Security]]></category><dc:creator><![CDATA[test10]]></dc:creator><pubDate>Wed, 09 Apr 2014 04:00:00 GMT</pubDate></item><item><title><![CDATA[OPENSSL憑證發現重大資訊安全漏洞]]></title><description><![CDATA[<p><img src='http://blog.mikotek.com.tw/content/images/2014/May/heartbleed.png'  alt="Heartbleed" /></p>

<h4 id="201447openssl">2014年4月7日 OPENSSL 發布了一個重大資安漏洞發現</h4>

<h4 id="cve20140160httpwebnvdnistgovviewvulndetailvulnidcve20140160target_blankheartbleed">弱點編號：<a href='http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2014-0160' "target="_blank">CVE-2014-0160</a>，代號「HEARTBLEED」。</h4>

<p>OpenSSL針對此弱點說明如下：</p>

<blockquote>
  <p>OpenSSL Security Advisory [07 Apr 2014]<br/> ========================================  <br/><br/>TLS heartbeat read overrun (CVE-2014-0160)<br/> ==========================================  <br/>A missing bounds check in the handling of the TLS heartbeat extension can be used to reveal up to 64k of memory to a connected client or server. <br/><br/> Only 1.0.1 and 1.0.2-beta releases of OpenSSL are affected including 1.0.1f and 1.0.2-beta1.  <br/><br/>Thanks for Neel Mehta of Google Security for discovering this bug and to Adam Langley <a href='http://blog.mikotek.com.tw/&' #109;&#97;&#105;&#x6c;t&#x6f;:&#x61;&#103;&#x6c;&#64;&#x63;&#x68;&#114;&#x6f;m&#x69;&#x75;&#x6d;&#x2e;&#x6f;&#114;&#103;">&#x61;&#103;&#x6c;&#64;&#x63;&#x68;&#114;&#x6f;m&#x69;&#x75;&#x6d;&#x2e;&#x6f;&#114;&#103;</a> and Bodo Moeller <a href='http://blog.mikotek.com.tw/&' #109;&#97;&#105;&#x6c;&#x74;&#x6f;:&#x62;&#109;&#x6f;&#101;&#x6c;&#x6c;&#x65;&#114;&#64;&#97;&#x63;&#109;&#x2e;&#111;&#114;&#103;">&#x62;&#109;&#x6f;&#101;&#x6c;&#x6c;&#x65;&#114;&#64;&#97;&#x63;&#109;&#x2e;&#111;&#114;&#103;</a> for preparing the fix.  <br/><br/>Affected users should upgrade to OpenSSL 1.0.1g. Users unable to immediately upgrade can alternatively recompile OpenSSL with -DOPENSSL<em>NO</em>HEARTBEATS.  <br/><br/>1.0.2 will be fixed in 1.0.2-beta2.</p>
</blockquote>

<p>這個漏洞能讓攻擊者從伺服器記憶體中讀取 64 KB 的資料，被竊取的資料可能包含 ssl private key、session cookie、使用者密碼等，因此最嚴重可能因此導致伺服器遭到入侵或被盜取使用者帳號、密碼。</p>

<p>由於OpenSSL憑證加解密被廣泛應用於網站及應用服務，大多數安全需求性較高的網路服務，諸如：網路銀行、線上交易、會員系統等都採用OpenSSL HTTPS加密。因此該漏洞將導致全球使用OpenSSL的線上金融服務面臨重大衝擊。</p>

<p>受影響的OpenSSL版本為 1.0.1 ~ 1.0.1f 及 1.0.2-beta，目前OpenSSL已發布對應的修復更新版本 1.0.1g 、1.0.2-beta1。</p>

<h5 id="opensslheartbleedtesthttpfilippoioheartbleedtarget_blank">採用OpenSSL加密的企業可透過 <a href='http://filippo.io/Heartbleed/' "target="_blank">Heartbleed test</a> 網站自我檢測內部的系統是否有受到影響</h5>

<h5 id="openssl">若有受到影響請務必立即更新OpenSSL版本！</h5>

<blockquote>
  <p>更多關於Heartbleed漏洞可參考 <a href='http://heartbleed.com/' "target="_blank">http://heartbleed.com</a></p>
</blockquote>]]></description><link>http://blog.mikotek.com.tw/2014/04/09/openssl-cve-2014-0160-2-2/</link><guid isPermaLink="false">672621e3-750a-4a92-be67-2c6f5c899634</guid><category><![CDATA[Information]]></category><category><![CDATA[Security]]></category><dc:creator><![CDATA[test10]]></dc:creator><pubDate>Wed, 09 Apr 2014 04:00:00 GMT</pubDate></item><item><title><![CDATA[OPENSSL憑證發現重大資訊安全漏洞]]></title><description><![CDATA[<p><img src='http://blog.mikotek.com.tw/content/images/2014/May/heartbleed.png'  alt="Heartbleed" /></p>

<h4 id="201447openssl">2014年4月7日 OPENSSL 發布了一個重大資安漏洞發現</h4>

<h4 id="cve20140160httpwebnvdnistgovviewvulndetailvulnidcve20140160target_blankheartbleed">弱點編號：<a href='http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2014-0160' "target="_blank">CVE-2014-0160</a>，代號「HEARTBLEED」。</h4>

<p>OpenSSL針對此弱點說明如下：</p>

<blockquote>
  <p>OpenSSL Security Advisory [07 Apr 2014]<br/> ========================================  <br/><br/>TLS heartbeat read overrun (CVE-2014-0160)<br/> ==========================================  <br/>A missing bounds check in the handling of the TLS heartbeat extension can be used to reveal up to 64k of memory to a connected client or server. <br/><br/> Only 1.0.1 and 1.0.2-beta releases of OpenSSL are affected including 1.0.1f and 1.0.2-beta1.  <br/><br/>Thanks for Neel Mehta of Google Security for discovering this bug and to Adam Langley <a href='http://blog.mikotek.com.tw/&' #x6d;&#x61;&#x69;&#108;&#x74;&#x6f;:&#x61;&#103;&#108;&#x40;&#99;&#x68;&#114;&#x6f;&#x6d;&#105;u&#109;&#46;&#x6f;&#114;&#103;">&#x61;&#103;&#108;&#x40;&#99;&#x68;&#114;&#x6f;&#x6d;&#105;u&#109;&#46;&#x6f;&#114;&#103;</a> and Bodo Moeller <a href='http://blog.mikotek.com.tw/&' #109;&#97;i&#x6c;&#x74;&#x6f;:&#x62;m&#x6f;&#101;&#x6c;&#108;&#x65;&#x72;&#64;a&#99;&#x6d;&#46;o&#114;&#x67;">&#x62;m&#x6f;&#101;&#x6c;&#108;&#x65;&#x72;&#64;a&#99;&#x6d;&#46;o&#114;&#x67;</a> for preparing the fix.  <br/><br/>Affected users should upgrade to OpenSSL 1.0.1g. Users unable to immediately upgrade can alternatively recompile OpenSSL with -DOPENSSL<em>NO</em>HEARTBEATS.  <br/><br/>1.0.2 will be fixed in 1.0.2-beta2.</p>
</blockquote>

<p>這個漏洞能讓攻擊者從伺服器記憶體中讀取 64 KB 的資料，被竊取的資料可能包含 ssl private key、session cookie、使用者密碼等，因此最嚴重可能因此導致伺服器遭到入侵或被盜取使用者帳號、密碼。</p>

<p>由於OpenSSL憑證加解密被廣泛應用於網站及應用服務，大多數安全需求性較高的網路服務，諸如：網路銀行、線上交易、會員系統等都採用OpenSSL HTTPS加密。因此該漏洞將導致全球使用OpenSSL的線上金融服務面臨重大衝擊。</p>

<p>受影響的OpenSSL版本為 1.0.1 ~ 1.0.1f 及 1.0.2-beta，目前OpenSSL已發布對應的修復更新版本 1.0.1g 、1.0.2-beta1。</p>

<h5 id="opensslheartbleedtesthttpfilippoioheartbleedtarget_blank">採用OpenSSL加密的企業可透過 <a href='http://filippo.io/Heartbleed/' "target="_blank">Heartbleed test</a> 網站自我檢測內部的系統是否有受到影響</h5>

<h5 id="openssl">若有受到影響請務必立即更新OpenSSL版本！</h5>

<blockquote>
  <p>更多關於Heartbleed漏洞可參考 <a href='http://heartbleed.com/' "target="_blank">http://heartbleed.com</a></p>
</blockquote>]]></description><link>http://blog.mikotek.com.tw/2014/04/09/openssl-cve-2014-0160-3/</link><guid isPermaLink="false">672621e3-750a-4a92-be67-2c6f5c899634</guid><category><![CDATA[Information]]></category><category><![CDATA[Security]]></category><dc:creator><![CDATA[test10]]></dc:creator><pubDate>Wed, 09 Apr 2014 04:00:00 GMT</pubDate></item><item><title><![CDATA[CISCO MERAKI無線網路解決方案及無線網路產品更新]]></title><description><![CDATA[<p><img src='http://blog.mikotek.com.tw/content/images/2014/May/Cisco-Cloud-Networking-Meraki.jpg'  alt="Cisco Meraki" /></p>

<h6 id="authorjerrychenmailtojerry_chenmikotekcomtw">Author: <a href='mailto:jerry_chen@mikotek.com.tw' >Jerry Chen</a></h6>

<p>Cisco最近推出一些新款的無線AP與無線網路解決方案，其中最特殊的是新型態的<strong>雲端無線網路架構：Cisco Meraki</strong>，以下簡單說明：</p>

<h2 id="ciscomeraki">CISCO MERAKI的無線網路解決方案  </h2>

<h4 id="meraki">Meraki 雲端無線網路架構</h4>

<p><img src='http://blog.mikotek.com.tw/content/images/2014/May/meraki_struct1.png'  alt="Meraki Struct1" />
<img src='http://blog.mikotek.com.tw/content/images/2014/May/meraki_struct2.png'  alt="Meraki Struct2" /></p>

<ul>
<li><p>Meraki無線控制器是雲端平臺架構（Cloud-based Wireless Controller）， IT單位可透過網頁瀏覽器進入雲端後臺，集中管理企業所部署的Wi-Fi網路環境，節省控制器佈建成本。</p></li>
<li><p>企業採購時需購買AP設備和控制器軟體授權，其中控制器軟體的授權費用採維護服務方式，以年為單位銷售。</p></li>
<li><p>多據點的無線網路管理。在部署上，管理者可從單一系統管理各分據點的無線網路，管理方式較為簡易。</p></li>
<li><p>即使是雲端服務斷線，Meraki AP本身仍保有網路的功能，無線網路仍可持續運行。唯雲端服務斷線時，不能異動設定及檢視報表。</p></li>
</ul>

<h4 id="apciscomeraki3">除了雲端式AP架構的特性，Cisco Meraki 還有3個特點：</h4>

<p><strong>1. 具有應用程式感知功能，可辨識連線使用者的應用程式特徵</strong></p>

<p>能封鎖特定應用群組或特定應用程式，像是：</p>

<ul>
<li>電子郵件：Gmail、Hotmail、Webmail等）</li>
<li>檔案分享網站：Dropbox、SkyDrive、Box等）</li>
<li>社群網站：Facebook、Flickr、Twitter等）</li>
<li>其他如部落格、P2P、遊戲、新聞、影音、VoIP等</li>
</ul>

<p><strong>2. 提供Facebook Wi-Fi登入功能，使提供的無線網路可以結合Facebook粉絲專頁利用行銷</strong></p>

<p>管理者可將企業的Facebook粉絲專頁，設定為登入無線網路時的起始頁面，讓使用者在打卡後，始可使用企業店家所提供的免費Wi-Fi無線網路。</p>

<pre><code>結合Facebook粉絲專頁打卡機制目前僅有Cisco Meraki無線路由器可支援。
</code></pre>

<p><strong>3. 內建Wi-Fi分析功能，可分析顧客行為</strong></p>

<p>可分析每日上網人數、訪客數與經過人數。另外，還能分析訪客的停留時間，甚至是經常到來或首次來訪數。</p>

<pre><code>Cisco Meraki 以簡單易懂的圖表呈現分析統計具商業價值的資訊。
</code></pre>

<blockquote>
  <ul>
  <li><p>Cisco Meraki 可提供 AP 與 Client 的詳細資訊記錄，管理者可設定每日、每周或每月將報表寄至電子信箱，快速掌握無線網路的使用狀況。</p></li>
  <li><p>整合 Google 地圖資訊於介面中，便於大範圍、大量 AP 部署的管控。
  <img src='http://blog.mikotek.com.tw/content/images/2014/May/meraki_gmap.jpg'  alt="Meraki Google Map" /></p></li>
  </ul>
</blockquote>

<p><br/></p>

<h2 id="meraki">Meraki無線網路路由器產品規格一覽表  </h2>

<table border="1" cellspacing="0" cellpadding="0">  
<tbody>  
<tr>  
<td width="120" align=center><b>產品型號</b></td>  
<td width="120" align=center><b>產品類型</b></td>  
<td width="120" align=center><b>無線網路規範</b></td>  
<td width="120" align=center><b>頻率</b></td>  
<td width="120" align=center><b>天線數</b></td>  
<td width="120" align=center><b>傳輸速度</b></td>  
<td width="120" align=center><b>使用規模</b></td>  
</tr>  
<tr>  
<td width="120" align=center><b>MR12</b></td>  
<td width="120" align=center>室內型</td>  
<td width="120" align=center>802.11b/g/n</td>  
<td width="120" align=center>單頻2.4 GHz</td>  
<td width="120" align=center>2&#215;2</td>  
<td width="120" align=center>300 Mbps</td>  
<td width="120" align=center>15~20人</td>  
</tr>  
<tr>  
<td width="120" align=center><b>MR16</b></td>  
<td width="120" align=center>室內型</td>  
<td width="120" align=center>802.11b/g/n</td>  
<td width="120" align=center>2.4GHz/5GHz</td>  
<td width="120" align=center>2&#215;2</td>  
<td width="120" align=center>600 Mbps</td>  
<td width="120" align=center>35~40人</td>  
</tr>  
<tr>  
<td width="120" align=center><b>MR24</b></td>  
<td width="120" align=center>室內型</td>  
<td width="120" align=center>802.11b/g/n</td>  
<td width="120" align=center>2.4GHz/5GHz</td>  
<td width="120" align=center>3&#215;3</td>  
<td width="120" align=center>900 Mbps</td>  
<td width="120" align=center>55~60人</td>  
</tr>  
<tr>  
<td width="120" align=center><b>MR34</b></td>  
<td width="120" align=center>室內型</td>  
<td width="120" align=center>802.11b/g/n/ac</td>  
<td width="120" align=center>2.4GHz/5GHz</td>  
<td width="120" align=center>3&#215;3</td>  
<td width="120" align=center>1.75 Gbps</td>  
<td width="120" align=center>廠商未提供</td>  
</tr>  
<tr>  
<td width="120" align=center><b>MR62</b></td>  
<td width="120" align=center>室外型</td>  
<td width="120" align=center>802.11b/g/n</td>  
<td width="120" align=center>單頻2.4 GHz</td>  
<td width="120" align=center>2&#215;2</td>  
<td width="120" align=center>300 Mbps</td>  
<td width="120" align=center>25人</td>  
</tr>  
<tr>  
<td width="120" align=center><b>MR66</b></td>  
<td width="120" align=center>室外型</td>  
<td width="120" align=center>802.11b/g/n</td>  
<td width="120" align=center>2.4GHz/5GHz</td>  
<td width="120" align=center>2&#215;2</td>  
<td width="120" align=center>600 Mbps</td>  
<td width="120" align=center>50人</td>  
</tr>  
</tbody>  
</table>

<p><br/></p>

<h2 id="cisco3650switch">CISCO 3650 SWITCH，具無線控制器功能！  </h2>

<p><img src='http://blog.mikotek.com.tw/content/images/2014/May/3650.jpg'  alt="Cisco 3650" /></p>

<p>3650 是取代 3560-X 的產品。3560-X不支援堆疊與無線控制器功能，而<strong>3650可當無線控制器使用，支援25 AP與1000個使用者</strong>。</p>

<ul>
<li><p>Cisco 3650 支援堆疊功能，160G的堆疊頻寛，最多可堆疊9台。</p>

<pre><code>註：Cisco 3650堆疊需另外購買Stack模組
</code></pre></li>
<li><p>現在如果要採購 Cisco 3750-X 或 3560-X，建議可選擇Cisco 3850與 Cisco 3650。</p>

<pre><code>只有必需要使用12或24個光纖介面才建議 Cisco 3750-X，因為 Cisco 3850目前沒有光纖介面的型號。
</code></pre></li>
<li><p>Cisco 3560-X 與 Cisco 3650 的功能比較：</p></li>
</ul>

<p><img src='http://blog.mikotek.com.tw/content/images/2014/May/3560Xvs3650.png'  alt="3650 Compare" /></p>

<p><br/></p>

<h2 id="ciscoap370080211ac">CISCO AP 3700 支援802.11AC  </h2>

<p><img src='http://blog.mikotek.com.tw/content/images/2014/May/ap3700.png'  alt="Cisco AP 3700" /></p>

<p>Cisco推出的最新802.11ac AP，傳輸速度1.3Gbps(Wave1)。</p>

<p>未來可加裝802.11ac(Wave2)模組，傳輸速度可提升到3.5Gbps。</p>

<p>提供內建天線與外接天線二種選擇。</p>

<blockquote>
  <p>Cisco AP 3600加裝 802.11ac(Wave1)的模組也可以支援802.11ac，但成本會比 Cisco AP 3700高。<br/>如果規劃會使用到802.11ac，建議現在就規劃使用 Cisco AP 3700。</p>
</blockquote>

<p><br/></p>

<h2 id="ciscoapcontroller">目前Cisco AP及Controller的版本支援</h2>

<table border="1" cellspacing="0" cellpadding="0">  
<tbody>  
<tr>  
<td align=center width="200"><b>Device</b></td>  
<td align=center width="200"><b>最低支援的版本</b></td>  
<td align=center width="200"><b>最新支援的版本</b></td>  
<td align=center width="200"><b>備註</b></td>  
</tr>  
<tr>  
<td align=center width="200"><b>AP 1020/1030</b></td>  
<td align=center width="200">3.0.X</td>  
<td align=center width="200">4.2.X</td>  
<td align=center width="200">Firmware已不再更新</td>  
</tr>  
<tr>  
<td align=center width="200"><b>AP 1131</b></td>  
<td align=center width="200">3.1.X</td>  
<td align=center width="200">7.6.X</td>  
<td align=center width="200"></td>  
</tr>  
<tr>  
<td align=center width="200"><b>AP 1142</b></td>  
<td align=center width="200">5.2.X</td>  
<td align=center width="200">7.6.X</td>  
<td align=center width="200"></td>  
</tr>  
<tr>  
<td align=center width="200"><b>AP 1602i</b></td>  
<td align=center width="200">7.4.X</td>  
<td align=center width="200">7.6.X</td>  
<td align=center width="200"></td>  
</tr>  
<tr>  
<td align=center width="200"><b>AP 2602i</b></td>  
<td align=center width="200">7.2.X</td>  
<td align=center width="200">7.6.X</td>  
<td align=center width="200"></td>  
</tr>  
<tr>  
<td align=center width="200"><b>WLC 4404</b></td>  
<td align=center width="200">4.2.X</td>  
<td align=center width="200">7.0.X</td>  
<td align=center width="200">Firmware已不再更新</td>  
</tr>  
<tr>  
<td align=center width="200"><b>WLC 5508</b></td>  
<td align=center width="200">6.0.X</td>  
<td align=center width="200">7.6.X</td>  
<td align=center width="200"></td>  
</tr>  
<tr>  
<td align=center width="200"><b>WiSM</b></td>  
<td align=center width="200">3.2.X</td>  
<td align=center width="200">7.0.X</td>  
<td align=center width="200">Firmware已不再更新</td>  
</tr>  
<tr>  
<td align=center width="200"><b>WiSM2</b></td>  
<td align=center width="200">7.0.X</td>  
<td align=center width="200">7.6.X</td>  
<td align=center width="200"></td>  
</tr>  
<tr>  
<td align=center width="200"><b>WCS</b></td>  
<td align=center width="200">無法管理7.4以上的Wireless Controller &amp; AP</td>  
<td align=center width="200">無法管理7.4以上的Wireless Controller &amp; AP</td>  
<td align=center width="200">Firmware已不再更新</td>  
</tr>  
</tbody>  
</table>

<blockquote>
  <p>註：部分Cisco Meraki內容參考資料來源為：<a href='http://www.ithome.com.tw/itadm/article.php?c=82962&amp;s=1' "target="_blank">IThome</a></p>
</blockquote>]]></description><link>http://blog.mikotek.com.tw/2013/12/27/cisco-meraki-and-wireless-update/</link><guid isPermaLink="false">731744d9-0d49-4192-b939-dc71c88799c3</guid><category><![CDATA[Information]]></category><dc:creator><![CDATA[test10]]></dc:creator><pubDate>Fri, 27 Dec 2013 04:00:00 GMT</pubDate></item><item><title><![CDATA[CISCO MERAKI無線網路解決方案及無線網路產品更新]]></title><description><![CDATA[<p><img src='http://blog.mikotek.com.tw/content/images/2014/May/Cisco-Cloud-Networking-Meraki.jpg'  alt="Cisco Meraki" /></p>

<h6 id="authorjerrychenmailtojerry_chenmikotekcomtw">Author: <a href='mailto:jerry_chen@mikotek.com.tw' >Jerry Chen</a></h6>

<p>Cisco最近推出一些新款的無線AP與無線網路解決方案，其中最特殊的是新型態的<strong>雲端無線網路架構：Cisco Meraki</strong>，以下簡單說明：</p>

<h2 id="ciscomeraki">CISCO MERAKI的無線網路解決方案  </h2>

<h4 id="meraki">Meraki 雲端無線網路架構</h4>

<p><img src='http://blog.mikotek.com.tw/content/images/2014/May/meraki_struct1.png'  alt="Meraki Struct1" />
<img src='http://blog.mikotek.com.tw/content/images/2014/May/meraki_struct2.png'  alt="Meraki Struct2" /></p>

<ul>
<li><p>Meraki無線控制器是雲端平臺架構（Cloud-based Wireless Controller）， IT單位可透過網頁瀏覽器進入雲端後臺，集中管理企業所部署的Wi-Fi網路環境，節省控制器佈建成本。</p></li>
<li><p>企業採購時需購買AP設備和控制器軟體授權，其中控制器軟體的授權費用採維護服務方式，以年為單位銷售。</p></li>
<li><p>多據點的無線網路管理。在部署上，管理者可從單一系統管理各分據點的無線網路，管理方式較為簡易。</p></li>
<li><p>即使是雲端服務斷線，Meraki AP本身仍保有網路的功能，無線網路仍可持續運行。唯雲端服務斷線時，不能異動設定及檢視報表。</p></li>
</ul>

<h4 id="apciscomeraki3">除了雲端式AP架構的特性，Cisco Meraki 還有3個特點：</h4>

<p><strong>1. 具有應用程式感知功能，可辨識連線使用者的應用程式特徵</strong></p>

<p>能封鎖特定應用群組或特定應用程式，像是：</p>

<ul>
<li>電子郵件：Gmail、Hotmail、Webmail等）</li>
<li>檔案分享網站：Dropbox、SkyDrive、Box等）</li>
<li>社群網站：Facebook、Flickr、Twitter等）</li>
<li>其他如部落格、P2P、遊戲、新聞、影音、VoIP等</li>
</ul>

<p><strong>2. 提供Facebook Wi-Fi登入功能，使提供的無線網路可以結合Facebook粉絲專頁利用行銷</strong></p>

<p>管理者可將企業的Facebook粉絲專頁，設定為登入無線網路時的起始頁面，讓使用者在打卡後，始可使用企業店家所提供的免費Wi-Fi無線網路。</p>

<pre><code>結合Facebook粉絲專頁打卡機制目前僅有Cisco Meraki無線路由器可支援。
</code></pre>

<p><strong>3. 內建Wi-Fi分析功能，可分析顧客行為</strong></p>

<p>可分析每日上網人數、訪客數與經過人數。另外，還能分析訪客的停留時間，甚至是經常到來或首次來訪數。</p>

<pre><code>Cisco Meraki 以簡單易懂的圖表呈現分析統計具商業價值的資訊。
</code></pre>

<blockquote>
  <ul>
  <li><p>Cisco Meraki 可提供 AP 與 Client 的詳細資訊記錄，管理者可設定每日、每周或每月將報表寄至電子信箱，快速掌握無線網路的使用狀況。</p></li>
  <li><p>整合 Google 地圖資訊於介面中，便於大範圍、大量 AP 部署的管控。
  <img src='http://blog.mikotek.com.tw/content/images/2014/May/meraki_gmap.jpg'  alt="Meraki Google Map" /></p></li>
  </ul>
</blockquote>

<p><br/></p>

<h2 id="meraki">Meraki無線網路路由器產品規格一覽表  </h2>

<table border="1" cellspacing="0" cellpadding="0">  
<tbody>  
<tr>  
<td width="120" align=center><b>產品型號</b></td>  
<td width="120" align=center><b>產品類型</b></td>  
<td width="120" align=center><b>無線網路規範</b></td>  
<td width="120" align=center><b>頻率</b></td>  
<td width="120" align=center><b>天線數</b></td>  
<td width="120" align=center><b>傳輸速度</b></td>  
<td width="120" align=center><b>使用規模</b></td>  
</tr>  
<tr>  
<td width="120" align=center><b>MR12</b></td>  
<td width="120" align=center>室內型</td>  
<td width="120" align=center>802.11b/g/n</td>  
<td width="120" align=center>單頻2.4 GHz</td>  
<td width="120" align=center>2&#215;2</td>  
<td width="120" align=center>300 Mbps</td>  
<td width="120" align=center>15~20人</td>  
</tr>  
<tr>  
<td width="120" align=center><b>MR16</b></td>  
<td width="120" align=center>室內型</td>  
<td width="120" align=center>802.11b/g/n</td>  
<td width="120" align=center>2.4GHz/5GHz</td>  
<td width="120" align=center>2&#215;2</td>  
<td width="120" align=center>600 Mbps</td>  
<td width="120" align=center>35~40人</td>  
</tr>  
<tr>  
<td width="120" align=center><b>MR24</b></td>  
<td width="120" align=center>室內型</td>  
<td width="120" align=center>802.11b/g/n</td>  
<td width="120" align=center>2.4GHz/5GHz</td>  
<td width="120" align=center>3&#215;3</td>  
<td width="120" align=center>900 Mbps</td>  
<td width="120" align=center>55~60人</td>  
</tr>  
<tr>  
<td width="120" align=center><b>MR34</b></td>  
<td width="120" align=center>室內型</td>  
<td width="120" align=center>802.11b/g/n/ac</td>  
<td width="120" align=center>2.4GHz/5GHz</td>  
<td width="120" align=center>3&#215;3</td>  
<td width="120" align=center>1.75 Gbps</td>  
<td width="120" align=center>廠商未提供</td>  
</tr>  
<tr>  
<td width="120" align=center><b>MR62</b></td>  
<td width="120" align=center>室外型</td>  
<td width="120" align=center>802.11b/g/n</td>  
<td width="120" align=center>單頻2.4 GHz</td>  
<td width="120" align=center>2&#215;2</td>  
<td width="120" align=center>300 Mbps</td>  
<td width="120" align=center>25人</td>  
</tr>  
<tr>  
<td width="120" align=center><b>MR66</b></td>  
<td width="120" align=center>室外型</td>  
<td width="120" align=center>802.11b/g/n</td>  
<td width="120" align=center>2.4GHz/5GHz</td>  
<td width="120" align=center>2&#215;2</td>  
<td width="120" align=center>600 Mbps</td>  
<td width="120" align=center>50人</td>  
</tr>  
</tbody>  
</table>

<p><br/></p>

<h2 id="cisco3650switch">CISCO 3650 SWITCH，具無線控制器功能！  </h2>

<p><img src='http://blog.mikotek.com.tw/content/images/2014/May/3650.jpg'  alt="Cisco 3650" /></p>

<p>3650 是取代 3560-X 的產品。3560-X不支援堆疊與無線控制器功能，而<strong>3650可當無線控制器使用，支援25 AP與1000個使用者</strong>。</p>

<ul>
<li><p>Cisco 3650 支援堆疊功能，160G的堆疊頻寛，最多可堆疊9台。</p>

<pre><code>註：Cisco 3650堆疊需另外購買Stack模組
</code></pre></li>
<li><p>現在如果要採購 Cisco 3750-X 或 3560-X，建議可選擇Cisco 3850與 Cisco 3650。</p>

<pre><code>只有必需要使用12或24個光纖介面才建議 Cisco 3750-X，因為 Cisco 3850目前沒有光纖介面的型號。
</code></pre></li>
<li><p>Cisco 3560-X 與 Cisco 3650 的功能比較：</p></li>
</ul>

<p><img src='http://blog.mikotek.com.tw/content/images/2014/May/3560Xvs3650.png'  alt="3650 Compare" /></p>

<p><br/></p>

<h2 id="ciscoap370080211ac">CISCO AP 3700 支援802.11AC  </h2>

<p><img src='http://blog.mikotek.com.tw/content/images/2014/May/ap3700.png'  alt="Cisco AP 3700" /></p>

<p>Cisco推出的最新802.11ac AP，傳輸速度1.3Gbps(Wave1)。</p>

<p>未來可加裝802.11ac(Wave2)模組，傳輸速度可提升到3.5Gbps。</p>

<p>提供內建天線與外接天線二種選擇。</p>

<blockquote>
  <p>Cisco AP 3600加裝 802.11ac(Wave1)的模組也可以支援802.11ac，但成本會比 Cisco AP 3700高。<br/>如果規劃會使用到802.11ac，建議現在就規劃使用 Cisco AP 3700。</p>
</blockquote>

<p><br/></p>

<h2 id="ciscoapcontroller">目前Cisco AP及Controller的版本支援</h2>

<table border="1" cellspacing="0" cellpadding="0">  
<tbody>  
<tr>  
<td align=center width="200"><b>Device</b></td>  
<td align=center width="200"><b>最低支援的版本</b></td>  
<td align=center width="200"><b>最新支援的版本</b></td>  
<td align=center width="200"><b>備註</b></td>  
</tr>  
<tr>  
<td align=center width="200"><b>AP 1020/1030</b></td>  
<td align=center width="200">3.0.X</td>  
<td align=center width="200">4.2.X</td>  
<td align=center width="200">Firmware已不再更新</td>  
</tr>  
<tr>  
<td align=center width="200"><b>AP 1131</b></td>  
<td align=center width="200">3.1.X</td>  
<td align=center width="200">7.6.X</td>  
<td align=center width="200"></td>  
</tr>  
<tr>  
<td align=center width="200"><b>AP 1142</b></td>  
<td align=center width="200">5.2.X</td>  
<td align=center width="200">7.6.X</td>  
<td align=center width="200"></td>  
</tr>  
<tr>  
<td align=center width="200"><b>AP 1602i</b></td>  
<td align=center width="200">7.4.X</td>  
<td align=center width="200">7.6.X</td>  
<td align=center width="200"></td>  
</tr>  
<tr>  
<td align=center width="200"><b>AP 2602i</b></td>  
<td align=center width="200">7.2.X</td>  
<td align=center width="200">7.6.X</td>  
<td align=center width="200"></td>  
</tr>  
<tr>  
<td align=center width="200"><b>WLC 4404</b></td>  
<td align=center width="200">4.2.X</td>  
<td align=center width="200">7.0.X</td>  
<td align=center width="200">Firmware已不再更新</td>  
</tr>  
<tr>  
<td align=center width="200"><b>WLC 5508</b></td>  
<td align=center width="200">6.0.X</td>  
<td align=center width="200">7.6.X</td>  
<td align=center width="200"></td>  
</tr>  
<tr>  
<td align=center width="200"><b>WiSM</b></td>  
<td align=center width="200">3.2.X</td>  
<td align=center width="200">7.0.X</td>  
<td align=center width="200">Firmware已不再更新</td>  
</tr>  
<tr>  
<td align=center width="200"><b>WiSM2</b></td>  
<td align=center width="200">7.0.X</td>  
<td align=center width="200">7.6.X</td>  
<td align=center width="200"></td>  
</tr>  
<tr>  
<td align=center width="200"><b>WCS</b></td>  
<td align=center width="200">無法管理7.4以上的Wireless Controller &amp; AP</td>  
<td align=center width="200">無法管理7.4以上的Wireless Controller &amp; AP</td>  
<td align=center width="200">Firmware已不再更新</td>  
</tr>  
</tbody>  
</table>

<blockquote>
  <p>註：部分Cisco Meraki內容參考資料來源為：<a href='http://www.ithome.com.tw/itadm/article.php?c=82962&amp;s=1' "target="_blank">IThome</a></p>
</blockquote>]]></description><link>http://blog.mikotek.com.tw/2013/12/27/cisco-meraki-and-wireless-update-2/</link><guid isPermaLink="false">731744d9-0d49-4192-b939-dc71c88799c3</guid><category><![CDATA[Information]]></category><dc:creator><![CDATA[test10]]></dc:creator><pubDate>Fri, 27 Dec 2013 04:00:00 GMT</pubDate></item><item><title><![CDATA[CISCO MERAKI無線網路解決方案及無線網路產品更新]]></title><description><![CDATA[<p><img src='http://blog.mikotek.com.tw/content/images/2014/May/Cisco-Cloud-Networking-Meraki.jpg'  alt="Cisco Meraki" /></p>

<h6 id="authorjerrychenmailtojerry_chenmikotekcomtw">Author: <a href='mailto:jerry_chen@mikotek.com.tw' >Jerry Chen</a></h6>

<p>Cisco最近推出一些新款的無線AP與無線網路解決方案，其中最特殊的是新型態的<strong>雲端無線網路架構：Cisco Meraki</strong>，以下簡單說明：</p>

<h2 id="ciscomeraki">CISCO MERAKI的無線網路解決方案  </h2>

<h4 id="meraki">Meraki 雲端無線網路架構</h4>

<p><img src='http://blog.mikotek.com.tw/content/images/2014/May/meraki_struct1.png'  alt="Meraki Struct1" />
<img src='http://blog.mikotek.com.tw/content/images/2014/May/meraki_struct2.png'  alt="Meraki Struct2" /></p>

<ul>
<li><p>Meraki無線控制器是雲端平臺架構（Cloud-based Wireless Controller）， IT單位可透過網頁瀏覽器進入雲端後臺，集中管理企業所部署的Wi-Fi網路環境，節省控制器佈建成本。</p></li>
<li><p>企業採購時需購買AP設備和控制器軟體授權，其中控制器軟體的授權費用採維護服務方式，以年為單位銷售。</p></li>
<li><p>多據點的無線網路管理。在部署上，管理者可從單一系統管理各分據點的無線網路，管理方式較為簡易。</p></li>
<li><p>即使是雲端服務斷線，Meraki AP本身仍保有網路的功能，無線網路仍可持續運行。唯雲端服務斷線時，不能異動設定及檢視報表。</p></li>
</ul>

<h4 id="apciscomeraki3">除了雲端式AP架構的特性，Cisco Meraki 還有3個特點：</h4>

<p><strong>1. 具有應用程式感知功能，可辨識連線使用者的應用程式特徵</strong></p>

<p>能封鎖特定應用群組或特定應用程式，像是：</p>

<ul>
<li>電子郵件：Gmail、Hotmail、Webmail等）</li>
<li>檔案分享網站：Dropbox、SkyDrive、Box等）</li>
<li>社群網站：Facebook、Flickr、Twitter等）</li>
<li>其他如部落格、P2P、遊戲、新聞、影音、VoIP等</li>
</ul>

<p><strong>2. 提供Facebook Wi-Fi登入功能，使提供的無線網路可以結合Facebook粉絲專頁利用行銷</strong></p>

<p>管理者可將企業的Facebook粉絲專頁，設定為登入無線網路時的起始頁面，讓使用者在打卡後，始可使用企業店家所提供的免費Wi-Fi無線網路。</p>

<pre><code>結合Facebook粉絲專頁打卡機制目前僅有Cisco Meraki無線路由器可支援。
</code></pre>

<p><strong>3. 內建Wi-Fi分析功能，可分析顧客行為</strong></p>

<p>可分析每日上網人數、訪客數與經過人數。另外，還能分析訪客的停留時間，甚至是經常到來或首次來訪數。</p>

<pre><code>Cisco Meraki 以簡單易懂的圖表呈現分析統計具商業價值的資訊。
</code></pre>

<blockquote>
  <ul>
  <li><p>Cisco Meraki 可提供 AP 與 Client 的詳細資訊記錄，管理者可設定每日、每周或每月將報表寄至電子信箱，快速掌握無線網路的使用狀況。</p></li>
  <li><p>整合 Google 地圖資訊於介面中，便於大範圍、大量 AP 部署的管控。
  <img src='http://blog.mikotek.com.tw/content/images/2014/May/meraki_gmap.jpg'  alt="Meraki Google Map" /></p></li>
  </ul>
</blockquote>

<p><br/></p>

<h2 id="meraki">Meraki無線網路路由器產品規格一覽表  </h2>

<table border="1" cellspacing="0" cellpadding="0">  
<tbody>  
<tr>  
<td width="120" align=center><b>產品型號</b></td>  
<td width="120" align=center><b>產品類型</b></td>  
<td width="120" align=center><b>無線網路規範</b></td>  
<td width="120" align=center><b>頻率</b></td>  
<td width="120" align=center><b>天線數</b></td>  
<td width="120" align=center><b>傳輸速度</b></td>  
<td width="120" align=center><b>使用規模</b></td>  
</tr>  
<tr>  
<td width="120" align=center><b>MR12</b></td>  
<td width="120" align=center>室內型</td>  
<td width="120" align=center>802.11b/g/n</td>  
<td width="120" align=center>單頻2.4 GHz</td>  
<td width="120" align=center>2&#215;2</td>  
<td width="120" align=center>300 Mbps</td>  
<td width="120" align=center>15~20人</td>  
</tr>  
<tr>  
<td width="120" align=center><b>MR16</b></td>  
<td width="120" align=center>室內型</td>  
<td width="120" align=center>802.11b/g/n</td>  
<td width="120" align=center>2.4GHz/5GHz</td>  
<td width="120" align=center>2&#215;2</td>  
<td width="120" align=center>600 Mbps</td>  
<td width="120" align=center>35~40人</td>  
</tr>  
<tr>  
<td width="120" align=center><b>MR24</b></td>  
<td width="120" align=center>室內型</td>  
<td width="120" align=center>802.11b/g/n</td>  
<td width="120" align=center>2.4GHz/5GHz</td>  
<td width="120" align=center>3&#215;3</td>  
<td width="120" align=center>900 Mbps</td>  
<td width="120" align=center>55~60人</td>  
</tr>  
<tr>  
<td width="120" align=center><b>MR34</b></td>  
<td width="120" align=center>室內型</td>  
<td width="120" align=center>802.11b/g/n/ac</td>  
<td width="120" align=center>2.4GHz/5GHz</td>  
<td width="120" align=center>3&#215;3</td>  
<td width="120" align=center>1.75 Gbps</td>  
<td width="120" align=center>廠商未提供</td>  
</tr>  
<tr>  
<td width="120" align=center><b>MR62</b></td>  
<td width="120" align=center>室外型</td>  
<td width="120" align=center>802.11b/g/n</td>  
<td width="120" align=center>單頻2.4 GHz</td>  
<td width="120" align=center>2&#215;2</td>  
<td width="120" align=center>300 Mbps</td>  
<td width="120" align=center>25人</td>  
</tr>  
<tr>  
<td width="120" align=center><b>MR66</b></td>  
<td width="120" align=center>室外型</td>  
<td width="120" align=center>802.11b/g/n</td>  
<td width="120" align=center>2.4GHz/5GHz</td>  
<td width="120" align=center>2&#215;2</td>  
<td width="120" align=center>600 Mbps</td>  
<td width="120" align=center>50人</td>  
</tr>  
</tbody>  
</table>

<p><br/></p>

<h2 id="cisco3650switch">CISCO 3650 SWITCH，具無線控制器功能！  </h2>

<p><img src='http://blog.mikotek.com.tw/content/images/2014/May/3650.jpg'  alt="Cisco 3650" /></p>

<p>3650 是取代 3560-X 的產品。3560-X不支援堆疊與無線控制器功能，而<strong>3650可當無線控制器使用，支援25 AP與1000個使用者</strong>。</p>

<ul>
<li><p>Cisco 3650 支援堆疊功能，160G的堆疊頻寛，最多可堆疊9台。</p>

<pre><code>註：Cisco 3650堆疊需另外購買Stack模組
</code></pre></li>
<li><p>現在如果要採購 Cisco 3750-X 或 3560-X，建議可選擇Cisco 3850與 Cisco 3650。</p>

<pre><code>只有必需要使用12或24個光纖介面才建議 Cisco 3750-X，因為 Cisco 3850目前沒有光纖介面的型號。
</code></pre></li>
<li><p>Cisco 3560-X 與 Cisco 3650 的功能比較：</p></li>
</ul>

<p><img src='http://blog.mikotek.com.tw/content/images/2014/May/3560Xvs3650.png'  alt="3650 Compare" /></p>

<p><br/></p>

<h2 id="ciscoap370080211ac">CISCO AP 3700 支援802.11AC  </h2>

<p><img src='http://blog.mikotek.com.tw/content/images/2014/May/ap3700.png'  alt="Cisco AP 3700" /></p>

<p>Cisco推出的最新802.11ac AP，傳輸速度1.3Gbps(Wave1)。</p>

<p>未來可加裝802.11ac(Wave2)模組，傳輸速度可提升到3.5Gbps。</p>

<p>提供內建天線與外接天線二種選擇。</p>

<blockquote>
  <p>Cisco AP 3600加裝 802.11ac(Wave1)的模組也可以支援802.11ac，但成本會比 Cisco AP 3700高。<br/>如果規劃會使用到802.11ac，建議現在就規劃使用 Cisco AP 3700。</p>
</blockquote>

<p><br/></p>

<h2 id="ciscoapcontroller">目前Cisco AP及Controller的版本支援</h2>

<table border="1" cellspacing="0" cellpadding="0">  
<tbody>  
<tr>  
<td align=center width="200"><b>Device</b></td>  
<td align=center width="200"><b>最低支援的版本</b></td>  
<td align=center width="200"><b>最新支援的版本</b></td>  
<td align=center width="200"><b>備註</b></td>  
</tr>  
<tr>  
<td align=center width="200"><b>AP 1020/1030</b></td>  
<td align=center width="200">3.0.X</td>  
<td align=center width="200">4.2.X</td>  
<td align=center width="200">Firmware已不再更新</td>  
</tr>  
<tr>  
<td align=center width="200"><b>AP 1131</b></td>  
<td align=center width="200">3.1.X</td>  
<td align=center width="200">7.6.X</td>  
<td align=center width="200"></td>  
</tr>  
<tr>  
<td align=center width="200"><b>AP 1142</b></td>  
<td align=center width="200">5.2.X</td>  
<td align=center width="200">7.6.X</td>  
<td align=center width="200"></td>  
</tr>  
<tr>  
<td align=center width="200"><b>AP 1602i</b></td>  
<td align=center width="200">7.4.X</td>  
<td align=center width="200">7.6.X</td>  
<td align=center width="200"></td>  
</tr>  
<tr>  
<td align=center width="200"><b>AP 2602i</b></td>  
<td align=center width="200">7.2.X</td>  
<td align=center width="200">7.6.X</td>  
<td align=center width="200"></td>  
</tr>  
<tr>  
<td align=center width="200"><b>WLC 4404</b></td>  
<td align=center width="200">4.2.X</td>  
<td align=center width="200">7.0.X</td>  
<td align=center width="200">Firmware已不再更新</td>  
</tr>  
<tr>  
<td align=center width="200"><b>WLC 5508</b></td>  
<td align=center width="200">6.0.X</td>  
<td align=center width="200">7.6.X</td>  
<td align=center width="200"></td>  
</tr>  
<tr>  
<td align=center width="200"><b>WiSM</b></td>  
<td align=center width="200">3.2.X</td>  
<td align=center width="200">7.0.X</td>  
<td align=center width="200">Firmware已不再更新</td>  
</tr>  
<tr>  
<td align=center width="200"><b>WiSM2</b></td>  
<td align=center width="200">7.0.X</td>  
<td align=center width="200">7.6.X</td>  
<td align=center width="200"></td>  
</tr>  
<tr>  
<td align=center width="200"><b>WCS</b></td>  
<td align=center width="200">無法管理7.4以上的Wireless Controller &amp; AP</td>  
<td align=center width="200">無法管理7.4以上的Wireless Controller &amp; AP</td>  
<td align=center width="200">Firmware已不再更新</td>  
</tr>  
</tbody>  
</table>

<blockquote>
  <p>註：部分Cisco Meraki內容參考資料來源為：<a href='http://www.ithome.com.tw/itadm/article.php?c=82962&amp;s=1' "target="_blank">IThome</a></p>
</blockquote>]]></description><link>http://blog.mikotek.com.tw/2013/12/27/cisco-meraki-and-wireless-update-2-2/</link><guid isPermaLink="false">731744d9-0d49-4192-b939-dc71c88799c3</guid><category><![CDATA[Information]]></category><dc:creator><![CDATA[test10]]></dc:creator><pubDate>Fri, 27 Dec 2013 04:00:00 GMT</pubDate></item></channel></rss>