title: Tomcat Remote Address filter doesn't work
body: <p>I seem to have a problem which it seems easy but i can't find a solution , although similar threads are opened hear.
  Well , i want to deny access to a  url which contains a pdf:
  attica.unipi.gr:8080/xmlui/bitstream/handle/123456789/5/a3iologisi%20genika.pdf?sequence=1</p>
  
  <p>Keep in mind that this is not a solid url but this part of it -->           /123456789/5/a3iologisi%20genika.pdf?sequence=1 , is generated dynamically ,depending on which pdf the user clicks to see.</p>
  
  <p>So , based on this :
  <a href="http://tomcat.apache.org/tomcat-7.0-doc/config/filter.html#Remote_Address_Filter" rel="nofollow">http://tomcat.apache.org/tomcat-7.0-doc/config/filter.html#Remote_Address_Filter</a> , i tried this:    </p>
  
  <pre><code>&lt;filter&gt;
    &lt;filter-name&gt;Remote Address Filter&lt;/filter-name&gt;
    &lt;filter-class&gt;org.apache.catalina.filters.RemoteAddrFilter&lt;/filter-class&gt;
    &lt;init-param&gt;
      &lt;param-name&gt;deny&lt;/param-name&gt;
      &lt;param-value&gt;127\.\d+\.\d+\.\d+|::1|0:0:0:0:0:0:0:1&lt;/param-value&gt;
    &lt;/init-param&gt;
  &lt;/filter&gt;
  &lt;filter-mapping&gt;
    &lt;filter-name&gt;Remote Address Filter&lt;/filter-name&gt;
    &lt;url-pattern&gt;/xmlui/bitstream/handle/*/*/*&lt;/url-pattern&gt;
  &lt;/filter-mapping&gt;
  </code></pre>
  
  <p>But still dosen't work.I believe that this is a url-pattern issue so i tried changing the pattern as </p>
  
  <pre><code>/xmlui/bitstream/handle/*/*/*pdf
  </code></pre>
  
  <p>or</p>
  
  <pre><code>/attica.unipi.gr:8080/xmlui/bitstream/handle/*/*/*
  </code></pre>
  
  <p>But still no luck.
  It either restricts access to the whole site or does nothing at all.</p>
  
  <p>Any suggestions?</p>
  
  <p>Thank you !!</p>