<div dir="ltr"><div>Hi Steve,</div><div><br></div><div>thx for your test.</div><div>I do more test to try to understand better what I'm wrong.</div><div><br></div><div>Just to do a better with an more large IP range.</div><div>Is possibile to use the IP/CIDR sintax to describe the IP range or need to list all the IP denied ?</div><div><br></div><div>A.</div><div><br></div><div>Thx,</div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Il giorno mer 31 lug 2019 alle ore 23:50 Lime, Steve D (MNIT) <<a href="mailto:steve.lime@state.mn.us">steve.lime@state.mn.us</a>> ha scritto:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div lang="EN-US">
<div class="gmail-m_-1631037143857842843WordSection1">
<p class="MsoNormal"><span style="font-size:11pt;font-family:"Calibri",sans-serif;color:rgb(31,73,125)">Hi Andrea: I just tested with MapServer 6.4 and 7.4 and it works as expected, at least with WMS GetMap requests. My process was:<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11pt;font-family:"Calibri",sans-serif;color:rgb(31,73,125)"><u></u> <u></u></span></p>
<p class="gmail-m_-1631037143857842843MsoListParagraph"><u></u><span style="font-size:11pt;font-family:"Calibri",sans-serif;color:rgb(31,73,125)"><span>1.<span style="font:7pt "Times New Roman"">
</span></span></span><u></u><span style="font-size:11pt;font-family:"Calibri",sans-serif;color:rgb(31,73,125)">Make a WMS request and check the logs to confirm the IP I was showing up as.<u></u><u></u></span></p>
<p class="gmail-m_-1631037143857842843MsoListParagraph"><u></u><span style="font-size:11pt;font-family:"Calibri",sans-serif;color:rgb(31,73,125)"><span>2.<span style="font:7pt "Times New Roman"">
</span></span></span><u></u><span style="font-size:11pt;font-family:"Calibri",sans-serif;color:rgb(31,73,125)">Edit the mapfile and add “ows_denied_ip_list” “my IP” to the WEB METADATA section.<u></u><u></u></span></p>
<p class="gmail-m_-1631037143857842843MsoListParagraph"><u></u><span style="font-size:11pt;font-family:"Calibri",sans-serif;color:rgb(31,73,125)"><span>3.<span style="font:7pt "Times New Roman"">
</span></span></span><u></u><span style="font-size:11pt;font-family:"Calibri",sans-serif;color:rgb(31,73,125)">Perform the same WMS request in the browser – result was a WMS exception.<u></u><u></u></span></p>
<p class="gmail-m_-1631037143857842843MsoListParagraph"><u></u><span style="font-size:11pt;font-family:"Calibri",sans-serif;color:rgb(31,73,125)"><span>4.<span style="font:7pt "Times New Roman"">
</span></span></span><u></u><span style="font-size:11pt;font-family:"Calibri",sans-serif;color:rgb(31,73,125)">Edit the mapfile and change the ip slightly so it shouldn’t match but leaving the directive in place.<u></u><u></u></span></p>
<p class="gmail-m_-1631037143857842843MsoListParagraph"><u></u><span style="font-size:11pt;font-family:"Calibri",sans-serif;color:rgb(31,73,125)"><span>5.<span style="font:7pt "Times New Roman"">
</span></span></span><u></u><span style="font-size:11pt;font-family:"Calibri",sans-serif;color:rgb(31,73,125)">Perform the same WMS request in the browser – result was a PNG image.<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11pt;font-family:"Calibri",sans-serif;color:rgb(31,73,125)"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11pt;font-family:"Calibri",sans-serif;color:rgb(31,73,125)">I did tried multiple IPs in the list, with and without my IP and everything worked as expected. I did not try using an external file. I did notice with my IP
in the list a GetMap request was blocked, a GetCapabilities request was not. I didn’t try a GetFeature… request.
<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11pt;font-family:"Calibri",sans-serif;color:rgb(31,73,125)"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11pt;font-family:"Calibri",sans-serif;color:rgb(31,73,125)">Makes me wonder if you have the right IP for your test setup?<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11pt;font-family:"Calibri",sans-serif;color:rgb(31,73,125)"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11pt;font-family:"Calibri",sans-serif;color:rgb(31,73,125)">--Steve<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11pt;font-family:"Calibri",sans-serif;color:rgb(31,73,125)"><u></u> <u></u></span></p>
<div>
<div style="border-color:rgb(225,225,225) currentcolor currentcolor;border-style:solid none none;border-width:1pt medium medium;padding:3pt 0in 0in">
<p class="MsoNormal"><b><span style="font-size:11pt;font-family:"Calibri",sans-serif">From:</span></b><span style="font-size:11pt;font-family:"Calibri",sans-serif"> Andrea Peri [mailto:<a href="mailto:aperi2007@gmail.com" target="_blank">aperi2007@gmail.com</a>]
<br>
<b>Sent:</b> Tuesday, July 30, 2019 2:30 PM<br>
<b>To:</b> Lime, Steve D (MNIT) <<a href="mailto:steve.lime@state.mn.us" target="_blank">steve.lime@state.mn.us</a>>; <a href="mailto:mapserver-users@lists.osgeo.org" target="_blank">mapserver-users@lists.osgeo.org</a><br>
<b>Subject:</b> Re: [mapserver-users] ows_denied_ip_list is working ?<u></u><u></u></span></p>
</div>
</div>
<div>
<div>
<div>
<div>
<p class="MsoNormal"><span style="color:rgb(31,73,125)"><u></u> <u></u></span></p>
<p class="MsoNormal">Hi, <u></u><u></u></p>
<div>
<p class="MsoNormal">I was using a compiled version from a recent clone of master .<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">I try to apply ot to WEB-> METADATA section section using this kind of values:<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">I try to use a list of IP directly listed using a space as separator<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"> "ows_denied_ip_list" "xxx.xxx.xxx.xxx yyy.yyy.yyy.yyy zzz.zzz.zzz.zzz"<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">or using a file where there is the same list one IP for line<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal"> "ows_denied_ip_list" "file:/path-to-file/file-with-ip-list.txt"<u></u><u></u></p>
</div>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">The values listed are the possibly values of our proxy.<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">So I guess setting them as denied IP mapserver should refuse to give a map to every client wms using them.<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">Instead the map are still showed.<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<p class="MsoNormal">I'm using QGIS as wms client to test it. <u></u><u></u></p>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">A.<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
<div>
<div>
<p class="MsoNormal">Il mar 30 lug 2019, 04:21 Lime, Steve D (MNIT) <<a href="mailto:steve.lime@state.mn.us" target="_blank">steve.lime@state.mn.us</a>> ha scritto:<u></u><u></u></p>
</div>
<blockquote style="border-color:currentcolor currentcolor currentcolor rgb(204,204,204);border-style:none none none solid;border-width:medium medium medium 1pt;padding:0in 0in 0in 6pt;margin-left:4.8pt;margin-right:0in">
<div>
<p class="MsoNormal">I will test and reply back. What specific version, config and tests did you try on your end?
<u></u><u></u></p>
<div class="MsoNormal" style="text-align:center" align="center">
<hr width="98%" size="2" align="center">
</div>
<div id="gmail-m_-1631037143857842843m_2002463097308667229m_5445384429835573839divRplyFwdMsg">
<p class="MsoNormal"><b><span style="font-size:11pt;font-family:"Calibri",sans-serif;color:black">From:</span></b><span style="font-size:11pt;font-family:"Calibri",sans-serif;color:black"> mapserver-users <<a href="mailto:mapserver-users-bounces@lists.osgeo.org" target="_blank">mapserver-users-bounces@lists.osgeo.org</a>>
on behalf of Andrea Peri <<a href="mailto:aperi2007@gmail.com" target="_blank">aperi2007@gmail.com</a>><br>
<b>Sent:</b> Saturday, July 27, 2019 9:02:07 AM<br>
<b>To:</b> <a href="mailto:mapserver-users@lists.osgeo.org" target="_blank">mapserver-users@lists.osgeo.org</a> <<a href="mailto:mapserver-users@lists.osgeo.org" target="_blank">mapserver-users@lists.osgeo.org</a>><br>
<b>Subject:</b> [mapserver-users] ows_denied_ip_list is working ?</span> <u></u><u></u></p>
<div>
<p class="MsoNormal"> <span style="color:rgb(31,73,125)"><u></u><u></u></span></p>
</div>
</div>
<div>
<div>
<div>
<div>
<p class="MsoNormal">Hi,<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">I see my version of mapserver don't work the ows_denied_ip_list.<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">I see ths other mex:<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><a href="https://gcc01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fosgeo-org.1560.x6.nabble.com%2Fows-allowed-ip-list-ows-denied-ip-list-not-working-td5202667.html&data=02%7C01%7CSteve.Lime%40state.mn.us%7Ca2bef76fd62f471db1e608d715245908%7Ceb14b04624c445198f26b89c2159828c%7C0%7C0%7C637001118169695729&sdata=PWJxX4BJMhOodJ7FadppgR%2F3XAk9lLW%2FHJadeWehSRQ%3D&reserved=0" target="_blank">http://osgeo-org.1560.x6.nabble.com/ows-allowed-ip-list-ows-denied-ip-list-not-working-td5202667.html</a><u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">I try all the same option but nothing is work.<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">So I guess that instead that the ows_denied_ip_list was dismissed.<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">Is this confirmed ?<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">Thx.<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">A.<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal"><br>
-- <u></u><u></u></p>
<div>
<p class="MsoNormal">-----------------<br>
Andrea Peri<br>
. . . . . . . . . <br>
qwerty àèìòù<br>
-----------------<u></u><u></u></p>
</div>
</div>
</div>
</div>
</div>
</div>
</blockquote>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</blockquote></div><br clear="all"><br>-- <br><div dir="ltr" class="gmail_signature">-----------------<br>Andrea Peri<br>. . . . . . . . . <br>qwerty àèìòù<br>-----------------<br></div>