Daniel Francis Daniel Francis - 8 months ago 69
Linux Question

Adding an ipv6 address to "require ip" in phpmyadmin.conf in linux

I'm trying to edit

such that it only allows an ip.

I have this which works when my router is set to only allow ipv4 addresses:

<IfModule mod_authz_core.c>
# Apache 2.4
Require ip 111.222.333.444
Require ip ::1
<IfModule !mod_authz_core.c>
# Apache 2.2
Order Deny,Allow
Deny from All
Allow from 111.222.333.444
Allow from ::1

I want to add an ipv6 address, but it only works when I add an entire ipv6 address (replacing ::1). ie

However, my ipv6 address changes on reboot. So I want to add a limited address.

I've tried:




and all the variants of the above.

but none work (in fact, phpmyadmin won't restart)

Is there a way to do this? Thanks :)


The supported syntaxes are, for Apache 2.2 and 2.4 respectively:

Allow from 1111:2222:3333:4444::/64

Require ip 1111:2222:3333:4444::/64

The syntax you were trying was probably missing the terminal ::, which was causing the base IPv6 address to be invalid. (It'd be comparable to trying to write 1.2.3/24 instead of