I have a section on a website that blocks access to all IPs, except for those that are whitelisted. For IPv4, this is very simple, because even with dynamic IPs, they generally won't changed for months, or even years.
However, with IPv6, these seem to alternate every 24 hours or so. This means that I can't simply whitelist the initial IPv6 IP and call it good, because it'll just change again too quickly. Therefore, I need to whitelist a whole range. Even after reading about and testing IPv6 over the past couple of days, I'm still not confident I've got a handle on it.
Here's what I've got:
order deny,allow
allow from 1234:123:4567:ab1::/64
deny from all
The first 4 sections of the IP address never change, but the last 4 sections constantly change. Is this the correct way to whitelist an individual's IP in this context?
Order,AllowandDenydirectives are officially deprecated on Apache 2.4. Backwards compatibility is maintained to ease migration from 2.2 to 2.4. You should update these directives to use mod_authz_host instead - but note that you should update all relevant directives on your system as the old and new methods aren't necessarily compatible. – MrWhite Mar 17 '19 at 23:43