I'm looking to secure my phpMyAdmin dir from being accessed from other IPs than my own, albeit dynamic IP, let's say it is 191.164.1.xxx (xxx = being dynamic numbers).

Referring to the Apache directive allow from in .htaccess files, can I define only the first static numbers in order to allow anything starting with the defined IP numbers and let it accept any numbers in the same fashion a wildcard works in other contexts?

E.g. would would something like this work? : allow from 191.164.1.


Yes, if your subnet mask is then:

    allow from

Will allow all hosts in that subnet.,,

  • Thanks. Just a dumb question, the ending 24, should be 254, right? – Henrik Apr 30 '12 at 15:01
  • 1
    No. That is CIDR notation. It is based off your network mask. You can cross reference yours with this list. old.tamasrepus.hotnudiegirls.com/pages/… – dennis.hempler Apr 30 '12 at 15:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.