Mobile app version of vmapp.org
Login or Join
Bryan171

: .htaccess: allow from - using dynamic IP - defining the static portion of my IP? I'm looking to secure my phpMyAdmin dir from being accessed from other IPs than my own, albeit dynamic IP,

@Bryan171

Posted in: #Apache #Dynamic #Htaccess #IpAddress

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.

10.01% popularity Vote Up Vote Down


Login to follow query

More posts by @Bryan171

1 Comments

Sorted by latest first Latest Oldest Best

 

@Rivera981

Yes, if your subnet mask is 255.255.255.0 then:

allow from 191.164.1.0/24


Will allow all hosts in that subnet. 192.164.1.1, 192.164.1.2, 192.164.1.254

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme