<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 12 (filtered medium)">
<!--[if !mso]><style>v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style><![endif]--><style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
p
        {mso-style-priority:99;
        mso-margin-top-alt:auto;
        margin-right:0cm;
        mso-margin-bottom-alt:auto;
        margin-left:0cm;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
address
        {mso-style-priority:99;
        mso-style-link:"HTML Address Char";
        margin:0cm;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";
        font-style:italic;}
p.MsoAcetate, li.MsoAcetate, div.MsoAcetate
        {mso-style-priority:99;
        mso-style-link:"Balloon Text Char";
        margin:0cm;
        margin-bottom:.0001pt;
        font-size:8.0pt;
        font-family:"Tahoma","sans-serif";}
span.HTMLAddressChar
        {mso-style-name:"HTML Address Char";
        mso-style-priority:99;
        mso-style-link:"HTML Address";
        font-family:"Times New Roman","serif";
        font-style:italic;}
span.EmailStyle20
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
span.BalloonTextChar
        {mso-style-name:"Balloon Text Char";
        mso-style-priority:99;
        mso-style-link:"Balloon Text";
        font-family:"Tahoma","sans-serif";}
.MsoChpDefault
        {mso-style-type:export-only;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:72.0pt 90.0pt 72.0pt 90.0pt;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="2050" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-US" link="blue" vlink="purple">
<span class="ubtech-campaign-659211d3-a08f-4e8a-940d-6eaba6aaaa6f"> </span><br>
<div class="WordSection1">
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial","sans-serif"">Hi ,
<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial","sans-serif""><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial","sans-serif"">X-Forwarded-For will contain all ip addresses used to access your server from the outside (client > proxy > cdn > varnish > your web server)<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial","sans-serif""><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial","sans-serif"">The address varnish is seeing as source ip is the cdn server ip .<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial","sans-serif""><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial","sans-serif"">Most cdn networks have a special header custom for them that shoes the client ‘s real ip , you should use that header.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal" dir="RTL" style="text-align:right;direction:rtl;unicode-bidi:embed">
<span dir="LTR" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><img width="623" height="74" id="Picture_x0020_1" src="cid:image001.jpg@01CFC754.1D358220" alt="yariv_sig_outlook"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal"><b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">From:</span></b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif""> varnish-misc-bounces+yariv-h=yit.co.il@varnish-cache.org [mailto:varnish-misc-bounces+yariv-h=yit.co.il@varnish-cache.org]
<b>On Behalf Of </b>Hern?n Marsili<br>
<b>Sent:</b> Wednesday, September 03, 2014 4:25 AM<br>
<b>To:</b> varnish-misc<br>
<b>Subject:</b> X-Forwarded-For where?<o:p></o:p></span></p>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<div>
<p class="MsoNormal">Hi,I need to obtain the real ip the the client, not the ip of the CDN service. <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">I found example with this on the vcl_recv. Others with similar code o the vcl_miss and similar code on vcl_deliver.r<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">remove req.http.X-Forwarded-For; <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">set req.http.X-Forwarded-For = req.http.rlnclientipaddr; <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">I try them all, all of them work. But, which is the most efficient way? :)<o:p></o:p></p>
</div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<p class="MsoNormal">Saludos,<o:p></o:p></p>
</div>
<div>
<address><span style="font-style:normal">Hernán.</span><span style="font-size:9.0pt"><o:p></o:p></span></address>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<table style="width:100%;border:none;">
<tbody>
<tr>
<td style="width:30%; text-align:left;"></td>
<td style="width:40%; text-align:center;">
<div style="text-align:center;"><a href="http://my.ynet.co.il/short/content/2013/ynetnewsletter/index_2.aspx" target="_blank"><img src="cid:Banner1-d236.jpg" style="border:none;" alt="Banner"></a><br>
<a href="http://www.u-btech.com/products/xtrabanner/poweredby" target="_blank" style="color:#98989b;font-family:Arial;font-size:10px;letter-spacing:1px;text-decoration:none;"><span style="white-space:nowrap;">Powered by</span>
<span style="white-space:nowrap;">U‑BTech</span> <span style="white-space:nowrap;">
<span style="color:#b3d236; font-weight:bold;">XTRA</span>BANNER</span></a><br>
</div>
</td>
<td style="width:30%; text-align:right;"></td>
</tr>
</tbody>
</table>
</body>
</html>