<html>
  <head>
    <meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <div class="moz-cite-prefix">On 07/12/2013 03:25 PM, Justin Kinney
      wrote:<br>
    </div>
    <blockquote
cite="mid:CALC_4EgSAGeeeaiOFhWF3uLfr-CX6COJW_PSvGMrnd9kpwnsoA@mail.gmail.com"
      type="cite">
      <div dir="ltr">
        <div>
          <div>Hello,<br>
            <br>
          </div>
          I'm investigating the possibility of logging client IP address
          where 389ds is deployed behind a load balancer. Today, we lose
          the true client IP address as the source IP is replaced with
          the load balancer's before the packet hits the 389 host. Has
          anybody solved this issue before?<br>
          <br>
        </div>
        <div>For HTTP based services, this problem is trivial to
          overcome by grokking the X-Forwarded-For header from the
          request, but obviously this doesn't work with a service like
          LDAP deployed behind a TCP based load balancing instance.<br>
        </div>
        <div><br>
        </div>
        <div>One option is to use a direct server return (DSR)
          configuration with our load balancer and host, but that adds a
          lot of overhead to our environment in terms of configuration
          complexity, so I'd like to avoid that.<br>
          <br>
        </div>
        <div>Another option is using an interesting capability of our
          load balancer (and I'm not sure how unique this feature is -
          I'd be interested in hearing if anyone else has run across
          it). It can insert the client IP address into the TCP stream,
          as arbitrary data in the options field of the TCP header.
          Existence of an address is also indicated by a magic number
          (which can uniquely identify the VIP on the load balancer).<br>
          <br>
        </div>
        What would it take to modify 389 to access the raw TCP header,
        parse the options field to get the true client IP, and then
        associate it with the request? Ideally, the client IP would be
        accessible in the access log.<br>
      </div>
    </blockquote>
    <br>
    I don't know - what are the TCP/IP/socket API calls that are
    required to get this data?<br>
    <br>
    <blockquote
cite="mid:CALC_4EgSAGeeeaiOFhWF3uLfr-CX6COJW_PSvGMrnd9kpwnsoA@mail.gmail.com"
      type="cite">
      <div dir="ltr">
        <br>
        Thanks in advance,<br>
        Justin</div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">--
389 users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:389-users@lists.fedoraproject.org">389-users@lists.fedoraproject.org</a>
<a class="moz-txt-link-freetext" href="https://admin.fedoraproject.org/mailman/listinfo/389-users">https://admin.fedoraproject.org/mailman/listinfo/389-users</a></pre>
    </blockquote>
    <br>
  </body>
</html>