Re: [EP-tech] eprints XFF header

"Newman D.R. via Eprints-tech" <[email protected]> Mon, 11 Nov 2019 09:22:03 +0000
Newsgroups gmane.comp.web.eprints.devel
Message-ID <EMEW3|19e4d1b996b990b20f10daa2ed1eb5aevAA9MZ03drn|ecs.soton.ac.uk|[email protected]>
--===============9021631808265812700==
Content-Language: en-US
Content-Type: multipart/alternative;
	boundary="_000_0afe245b5deed1956c6cc74ae86d30f7ecssotonacuk_"

--_000_0afe245b5deed1956c6cc74ae86d30f7ecssotonacuk_
Content-Type: text/plain; charset="Windows-1252"
Content-Transfer-Encoding: quoted-printable

Hi Maher,

I am not aware of anything with EPrints that would prevent you using a stan=
dard approach to acheiving Apache logging of client IP addresses when using=
 a load balancer.  There are plenty of guides online giving advice about ho=
w to do this, such as:

http://www.loadbalancer.org/blog/apache-and-x-forwarded-for-headers/<https:=
//eur03.safelinks.protection.outlook.com/?url=3Dhttp%3A%2F%2Fwww.loadbalanc=
er.org%2Fblog%2Fapache-and-x-forwarded-for-headers%2F&data=3D01%7C01%7C%7C2=
a94cb31e91b4ed0451808d766889d0b%7C4a5378f929f44d3ebe89669d03ada9d8%7C0&sdat=
a=3DTK%2BBKYriHNQB9iHLIBBrCGOC0BheeZ1OEonyx3kauZ8%3D&reserved=3D0>

For the purposes of determining the IP address for the access table in the =
EPrints database, which logs views of summary/abstract pages and downloads =
of publication documents, it should determine the originating IP address.  =
Therefore, if you have the IRStats2 Bazaar plugin, your stats page should a=
ccurately reflect from where requests are actually coming.

Regards

David Newman

On 11/11/2019 09:03, Maher Abdellatif Ahmad Qahwash via Eprints-tech wrote:
Hi

Our Eprints (3.4.1) server is behind the F5 LB, and the client IP=92s are a=
vailable in the XFF header. As per our policy requirement, we need to log t=
hese IP=92s in the apache access log. Can someone guide me on how to do tha=
t? Also do the eprints application uses XFF header or not?

Thanks,
Maher



*** Options: http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech
*** Archive: http://www.eprints.org/tech.php/<https://eur03.safelinks.prote=
ction.outlook.com/?url=3Dhttp%3A%2F%2Fwww.eprints.org%2Ftech.php%2F&data=3D=
01%7C01%7C%7C2a94cb31e91b4ed0451808d766889d0b%7C4a5378f929f44d3ebe89669d03a=
da9d8%7C0&sdata=3DilUgz94fGxBq8rw7tNzNhe4%2BNWPCAmbeHBxncXM3kAo%3D&reserved=
=3D0>
*** EPrints community wiki: http://wiki.eprints.org/<https://eur03.safelink=
s.protection.outlook.com/?url=3Dhttp%3A%2F%2Fwiki.eprints.org%2F&data=3D01%=
7C01%7C%7C2a94cb31e91b4ed0451808d766889d0b%7C4a5378f929f44d3ebe89669d03ada9=
d8%7C0&sdata=3Dp1B54L2Q9TGlMOOSRWf21hTVtQLw8%2BI%2Fwr22b3nTkCg%3D&reserved=
=3D0>
*** EPrints developers Forum: http://forum.eprints.org/<https://eur03.safel=
inks.protection.outlook.com/?url=3Dhttp%3A%2F%2Fforum.eprints.org%2F&data=
=3D01%7C01%7C%7C2a94cb31e91b4ed0451808d766889d0b%7C4a5378f929f44d3ebe89669d=
03ada9d8%7C0&sdata=3D%2B3Z81wkmwSiodJhZwRoXQvEWZBxWj3qrOGPW6oTXcRI%3D&reser=
ved=3D0>


--_000_0afe245b5deed1956c6cc74ae86d30f7ecssotonacuk_
Content-Type: text/html; charset="Windows-1252"
Content-ID: <[email protected]>
Content-Transfer-Encoding: quoted-printable

<html>
<head>
<meta http-equiv=3D"Content-Type" content=3D"text/html; charset=3DWindows-1=
252">
</head>
<body text=3D"#000000" bgcolor=3D"#FFFFFF">
<p>Hi Maher,</p>
<p>I am not aware of anything with EPrints that would prevent you using a s=
tandard approach to acheiving Apache logging of client IP addresses when us=
ing a load balancer.&nbsp; There are plenty of guides online giving advice =
about how to do this, such as:</p>
<p><a class=3D"moz-txt-link-freetext" href=3D"https://eur03.safelinks.prote=
ction.outlook.com/?url=3Dhttp%3A%2F%2Fwww.loadbalancer.org%2Fblog%2Fapache-=
and-x-forwarded-for-headers%2F&amp;data=3D01%7C01%7C%7C2a94cb31e91b4ed04518=
08d766889d0b%7C4a5378f929f44d3ebe89669d03ada9d8%7C0&amp;sdata=3DTK%2BBKYriH=
NQB9iHLIBBrCGOC0BheeZ1OEonyx3kauZ8%3D&amp;reserved=3D0" originalsrc=3D"http=
://www.loadbalancer.org/blog/apache-and-x-forwarded-for-headers/" shash=3D"=
a9FuQoA19P4UkV1VUi0gYknGP8qFkCiTt3lQHfZDISYzb9edZXwa&#43;makcUdMfn1TQCLp3Kp=
gZdQl68Tliqi16HbPsNKlwe8B7CBe&#43;nw1Bp6oISDo6jxB/zJPVVoQUjXHRA9pdVjqQh7Gpr=
y6adUUuOS1BHebOPxXVxVHgO5x8VY=3D">http://www.loadbalancer.org/blog/apache-a=
nd-x-forwarded-for-headers/</a></p>
<p>For the purposes of determining the IP address for the access table in t=
he EPrints database, which logs views of summary/abstract pages and downloa=
ds of publication documents, it should determine the originating IP address=
.&nbsp; Therefore, if you have the IRStats2
 Bazaar plugin, your stats page should accurately reflect from where reques=
ts are actually coming.</p>
<p>Regards</p>
<p>David Newman<br>
</p>
<div class=3D"moz-cite-prefix">On 11/11/2019 09:03, Maher Abdellatif Ahmad =
Qahwash via Eprints-tech wrote:<br>
</div>
<blockquote type=3D"cite" cite=3D"mid:EMEW3|28f9d25173b357015910e1958f80bf0=
9vAA93j14eprints-tech-bounces|ecs.soton.ac.uk|513e013875f14299964a1e1a9ec2c=
[email protected]">
<meta name=3D"Generator" content=3D"Microsoft Word 14 (filtered
        medium)">
<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;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
	{margin:0in;
	margin-bottom:.0001pt;
	font-size:11.0pt;
	font-family:"Calibri","sans-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;}
span.EmailStyle17
	{mso-style-type:personal-compose;
	font-family:"Calibri","sans-serif";
	color:windowtext;}
.MsoChpDefault
	{mso-style-type:export-only;
	font-family:"Calibri","sans-serif";}
@page WordSection1
	{size:8.5in 11.0in;
	margin:1.0in 1.25in 1.0in 1.25in;}
div.WordSection1
	{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext=3D"edit" spidmax=3D"1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext=3D"edit">
<o:idmap v:ext=3D"edit" data=3D"1" />
</o:shapelayout></xml><![endif]-->
<div class=3D"WordSection1">
<p class=3D"MsoNormal">Hi<o:p></o:p></p>
<p class=3D"MsoNormal"><o:p>&nbsp;</o:p></p>
<p class=3D"MsoNormal">Our Eprints (3.4.1) server is behind the F5 LB, and =
the client IP=92s are available in the XFF header. As per our policy requir=
ement, we need to log these IP=92s in the apache access log. Can someone gu=
ide me on how to do that? Also do the
 eprints application uses XFF header or not?<o:p></o:p></p>
<p class=3D"MsoNormal"><o:p>&nbsp;</o:p></p>
<p class=3D"MsoNormal">Thanks,<o:p></o:p></p>
<p class=3D"MsoNormal">Maher<o:p></o:p></p>
</div>
<br>
<fieldset class=3D"mimeAttachmentHeader"></fieldset>
<pre class=3D"moz-quote-pre" wrap=3D"">*** Options: <a class=3D"moz-txt-lin=
k-freetext" href=3D"http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints=
-tech">http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech</a>
*** Archive: <a class=3D"moz-txt-link-freetext" href=3D"https://eur03.safel=
inks.protection.outlook.com/?url=3Dhttp%3A%2F%2Fwww.eprints.org%2Ftech.php%=
2F&amp;data=3D01%7C01%7C%7C2a94cb31e91b4ed0451808d766889d0b%7C4a5378f929f44=
d3ebe89669d03ada9d8%7C0&amp;sdata=3DilUgz94fGxBq8rw7tNzNhe4%2BNWPCAmbeHBxnc=
XM3kAo%3D&amp;reserved=3D0" originalsrc=3D"http://www.eprints.org/tech.php/=
" shash=3D"pZ1ge7pcp4fiKuabIcNqfFHw4SABA&#43;R6&#43;TPriLt6h9dSWv&#43;tDShj=
RvGmxg2d1oLbTNCRkCm0Lqgkpe/YoCoS05uoEBA/aP5TTXBTbt0dZc8OgEjKzkIdCTOFBWHGOpg=
ppGcgbEH2hZ53gkGYV0poYL6sse0tK9/&#43;Q6Jb&#43;J5gIgQ=3D">http://www.eprints=
.org/tech.php/</a>
*** EPrints community wiki: <a class=3D"moz-txt-link-freetext" href=3D"http=
s://eur03.safelinks.protection.outlook.com/?url=3Dhttp%3A%2F%2Fwiki.eprints=
.org%2F&amp;data=3D01%7C01%7C%7C2a94cb31e91b4ed0451808d766889d0b%7C4a5378f9=
29f44d3ebe89669d03ada9d8%7C0&amp;sdata=3Dp1B54L2Q9TGlMOOSRWf21hTVtQLw8%2BI%=
2Fwr22b3nTkCg%3D&amp;reserved=3D0" originalsrc=3D"http://wiki.eprints.org/"=
 shash=3D"U00e6kTmqkzyGut/3xnSRt1NXlx6&#43;ajE1arbciWeVR9E&#43;tD7vXMqKl0VX=
F5rC9J/D9AWUUFEfP8SKIO1XH0K8hkC7lg83WdVdLc8D/rDcgfm1qjk3wQP1skGT1db9i&#43;a=
CJbb6Kttsh3yCEq2pw8Ce6tW6QQlApglEvARviV1zCM=3D">http://wiki.eprints.org/</a=
>
*** EPrints developers Forum: <a class=3D"moz-txt-link-freetext" href=3D"ht=
tps://eur03.safelinks.protection.outlook.com/?url=3Dhttp%3A%2F%2Fforum.epri=
nts.org%2F&amp;data=3D01%7C01%7C%7C2a94cb31e91b4ed0451808d766889d0b%7C4a537=
8f929f44d3ebe89669d03ada9d8%7C0&amp;sdata=3D%2B3Z81wkmwSiodJhZwRoXQvEWZBxWj=
3qrOGPW6oTXcRI%3D&amp;reserved=3D0" originalsrc=3D"http://forum.eprints.org=
/" shash=3D"uIpRBDsJ8YOZDWvjCqwMGPrDJUUM0ynbuYjTC20Iy2AvChSWKnU2QM8JKRIJEFH=
qU1&#43;DJoXbkDl&#43;PSLDjNPvuGLAUcQs0Il3SOJ8bO9RjojBnH61j/sH2Dfq5T2kKXBPiK=
YE8IffkWaSyFrVWQrtXtcUmGcCRRgFp/y6OQ1QpLQ=3D">http://forum.eprints.org/</a>
</pre>
</blockquote>
</body>
</html>

--_000_0afe245b5deed1956c6cc74ae86d30f7ecssotonacuk_--

--===============9021631808265812700==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

*** Options: http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech
*** Archive: http://www.eprints.org/tech.php/
*** EPrints community wiki: http://wiki.eprints.org/
*** EPrints developers Forum: http://forum.eprints.org/

--===============9021631808265812700==--