Skip to main content

restricting access to page by IP not working

Comments

7 comments

  • GOT
    You can't put it in like that. You would put a range like that as 102.68.0.0/16
    0
  • chanklish
    You can't put it in like that. You would put a range like that as 102.68.0.0/16

    But i want to allow only one public IP address .. i added the ip with the range and it did not work ..ive even restarted the apache server in vain
    0
  • chanklish
    no answer ?!
    0
  • GOT
    Looks right to me assuming xx.xx are numbers and assuming login.php is the file you are trying to restrict access to.
    0
  • chanklish
    Looks right to me assuming xx.xx are numbers and assuming login.php is the file you are trying to restrict access to.

    yes the xx.xx are a completion of my public ip - but still it doesnt work i tried other ip as well .. same issue .. it keeps blocking me
    0
  • cPanelLauren
    Technically Apache 2.4 uses Require now not allow/deny but it should still be usable. [QUOTE=http://httpd.apache.org/docs/2.2/mod/mod_authz_host.html#order]The Order directive, along with the Deny directives, controls a three-pass access control system. The first pass processes either all Deny directives, as specified by the Order directive. The second pass parses the rest of the directives (Allow). The third pass applies to all requests which do not match either of the first two. Note that all Deny directives are processed, unlike a typical firewall, where only the first match is used. The last match is effective (also unlike a typical firewall). Additionally, the order in which lines appear in the configuration files is not significant -- all Deny lines are considered as another, and the default state is considered by itself.
    My assumption is that you don't have the correct IP in the allow from portion. If you wanted to learn more about Require directives you can find them here: mod_authz_host - Apache HTTP Server Version 2.4
    0
  • chanklish
    Technically Apache 2.4 uses Require now not allow/deny but it should still be usable. My assumption is that you don't have the correct IP in the allow from portion. If you wanted to learn more about Require directives you can find them here:
    0

Please sign in to leave a comment.