<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: ACE 4710 LDAP probe in Application Networking</title>
    <link>https://community.cisco.com/t5/application-networking/ace-4710-ldap-probe/m-p/1568835#M32110</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Andre,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can use scripted ldap probe (LDAP_PROBE) available with ACE. It sends an anonymous bind request and check for bind success.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;probe tcp LDAPS_Probe&lt;BR /&gt;&amp;nbsp; port 636&lt;BR /&gt;probe tcp LDAP_Probe&lt;BR /&gt;&amp;nbsp; port 389&lt;/P&gt;&lt;P&gt; &lt;BR /&gt; &lt;BR /&gt;This is how you can apply the script for LDAP port 389.&lt;/P&gt;&lt;P&gt;script file 1 LDAP_PROBE&lt;BR /&gt;!&lt;BR /&gt;probe scripted LDAP_PROBE_389&lt;BR /&gt;interval 5&lt;BR /&gt;passdetect interval 30&lt;BR /&gt;receive 5&lt;BR /&gt;script LDAP_PROBE&lt;/P&gt;&lt;P&gt;!&lt;/P&gt;&lt;P&gt;serverfarm host SF-LDAP-389&lt;BR /&gt;description SF LDAP Port 389&lt;BR /&gt;predictor leastconns&lt;BR /&gt;probe LDAP_PROBE_389&lt;BR /&gt;rserver LDAP-RS1-389&lt;BR /&gt;inservice&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;----------&lt;/P&gt;&lt;P&gt;The only supported LDAP probe on the ACE module is the unsecure scripted probe,&lt;BR /&gt; &lt;/P&gt;&lt;P&gt;&lt;A href="http://www.cisco.com/en/US/docs/interfaces_modules/services_modules/ace/vA2_3_0/configuration/slb/guide/script.html#wp1111558"&gt;http://www.cisco.com/en/US/docs/interfaces_modules/services_modules/ace/vA2_3_0/configuration/slb/guide/script.html#wp1111558&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-------&lt;/P&gt;&lt;P&gt;The pre-made TCL script probes available from the Software download page also contains an LDAP probe that you can use to verify the health of the LDAP servers.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;The ace_scripts.tgz zip file contains these scripts and is located at this URL:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.cisco.com/pcgi-bin/tablebuild.pl/cat6500-ace"&gt;http://www.cisco.com/pcgi-bin/tablebuild.pl/cat6500-ace&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To unzip this file, use the gunzip command in Exec mode,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.cisco.com/en/US/docs/app_ntwk_services/data_center_app_services/ace_appliances/vA1_7_/configuration/slb/guide/script.html#wp1107470"&gt;http://www.cisco.com/en/US/docs/app_ntwk_services/data_center_app_services/ace_appliances/vA1_7_/configuration/slb/guide/script.html#wp1107470&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For your convenience, the following sample scripts for the ACE are available to support the TCL feature and are supported by Cisco TAC:&lt;/P&gt;&lt;P&gt;•CHECKPORT_STD_SCRIPT&lt;/P&gt;&lt;P&gt;•ECHO_PROBE_SCRIPT&lt;/P&gt;&lt;P&gt;•FINGER_PROBE_SCRIPT&lt;/P&gt;&lt;P&gt;•FTP_PROBE_SCRIPT&lt;/P&gt;&lt;P&gt;•HTTP_PROBE_SCRIPT&lt;/P&gt;&lt;P&gt;•HTTPCONTENT_PROBE&lt;/P&gt;&lt;P&gt;•HTTPHEADER_PROBE&lt;/P&gt;&lt;P&gt;•HTTPPROXY_PROBE&lt;/P&gt;&lt;P&gt;•IMAP_PROBE&lt;/P&gt;&lt;P&gt;•LDAP_PROBE -----------------&amp;gt; "The LDAP probe you are looking for"&lt;/P&gt;&lt;P&gt;•MAIL_PROBE&lt;/P&gt;&lt;P&gt;•POP3_PROBE&lt;/P&gt;&lt;P&gt;•PROBENOTICE_PROBE&lt;/P&gt;&lt;P&gt;•RTSP_PROBE&lt;/P&gt;&lt;P&gt;•SSL_PROBE_SCRIPT&lt;/P&gt;&lt;P&gt;•TFTP_PROBE&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;-------------&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Also remember that the binding request should be send as a binary and not via ASCII. To get a packet capture of a succeessful credential binding request with username and password and then convert this to HEX value and insert it in the script.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The easiest way is to capture a packet with the authentication credentials and then replace the hex bind string in the example.&lt;/P&gt;&lt;P&gt; &lt;BR /&gt;The alternative is to handcode the BER coded ASN.1 data string - which while more fun is time consuming. The remainder of the script can stay the same.&lt;/P&gt;&lt;P&gt; &lt;BR /&gt;You can do this on an ACE module. You have to be aware that 300c02010160 in the example script string is a sort of "header" that holds the request id (1). This will be different in your packet capture.&lt;/P&gt;&lt;P&gt; &lt;BR /&gt;If you look at the decomposition of the example you'll be able to see how it is put together and what you need to change.&lt;/P&gt;&lt;P&gt; &lt;BR /&gt;0x30 The start of a universal constructed sequence&lt;/P&gt;&lt;P&gt;0x0c The length of the sequence minus the tag and length bytes = 12 bytes&lt;/P&gt;&lt;P&gt;0x02 Next field is an integer&lt;/P&gt;&lt;P&gt;0x01 The length of the next field (1 byte)&lt;/P&gt;&lt;P&gt;0x01 Value (this is the message ID)&lt;/P&gt;&lt;P&gt;0x60 Application, number 0, use RFC2251 to decode. This is a Bind Request&lt;/P&gt;&lt;P&gt;0x07 Length of data to follow.&lt;/P&gt;&lt;P&gt;0x02 Integer&lt;/P&gt;&lt;P&gt;0x01 Length 1&lt;/P&gt;&lt;P&gt;0x03 3 - this is the LDAP version.&lt;/P&gt;&lt;P&gt;0x04 String&lt;/P&gt;&lt;P&gt;0x00 Length 0&lt;/P&gt;&lt;P&gt;0x80 Simple Authentication&lt;/P&gt;&lt;P&gt;0x00 Length 0&lt;/P&gt;&lt;P&gt; &lt;BR /&gt; &lt;BR /&gt;Just keep the id the same in the unbind.&lt;/P&gt;&lt;P&gt; &lt;BR /&gt;The string I use is:&lt;/P&gt;&lt;P&gt;302d02010160280201030418636e3d41636550726f78792c6f3d556e69766572736974798009ffffffffffffffffff&lt;/P&gt;&lt;P&gt; &lt;BR /&gt;where I've replaced the 9 character password with 9*x'ff'.&lt;/P&gt;&lt;P&gt; &lt;BR /&gt;The username for binding is AceProxy.&amp;nbsp; If you want to use the same script then create that username and set the password in the string above (in hex).&amp;nbsp; If for example you set the password to Example12 then you need to set the 9*x'ff' to '4578616d706c653132' - which is the hex representation of the ASCII.&lt;/P&gt;&lt;P&gt; &lt;BR /&gt;Note that if you use fewer or more than 9 characters then you'll need to change other values in the string because they refer to lengths.&lt;/P&gt;&lt;P&gt; &lt;BR /&gt;--&lt;BR /&gt;You need to create a copy of the standard LDAP probe into your own file and then replace the hex string in the "puts" line which you identified above with the new string.&lt;/P&gt;&lt;P&gt; &lt;BR /&gt;Then copy the file to the ACE:&lt;/P&gt;&lt;P&gt; &lt;BR /&gt;ace1/ldap# copy ftp: disk0:&lt;/P&gt;&lt;P&gt;Enter source filename[]? My-LDAP_PROBE&lt;/P&gt;&lt;P&gt;Enter the destination filename[]? [My-LDAP_PROBE]&lt;/P&gt;&lt;P&gt;Enter hostname for the ftp server[]?&lt;/P&gt;&lt;P&gt;1.2.3.4&lt;/P&gt;&lt;P&gt;Enter username[]? anonymous&lt;/P&gt;&lt;P&gt;Enter the file transfer mode[bin/ascii]: [bin]&lt;/P&gt;&lt;P&gt;Password:&lt;/P&gt;&lt;P&gt;Passive mode on.&lt;/P&gt;&lt;P&gt;Hash mark printing on (1024 bytes/hash mark).&lt;/P&gt;&lt;P&gt;##&lt;/P&gt;&lt;P&gt; &lt;BR /&gt; &lt;BR /&gt;In the context create a scripted probe definition:&lt;/P&gt;&lt;P&gt; &lt;BR /&gt;probe scripted PROBE-LDAP-389&lt;/P&gt;&lt;P&gt;&amp;nbsp; interval 60&lt;/P&gt;&lt;P&gt;&amp;nbsp; receive 20&lt;/P&gt;&lt;P&gt;&amp;nbsp; script My-LDAP_PROBE&lt;/P&gt;&lt;P&gt; &lt;BR /&gt;Load the script into the context:&lt;/P&gt;&lt;P&gt; &lt;BR /&gt;script file 10 My-LDAP_PROBE&lt;/P&gt;&lt;P&gt; &lt;BR /&gt;And then add it to the serverfarm:&lt;/P&gt;&lt;P&gt; &lt;BR /&gt;serverfarm host FARM-LDAP&lt;/P&gt;&lt;P&gt;&amp;nbsp; probe PROBE-LDAP-389&lt;/P&gt;&lt;P&gt; &lt;BR /&gt; &lt;BR /&gt;The manual implies that you can pass arguments to a scripted probe, but you would then have to build the hex string dynamically - taking care that all the length values were correct.&lt;/P&gt;&lt;P&gt; &lt;BR /&gt;This should be enough to enable you to implement the script. &lt;/P&gt;&lt;P&gt;&lt;BR /&gt;-----------------&lt;/P&gt;&lt;P&gt;Find another example on this&lt;/P&gt;&lt;P&gt;&lt;A href="http://scuq.abyle.org/?page_id=201"&gt;URL:http://scuq.abyle.org/?page_id=201&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;#!name = ADV_LDAP_PROBE&lt;BR /&gt;################################################################################&lt;BR /&gt;########&lt;BR /&gt;#### &amp;gt; user for linux tclsh !/usr/bin/tclsh8.4&lt;BR /&gt;# Stefan Nistelberger &lt;BR /&gt;# changes to cisco's original probe&lt;BR /&gt;# * username and password with ldap simple bind (dynamically generated packets)&lt;BR /&gt;# * unable to connect exception handling&lt;BR /&gt;# * debug message for invalidCredentials&lt;BR /&gt;#-------------------------------------------&lt;BR /&gt;# debug procedure&lt;BR /&gt;# set the EXIT_MSG environment variable to help debug&lt;BR /&gt;# also print the debug message when debug flag is on&lt;BR /&gt;#-------------------------------------------&lt;/P&gt;&lt;P&gt;proc ace_debug { msg } {&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; global debug ip port EXIT_MSG&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; set EXIT_MSG $msg&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if { [ info exists ip ] &amp;amp;&amp;amp; [ info exists port ] } {&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; set EXIT_MSG "[ info script ]:$ip:$port: $EXIT_MSG "&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if { [ info exists debug ] &amp;amp;&amp;amp; $debug } {&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; puts $EXIT_MSG&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;#-------------------------------------------&lt;BR /&gt;# main&lt;BR /&gt;#-------------------------------------------&lt;/P&gt;&lt;P&gt;# parse cmd line args and initialize variables&lt;BR /&gt;## set debug value&lt;BR /&gt;set debug 1&lt;BR /&gt;if { [ regsub -nocase "DEBUG" $argv "" argv] } {&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; set debug 1&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;ace_debug "initializing variable"&lt;BR /&gt;set EXIT_MSG "Error config:&amp;nbsp; script ADV_LDAP_PROBE \[DEBUG\]"&lt;/P&gt;&lt;P&gt;set ip $scriptprobe_env(realIP)&lt;BR /&gt;set port "0"&lt;/P&gt;&lt;P&gt;set ldap_start "30"&lt;BR /&gt;set ldap_bindheader "02010160"&lt;BR /&gt;set ldap_bind "0201"&lt;BR /&gt;set ldap_version "02"&lt;BR /&gt;set ldap_gap1 "04"&lt;BR /&gt;set ldap_gap2 "80"&lt;/P&gt;&lt;P&gt;set ldap_bindheader_len 5&lt;BR /&gt;set base_len 0c&lt;/P&gt;&lt;P&gt;set ldap_simple_auth "8007"&lt;/P&gt;&lt;P&gt;proc toASCII { char } {&lt;BR /&gt;&amp;nbsp;&amp;nbsp; scan $char %c value&lt;BR /&gt;&amp;nbsp;&amp;nbsp; return [format %-x $value]&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;set username [ lindex $argv 0 ]&lt;BR /&gt;set hexusername ""&lt;/P&gt;&lt;P&gt;set password [ lindex $argv 1 ]&lt;BR /&gt;set hexpassword ""&lt;/P&gt;&lt;P&gt;foreach char [split $username ""] {&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; set hexchar [toASCII $char]&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; append hexusername $hexchar&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;foreach char [split $password ""] {&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; set hexchar [toASCII $char]&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; append hexpassword $hexchar&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;set username_len [string length $username]&lt;BR /&gt;ace_debug $username_len&lt;/P&gt;&lt;P&gt;set password_len [string length $password]&lt;BR /&gt;ace_debug $password_len&lt;/P&gt;&lt;P&gt;set base_len [expr 0x$base_len]&lt;/P&gt;&lt;P&gt;set seq_len [expr $username_len + $password_len + $base_len]&lt;/P&gt;&lt;P&gt;set sub_seq_len [expr $seq_len - $ldap_bindheader_len]&lt;BR /&gt;set seq_len [format %02x $seq_len]&lt;BR /&gt;set sub_seq_len [format %02x $sub_seq_len]&lt;/P&gt;&lt;P&gt;set hexldapbindpckt ""&lt;BR /&gt;append hexldapbindpckt $ldap_start&lt;BR /&gt;append hexldapbindpckt "$seq_len"&lt;BR /&gt;append hexldapbindpckt $ldap_bindheader&lt;BR /&gt;append hexldapbindpckt $sub_seq_len&lt;BR /&gt;append hexldapbindpckt $ldap_bind&lt;BR /&gt;append hexldapbindpckt $ldap_version&lt;BR /&gt;append hexldapbindpckt $ldap_gap1&lt;BR /&gt;append hexldapbindpckt [format %02x $username_len]&lt;BR /&gt;append hexldapbindpckt $hexusername&lt;BR /&gt;append hexldapbindpckt $ldap_gap2&lt;BR /&gt;append hexldapbindpckt [format %02x $password_len]&lt;BR /&gt;append hexldapbindpckt $hexpassword&lt;/P&gt;&lt;P&gt;# if port is zero the use well known ldap port 389&lt;BR /&gt;if { $port == 0 } {&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; set port 389&lt;BR /&gt;}&lt;BR /&gt;#ace_debug $hexldapbindpckt&lt;/P&gt;&lt;P&gt;#####################&lt;BR /&gt;# PROBE START&lt;BR /&gt;#####################&lt;/P&gt;&lt;P&gt;set errorcode [catch {&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; set sock [ socket $ip $port ]&lt;BR /&gt;} msg ]&lt;BR /&gt;if {$errorcode != 0} {&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ace_debug $msg&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; exit 30002&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;fconfigure $sock -buffering line -translation binary&lt;/P&gt;&lt;P&gt;# anonymous bind request&lt;BR /&gt;#puts -nonewline $sock [ binary format "H*" 300c020101600702010304008000 ]&lt;/P&gt;&lt;P&gt;puts -nonewline $sock [ binary format "H*" $hexldapbindpckt ]&lt;/P&gt;&lt;P&gt;set code "ffffff"&lt;BR /&gt;flush $sock&lt;BR /&gt;ace_debug "bef"&lt;BR /&gt;set line [read $sock 22]&lt;BR /&gt;ace_debug "aft"&lt;BR /&gt;binary scan $line H* res&lt;BR /&gt;binary scan $line @15H6 code&lt;BR /&gt;close $sock&lt;/P&gt;&lt;P&gt;#&amp;nbsp; make probe fail by exit with 30002 if ldap reply code != success code&amp;nbsp; 0x0a0100&lt;BR /&gt;if {&amp;nbsp; $code != "0a0100" } {&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if {&amp;nbsp; $code == "0a0131" } {&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ace_debug " probe failed : expect response code \'0a0100\' but received&lt;BR /&gt;\'$code\' = invalidCredentials"&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; } else {&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ace_debug " probe failed : expect response code \'0a0100\' but received&lt;BR /&gt;\'$code\'"&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; exit 30002&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;## make probe success by exit with 30001&lt;BR /&gt;ace_debug "probe success"&lt;BR /&gt;exit 30001&lt;/P&gt;&lt;P&gt;--------------------&lt;/P&gt;&lt;P&gt;URL for reference:&lt;/P&gt;&lt;P&gt;&lt;A href="https://cisco-support.hosted.jivesoftware.com/thread/132800?decorator=print&amp;amp;displayFullThread=true"&gt;https://cisco-support.hosted.jivesoftware.com/thread/132800?decorator=print&amp;amp;displayFullThread=true&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;HTH&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sachin Garg&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 15 Dec 2010 18:13:41 GMT</pubDate>
    <dc:creator>sachinga.hcl</dc:creator>
    <dc:date>2010-12-15T18:13:41Z</dc:date>
    <item>
      <title>ACE 4710 LDAP probe</title>
      <link>https://community.cisco.com/t5/application-networking/ace-4710-ldap-probe/m-p/1568833#M32108</link>
      <description>&lt;P&gt;&lt;SPAN style="background-color: #f8fafd;"&gt;Folks,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #f8fafd;"&gt;We'll be adding a farm this weekend to do some kind of balance for LDAP and LDAPs servers.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #f8fafd;"&gt;I've been thinking about what would be the best way to probe that servers.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #f8fafd;"&gt;I assume an generic TCP probe has to be created testing 389 and 636, but i honestly don't know what should i expect coming from the real servers.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #f8fafd;"&gt;Does anyone have a LDAP farm in place or something like that.. ? I've found an script on the internet, but it seems a little bit further that what i can understand.. therefore i'm not really confident to use this.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #f8fafd;"&gt;Thanks for any advices.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #f8fafd;"&gt;Andre&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 14 Dec 2010 17:22:05 GMT</pubDate>
      <guid>https://community.cisco.com/t5/application-networking/ace-4710-ldap-probe/m-p/1568833#M32108</guid>
      <dc:creator>andrels</dc:creator>
      <dc:date>2010-12-14T17:22:05Z</dc:date>
    </item>
    <item>
      <title>Re: ACE 4710 LDAP probe</title>
      <link>https://community.cisco.com/t5/application-networking/ace-4710-ldap-probe/m-p/1568834#M32109</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Andre,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;The ACE comes with some sample probe scripts - one of which tests LDAP by performing an anaonymous bind.&amp;nbsp; I've written elsewhere in this forum (&lt;/SPAN&gt;&lt;A class="jive-link-message-small" href="https://community.cisco.com/message/458388#458388"&gt;https://supportforums.cisco.com/message/458388#458388&lt;/A&gt;&lt;BR /&gt;&lt;A class="jive-link-message-small" href="https://community.cisco.com/message/461739#461739"&gt;https://supportforums.cisco.com/message/461739#461739&lt;/A&gt;&lt;SPAN&gt;) about how to modify the script to use non-anonymous credentials. You need to create a copy of the provided script, modify the mysterious hex sequence which is ASN.1 formatted, re-import the script and then reference it.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To help with creating magic hex strings I whipped up a small PERL script:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;#&lt;BR /&gt;# Prepare an ASN.1 BER encoded string to do an LDAP Bind with&lt;BR /&gt;# username and password.&lt;BR /&gt;#&lt;BR /&gt;#&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;$username = "cn=AceHealthCheck,o=something";&lt;BR /&gt;$password = "somethingssecret";&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;$len_username = length($username);&lt;BR /&gt;$xlen_username = sprintf("%02x", $len_username);&lt;BR /&gt;$len_password = length($password);&lt;BR /&gt;$xlen_password = sprintf("%02x", $len_password);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;$username =~s/(.)/sprintf("%x",ord($1))/eg;&lt;BR /&gt;$password =~s/(.)/sprintf("%x",ord($1))/eg;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;$temp = "020103" . "04" . $xlen_username . $username . "80" . $xlen_password . $password;&lt;BR /&gt;$tlen = length($temp) / 2;&lt;BR /&gt;$xtlen = sprintf("%02x",$tlen);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;$temp = "020101" . "60" . $xtlen . $temp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;$tlen = length($temp) / 2;&lt;BR /&gt;$xtlen = sprintf("%02x",$tlen);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;$temp = "30" . $xtlen . $temp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;print $temp . "\n";&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Not pretty or elegant but it does the job.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note that if you're using Active Directory as the LDAP server then you'll either need to enable anonymous bind and you'll need to modify the script code that looks for the return code as AD uses the extended length encoding mechanism of ASN.1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There is no easy way of checking LDAPS beyond a simple TCP probe to check that the port is open and can complete a three-way handshake.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cathy&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Dec 2010 15:26:12 GMT</pubDate>
      <guid>https://community.cisco.com/t5/application-networking/ace-4710-ldap-probe/m-p/1568834#M32109</guid>
      <dc:creator>ciscocsoc</dc:creator>
      <dc:date>2010-12-15T15:26:12Z</dc:date>
    </item>
    <item>
      <title>Re: ACE 4710 LDAP probe</title>
      <link>https://community.cisco.com/t5/application-networking/ace-4710-ldap-probe/m-p/1568835#M32110</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Andre,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can use scripted ldap probe (LDAP_PROBE) available with ACE. It sends an anonymous bind request and check for bind success.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;probe tcp LDAPS_Probe&lt;BR /&gt;&amp;nbsp; port 636&lt;BR /&gt;probe tcp LDAP_Probe&lt;BR /&gt;&amp;nbsp; port 389&lt;/P&gt;&lt;P&gt; &lt;BR /&gt; &lt;BR /&gt;This is how you can apply the script for LDAP port 389.&lt;/P&gt;&lt;P&gt;script file 1 LDAP_PROBE&lt;BR /&gt;!&lt;BR /&gt;probe scripted LDAP_PROBE_389&lt;BR /&gt;interval 5&lt;BR /&gt;passdetect interval 30&lt;BR /&gt;receive 5&lt;BR /&gt;script LDAP_PROBE&lt;/P&gt;&lt;P&gt;!&lt;/P&gt;&lt;P&gt;serverfarm host SF-LDAP-389&lt;BR /&gt;description SF LDAP Port 389&lt;BR /&gt;predictor leastconns&lt;BR /&gt;probe LDAP_PROBE_389&lt;BR /&gt;rserver LDAP-RS1-389&lt;BR /&gt;inservice&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;----------&lt;/P&gt;&lt;P&gt;The only supported LDAP probe on the ACE module is the unsecure scripted probe,&lt;BR /&gt; &lt;/P&gt;&lt;P&gt;&lt;A href="http://www.cisco.com/en/US/docs/interfaces_modules/services_modules/ace/vA2_3_0/configuration/slb/guide/script.html#wp1111558"&gt;http://www.cisco.com/en/US/docs/interfaces_modules/services_modules/ace/vA2_3_0/configuration/slb/guide/script.html#wp1111558&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-------&lt;/P&gt;&lt;P&gt;The pre-made TCL script probes available from the Software download page also contains an LDAP probe that you can use to verify the health of the LDAP servers.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;The ace_scripts.tgz zip file contains these scripts and is located at this URL:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.cisco.com/pcgi-bin/tablebuild.pl/cat6500-ace"&gt;http://www.cisco.com/pcgi-bin/tablebuild.pl/cat6500-ace&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To unzip this file, use the gunzip command in Exec mode,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.cisco.com/en/US/docs/app_ntwk_services/data_center_app_services/ace_appliances/vA1_7_/configuration/slb/guide/script.html#wp1107470"&gt;http://www.cisco.com/en/US/docs/app_ntwk_services/data_center_app_services/ace_appliances/vA1_7_/configuration/slb/guide/script.html#wp1107470&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For your convenience, the following sample scripts for the ACE are available to support the TCL feature and are supported by Cisco TAC:&lt;/P&gt;&lt;P&gt;•CHECKPORT_STD_SCRIPT&lt;/P&gt;&lt;P&gt;•ECHO_PROBE_SCRIPT&lt;/P&gt;&lt;P&gt;•FINGER_PROBE_SCRIPT&lt;/P&gt;&lt;P&gt;•FTP_PROBE_SCRIPT&lt;/P&gt;&lt;P&gt;•HTTP_PROBE_SCRIPT&lt;/P&gt;&lt;P&gt;•HTTPCONTENT_PROBE&lt;/P&gt;&lt;P&gt;•HTTPHEADER_PROBE&lt;/P&gt;&lt;P&gt;•HTTPPROXY_PROBE&lt;/P&gt;&lt;P&gt;•IMAP_PROBE&lt;/P&gt;&lt;P&gt;•LDAP_PROBE -----------------&amp;gt; "The LDAP probe you are looking for"&lt;/P&gt;&lt;P&gt;•MAIL_PROBE&lt;/P&gt;&lt;P&gt;•POP3_PROBE&lt;/P&gt;&lt;P&gt;•PROBENOTICE_PROBE&lt;/P&gt;&lt;P&gt;•RTSP_PROBE&lt;/P&gt;&lt;P&gt;•SSL_PROBE_SCRIPT&lt;/P&gt;&lt;P&gt;•TFTP_PROBE&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;-------------&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Also remember that the binding request should be send as a binary and not via ASCII. To get a packet capture of a succeessful credential binding request with username and password and then convert this to HEX value and insert it in the script.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The easiest way is to capture a packet with the authentication credentials and then replace the hex bind string in the example.&lt;/P&gt;&lt;P&gt; &lt;BR /&gt;The alternative is to handcode the BER coded ASN.1 data string - which while more fun is time consuming. The remainder of the script can stay the same.&lt;/P&gt;&lt;P&gt; &lt;BR /&gt;You can do this on an ACE module. You have to be aware that 300c02010160 in the example script string is a sort of "header" that holds the request id (1). This will be different in your packet capture.&lt;/P&gt;&lt;P&gt; &lt;BR /&gt;If you look at the decomposition of the example you'll be able to see how it is put together and what you need to change.&lt;/P&gt;&lt;P&gt; &lt;BR /&gt;0x30 The start of a universal constructed sequence&lt;/P&gt;&lt;P&gt;0x0c The length of the sequence minus the tag and length bytes = 12 bytes&lt;/P&gt;&lt;P&gt;0x02 Next field is an integer&lt;/P&gt;&lt;P&gt;0x01 The length of the next field (1 byte)&lt;/P&gt;&lt;P&gt;0x01 Value (this is the message ID)&lt;/P&gt;&lt;P&gt;0x60 Application, number 0, use RFC2251 to decode. This is a Bind Request&lt;/P&gt;&lt;P&gt;0x07 Length of data to follow.&lt;/P&gt;&lt;P&gt;0x02 Integer&lt;/P&gt;&lt;P&gt;0x01 Length 1&lt;/P&gt;&lt;P&gt;0x03 3 - this is the LDAP version.&lt;/P&gt;&lt;P&gt;0x04 String&lt;/P&gt;&lt;P&gt;0x00 Length 0&lt;/P&gt;&lt;P&gt;0x80 Simple Authentication&lt;/P&gt;&lt;P&gt;0x00 Length 0&lt;/P&gt;&lt;P&gt; &lt;BR /&gt; &lt;BR /&gt;Just keep the id the same in the unbind.&lt;/P&gt;&lt;P&gt; &lt;BR /&gt;The string I use is:&lt;/P&gt;&lt;P&gt;302d02010160280201030418636e3d41636550726f78792c6f3d556e69766572736974798009ffffffffffffffffff&lt;/P&gt;&lt;P&gt; &lt;BR /&gt;where I've replaced the 9 character password with 9*x'ff'.&lt;/P&gt;&lt;P&gt; &lt;BR /&gt;The username for binding is AceProxy.&amp;nbsp; If you want to use the same script then create that username and set the password in the string above (in hex).&amp;nbsp; If for example you set the password to Example12 then you need to set the 9*x'ff' to '4578616d706c653132' - which is the hex representation of the ASCII.&lt;/P&gt;&lt;P&gt; &lt;BR /&gt;Note that if you use fewer or more than 9 characters then you'll need to change other values in the string because they refer to lengths.&lt;/P&gt;&lt;P&gt; &lt;BR /&gt;--&lt;BR /&gt;You need to create a copy of the standard LDAP probe into your own file and then replace the hex string in the "puts" line which you identified above with the new string.&lt;/P&gt;&lt;P&gt; &lt;BR /&gt;Then copy the file to the ACE:&lt;/P&gt;&lt;P&gt; &lt;BR /&gt;ace1/ldap# copy ftp: disk0:&lt;/P&gt;&lt;P&gt;Enter source filename[]? My-LDAP_PROBE&lt;/P&gt;&lt;P&gt;Enter the destination filename[]? [My-LDAP_PROBE]&lt;/P&gt;&lt;P&gt;Enter hostname for the ftp server[]?&lt;/P&gt;&lt;P&gt;1.2.3.4&lt;/P&gt;&lt;P&gt;Enter username[]? anonymous&lt;/P&gt;&lt;P&gt;Enter the file transfer mode[bin/ascii]: [bin]&lt;/P&gt;&lt;P&gt;Password:&lt;/P&gt;&lt;P&gt;Passive mode on.&lt;/P&gt;&lt;P&gt;Hash mark printing on (1024 bytes/hash mark).&lt;/P&gt;&lt;P&gt;##&lt;/P&gt;&lt;P&gt; &lt;BR /&gt; &lt;BR /&gt;In the context create a scripted probe definition:&lt;/P&gt;&lt;P&gt; &lt;BR /&gt;probe scripted PROBE-LDAP-389&lt;/P&gt;&lt;P&gt;&amp;nbsp; interval 60&lt;/P&gt;&lt;P&gt;&amp;nbsp; receive 20&lt;/P&gt;&lt;P&gt;&amp;nbsp; script My-LDAP_PROBE&lt;/P&gt;&lt;P&gt; &lt;BR /&gt;Load the script into the context:&lt;/P&gt;&lt;P&gt; &lt;BR /&gt;script file 10 My-LDAP_PROBE&lt;/P&gt;&lt;P&gt; &lt;BR /&gt;And then add it to the serverfarm:&lt;/P&gt;&lt;P&gt; &lt;BR /&gt;serverfarm host FARM-LDAP&lt;/P&gt;&lt;P&gt;&amp;nbsp; probe PROBE-LDAP-389&lt;/P&gt;&lt;P&gt; &lt;BR /&gt; &lt;BR /&gt;The manual implies that you can pass arguments to a scripted probe, but you would then have to build the hex string dynamically - taking care that all the length values were correct.&lt;/P&gt;&lt;P&gt; &lt;BR /&gt;This should be enough to enable you to implement the script. &lt;/P&gt;&lt;P&gt;&lt;BR /&gt;-----------------&lt;/P&gt;&lt;P&gt;Find another example on this&lt;/P&gt;&lt;P&gt;&lt;A href="http://scuq.abyle.org/?page_id=201"&gt;URL:http://scuq.abyle.org/?page_id=201&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;#!name = ADV_LDAP_PROBE&lt;BR /&gt;################################################################################&lt;BR /&gt;########&lt;BR /&gt;#### &amp;gt; user for linux tclsh !/usr/bin/tclsh8.4&lt;BR /&gt;# Stefan Nistelberger &lt;BR /&gt;# changes to cisco's original probe&lt;BR /&gt;# * username and password with ldap simple bind (dynamically generated packets)&lt;BR /&gt;# * unable to connect exception handling&lt;BR /&gt;# * debug message for invalidCredentials&lt;BR /&gt;#-------------------------------------------&lt;BR /&gt;# debug procedure&lt;BR /&gt;# set the EXIT_MSG environment variable to help debug&lt;BR /&gt;# also print the debug message when debug flag is on&lt;BR /&gt;#-------------------------------------------&lt;/P&gt;&lt;P&gt;proc ace_debug { msg } {&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; global debug ip port EXIT_MSG&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; set EXIT_MSG $msg&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if { [ info exists ip ] &amp;amp;&amp;amp; [ info exists port ] } {&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; set EXIT_MSG "[ info script ]:$ip:$port: $EXIT_MSG "&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if { [ info exists debug ] &amp;amp;&amp;amp; $debug } {&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; puts $EXIT_MSG&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;#-------------------------------------------&lt;BR /&gt;# main&lt;BR /&gt;#-------------------------------------------&lt;/P&gt;&lt;P&gt;# parse cmd line args and initialize variables&lt;BR /&gt;## set debug value&lt;BR /&gt;set debug 1&lt;BR /&gt;if { [ regsub -nocase "DEBUG" $argv "" argv] } {&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; set debug 1&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;ace_debug "initializing variable"&lt;BR /&gt;set EXIT_MSG "Error config:&amp;nbsp; script ADV_LDAP_PROBE \[DEBUG\]"&lt;/P&gt;&lt;P&gt;set ip $scriptprobe_env(realIP)&lt;BR /&gt;set port "0"&lt;/P&gt;&lt;P&gt;set ldap_start "30"&lt;BR /&gt;set ldap_bindheader "02010160"&lt;BR /&gt;set ldap_bind "0201"&lt;BR /&gt;set ldap_version "02"&lt;BR /&gt;set ldap_gap1 "04"&lt;BR /&gt;set ldap_gap2 "80"&lt;/P&gt;&lt;P&gt;set ldap_bindheader_len 5&lt;BR /&gt;set base_len 0c&lt;/P&gt;&lt;P&gt;set ldap_simple_auth "8007"&lt;/P&gt;&lt;P&gt;proc toASCII { char } {&lt;BR /&gt;&amp;nbsp;&amp;nbsp; scan $char %c value&lt;BR /&gt;&amp;nbsp;&amp;nbsp; return [format %-x $value]&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;set username [ lindex $argv 0 ]&lt;BR /&gt;set hexusername ""&lt;/P&gt;&lt;P&gt;set password [ lindex $argv 1 ]&lt;BR /&gt;set hexpassword ""&lt;/P&gt;&lt;P&gt;foreach char [split $username ""] {&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; set hexchar [toASCII $char]&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; append hexusername $hexchar&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;foreach char [split $password ""] {&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; set hexchar [toASCII $char]&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; append hexpassword $hexchar&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;set username_len [string length $username]&lt;BR /&gt;ace_debug $username_len&lt;/P&gt;&lt;P&gt;set password_len [string length $password]&lt;BR /&gt;ace_debug $password_len&lt;/P&gt;&lt;P&gt;set base_len [expr 0x$base_len]&lt;/P&gt;&lt;P&gt;set seq_len [expr $username_len + $password_len + $base_len]&lt;/P&gt;&lt;P&gt;set sub_seq_len [expr $seq_len - $ldap_bindheader_len]&lt;BR /&gt;set seq_len [format %02x $seq_len]&lt;BR /&gt;set sub_seq_len [format %02x $sub_seq_len]&lt;/P&gt;&lt;P&gt;set hexldapbindpckt ""&lt;BR /&gt;append hexldapbindpckt $ldap_start&lt;BR /&gt;append hexldapbindpckt "$seq_len"&lt;BR /&gt;append hexldapbindpckt $ldap_bindheader&lt;BR /&gt;append hexldapbindpckt $sub_seq_len&lt;BR /&gt;append hexldapbindpckt $ldap_bind&lt;BR /&gt;append hexldapbindpckt $ldap_version&lt;BR /&gt;append hexldapbindpckt $ldap_gap1&lt;BR /&gt;append hexldapbindpckt [format %02x $username_len]&lt;BR /&gt;append hexldapbindpckt $hexusername&lt;BR /&gt;append hexldapbindpckt $ldap_gap2&lt;BR /&gt;append hexldapbindpckt [format %02x $password_len]&lt;BR /&gt;append hexldapbindpckt $hexpassword&lt;/P&gt;&lt;P&gt;# if port is zero the use well known ldap port 389&lt;BR /&gt;if { $port == 0 } {&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; set port 389&lt;BR /&gt;}&lt;BR /&gt;#ace_debug $hexldapbindpckt&lt;/P&gt;&lt;P&gt;#####################&lt;BR /&gt;# PROBE START&lt;BR /&gt;#####################&lt;/P&gt;&lt;P&gt;set errorcode [catch {&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; set sock [ socket $ip $port ]&lt;BR /&gt;} msg ]&lt;BR /&gt;if {$errorcode != 0} {&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ace_debug $msg&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; exit 30002&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;fconfigure $sock -buffering line -translation binary&lt;/P&gt;&lt;P&gt;# anonymous bind request&lt;BR /&gt;#puts -nonewline $sock [ binary format "H*" 300c020101600702010304008000 ]&lt;/P&gt;&lt;P&gt;puts -nonewline $sock [ binary format "H*" $hexldapbindpckt ]&lt;/P&gt;&lt;P&gt;set code "ffffff"&lt;BR /&gt;flush $sock&lt;BR /&gt;ace_debug "bef"&lt;BR /&gt;set line [read $sock 22]&lt;BR /&gt;ace_debug "aft"&lt;BR /&gt;binary scan $line H* res&lt;BR /&gt;binary scan $line @15H6 code&lt;BR /&gt;close $sock&lt;/P&gt;&lt;P&gt;#&amp;nbsp; make probe fail by exit with 30002 if ldap reply code != success code&amp;nbsp; 0x0a0100&lt;BR /&gt;if {&amp;nbsp; $code != "0a0100" } {&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if {&amp;nbsp; $code == "0a0131" } {&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ace_debug " probe failed : expect response code \'0a0100\' but received&lt;BR /&gt;\'$code\' = invalidCredentials"&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; } else {&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ace_debug " probe failed : expect response code \'0a0100\' but received&lt;BR /&gt;\'$code\'"&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; exit 30002&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;## make probe success by exit with 30001&lt;BR /&gt;ace_debug "probe success"&lt;BR /&gt;exit 30001&lt;/P&gt;&lt;P&gt;--------------------&lt;/P&gt;&lt;P&gt;URL for reference:&lt;/P&gt;&lt;P&gt;&lt;A href="https://cisco-support.hosted.jivesoftware.com/thread/132800?decorator=print&amp;amp;displayFullThread=true"&gt;https://cisco-support.hosted.jivesoftware.com/thread/132800?decorator=print&amp;amp;displayFullThread=true&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;HTH&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sachin Garg&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Dec 2010 18:13:41 GMT</pubDate>
      <guid>https://community.cisco.com/t5/application-networking/ace-4710-ldap-probe/m-p/1568835#M32110</guid>
      <dc:creator>sachinga.hcl</dc:creator>
      <dc:date>2010-12-15T18:13:41Z</dc:date>
    </item>
    <item>
      <title>Re: ACE 4710 LDAP probe</title>
      <link>https://community.cisco.com/t5/application-networking/ace-4710-ldap-probe/m-p/1568836#M32111</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Andre,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kindly update the status. If your issue resolved.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kind Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sachin Garg&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 Dec 2010 19:49:43 GMT</pubDate>
      <guid>https://community.cisco.com/t5/application-networking/ace-4710-ldap-probe/m-p/1568836#M32111</guid>
      <dc:creator>sachinga.hcl</dc:creator>
      <dc:date>2010-12-17T19:49:43Z</dc:date>
    </item>
    <item>
      <title>Re: ACE 4710 LDAP probe</title>
      <link>https://community.cisco.com/t5/application-networking/ace-4710-ldap-probe/m-p/1568837#M32112</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sachinga,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #f8fafd;"&gt;I'm still trying to get all teams together to implement this.. the server team put this on hold for now.. and we won't be able to execute this change until the end of this year.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #f8fafd;"&gt;Anyways.. Thanks for your help.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #f8fafd;"&gt;Regards,&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Dec 2010 19:59:34 GMT</pubDate>
      <guid>https://community.cisco.com/t5/application-networking/ace-4710-ldap-probe/m-p/1568837#M32112</guid>
      <dc:creator>andrels</dc:creator>
      <dc:date>2010-12-21T19:59:34Z</dc:date>
    </item>
    <item>
      <title>Re: ACE 4710 LDAP probe</title>
      <link>https://community.cisco.com/t5/application-networking/ace-4710-ldap-probe/m-p/1568838#M32113</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I wanted to post about my experiences in getting this probe to work with Active Directory using credentials. I did not use the Perl script to generate the HEX string for the probe, but did a capture of LDAP traffic on the ACE appliance instead.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I had to copy the capture to disk0: before copying it to my PC in order to open it in Wireshark. In Wireshark, I copied the LDAP bind request as HEX and replaced the HEX value in the LDAP_PROBE script (in puts -nonewline $sock [ binary format "H*" &lt;EM&gt;HEXSTRINGINSERTEDHERE&lt;/EM&gt; ])&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I also had to change the script code related to the response because Active Directory did not have the "0a0100" response at the same offset. So I changed:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;#&amp;nbsp; read string back from server&lt;BR /&gt;ace_debug "receiving ldap bind result"&lt;BR /&gt;set line [read $sock 14]&lt;BR /&gt;binary scan $line H* res&lt;BR /&gt;binary scan $line @7H6 code&lt;BR /&gt;ace_debug "recived $res with code $code"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;#&amp;nbsp; read string back from server&lt;BR /&gt;ace_debug "receiving ldap bind result"&lt;BR /&gt;set line [read $sock 22]&lt;BR /&gt;binary scan $line H* res&lt;BR /&gt;binary scan $line @15H6 code&lt;BR /&gt;ace_debug "recived $res with code $code"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And now the probe works towards Active Directory using a username and password!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 Jan 2011 13:18:15 GMT</pubDate>
      <guid>https://community.cisco.com/t5/application-networking/ace-4710-ldap-probe/m-p/1568838#M32113</guid>
      <dc:creator>Erik Ingeberg</dc:creator>
      <dc:date>2011-01-27T13:18:15Z</dc:date>
    </item>
    <item>
      <title>Hello Erik,</title>
      <link>https://community.cisco.com/t5/application-networking/ace-4710-ldap-probe/m-p/1568839#M32114</link>
      <description>&lt;P&gt;Hello Erik,&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;can you help me little bit with the resolution? What that individual parameters mean and how did you get to those. I assume it's position where to read the string and what to expect, but could you translate it to someone like me?&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;Thank you&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 23 Feb 2016 16:28:55 GMT</pubDate>
      <guid>https://community.cisco.com/t5/application-networking/ace-4710-ldap-probe/m-p/1568839#M32114</guid>
      <dc:creator>Michal Mihaly</dc:creator>
      <dc:date>2016-02-23T16:28:55Z</dc:date>
    </item>
    <item>
      <title>Hi Michal,</title>
      <link>https://community.cisco.com/t5/application-networking/ace-4710-ldap-probe/m-p/1568840#M32115</link>
      <description>&lt;P&gt;Hi Michal,&lt;/P&gt;
&lt;P&gt;Time flies, it's been 5 years since I made that post. I tried to figure it out again, but I just don't have the time to do it. You are right though, the&amp;nbsp;@15H6 is the offset where the scan should begin, and the response the scan is looking for is "&lt;SPAN&gt;0a0100".&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;So if the offset is wrong, the script won't find the "&lt;SPAN&gt;0a0100" code, that's what you're looking for.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 24 Feb 2016 06:54:45 GMT</pubDate>
      <guid>https://community.cisco.com/t5/application-networking/ace-4710-ldap-probe/m-p/1568840#M32115</guid>
      <dc:creator>Erik Ingeberg</dc:creator>
      <dc:date>2016-02-24T06:54:45Z</dc:date>
    </item>
    <item>
      <title>No worries Erik,</title>
      <link>https://community.cisco.com/t5/application-networking/ace-4710-ldap-probe/m-p/1568841#M32116</link>
      <description>&lt;P&gt;No worries Erik,&lt;/P&gt;
&lt;P&gt;update - so it's not really "kosher" solution, but here is how you can trick it with regex search instead of exact position search. Hope this helps someone else.&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="font-family: courier new,courier,monospace;"&gt;#read 20B from the sock to the line variable&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="font-family: courier new,courier,monospace;"&gt;set line [read $sock 20]&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="font-family: courier new,courier,monospace;"&gt;#convert it to the hexa mode and into res variable&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier,monospace;"&gt;binary scan $line H* res&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="font-family: courier new,courier,monospace;"&gt;#predefine success respond&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="font-family: courier new,courier,monospace;"&gt;set suc 0a0100&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="font-family: courier new,courier,monospace;"&gt;#find suc in the res variable, return 30001 if found&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="font-family: courier new,courier,monospace;"&gt;if { [regexp -nocase $suc $res match] } {&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier,monospace;"&gt;&amp;nbsp;exit 30001&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier,monospace;"&gt;} else {&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier,monospace;"&gt;&amp;nbsp;exit 30002&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier,monospace;"&gt;}&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 01 Mar 2016 14:49:58 GMT</pubDate>
      <guid>https://community.cisco.com/t5/application-networking/ace-4710-ldap-probe/m-p/1568841#M32116</guid>
      <dc:creator>Michal Mihaly</dc:creator>
      <dc:date>2016-03-01T14:49:58Z</dc:date>
    </item>
    <item>
      <title>Hi Sachin,</title>
      <link>https://community.cisco.com/t5/application-networking/ace-4710-ldap-probe/m-p/1568842#M32117</link>
      <description>&lt;P&gt;Hi Sachin,&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;I am facing the some problem...when I tried to config probe with TCP port the SF getting error PROBE_FAILED on port 389 and 636.&lt;/P&gt;
&lt;P&gt;Probe &lt;STRONG&gt;tcp&lt;/STRONG&gt; VIS_389&lt;BR /&gt; port 389&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Probe &lt;STRONG&gt;tcp&lt;/STRONG&gt; VIS_636&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;port 636&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;&lt;SPAN&gt;But when I do UDP the SF is up...Operational.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;Also without probe on single port 389 its working config below:&lt;/P&gt;
&lt;P&gt;serverfarm host VIS_389&lt;BR /&gt; rserver VIS1 389&lt;BR /&gt; inservice&lt;BR /&gt; rserver VIS2 389&lt;BR /&gt; inservice&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;Regards&lt;/P&gt;
&lt;P&gt;Darshan P&lt;/P&gt;</description>
      <pubDate>Thu, 25 Aug 2016 08:20:49 GMT</pubDate>
      <guid>https://community.cisco.com/t5/application-networking/ace-4710-ldap-probe/m-p/1568842#M32117</guid>
      <dc:creator>darshan.dp1</dc:creator>
      <dc:date>2016-08-25T08:20:49Z</dc:date>
    </item>
  </channel>
</rss>

