Now that NAT is no longer necessary, clients can have their own addresses for end to end communications. However that means more IPs than can fit in one name for Require forward-dns
If you control both forward and reverse DNS, its possible to do something like Require host .client.example.net
Reverse DNS that ends with that label, and is validated by a forward lookup, can proceed.
You mentioned you do not like IP addresses in httpd config files. For completeness, they can be networks: Require ip 2001:db8:2:1::/64
Note the address space is big enough that a site can have as many /64s as they need, and each can fit as many hosts as you want. This only will be a reasonably short allow list if clients are naturally organized a relatively small number of subnets.
As mod_authz_host currently works, forward-dns
and host
are working on the full IP address, not nets. forward-dns
allows multiple hosts from multiple IPs retrieved from that DNS name. host
allows multiple through partial name matching. Explore what it would take to change the code to accommodate parsing a network from DNS. Maintain your own modifications to mod_authz_host or start a new module.
Include
directive works in directory context. You can have a common file for each unique Require
you use. Only need to update in one place.
IP address is not strong authentication. Users are not providing a credential, only IP headers which can be forged. IP allow lists can provide a sanity check against network traffic you do not expect. Any actual proof of user identity requires real auth, however.