title: Why does request.getRemoteAddr().equals("127.0.0.1") when accessing from a remote machine
body: <p>I have a Java servlet application running within Tomcat, there is one admin command that I only want to be able to run from the machine itself (or possibly my own pc as well) for security reasons. So to enforce this I check the remote address of the HttpServletRequest that I receive but <strong>it always returns 127.0.0.1 even though the request is not coming from the local host</strong></p>
  
  <p>Why is this, can I fix it or is there an alternative way to run my admin command only from the server. </p>