I'm running an ALB on AWS with multiple SSL certificates. The domain name is dynamically handled via the application on EC2. Currently, the ALB will route requests to the IP address of the ALB to the application. Even though the application has an appropriate exception for these queries, this causes unnecessary log entries in all of the request logs and WAF.
My first two thoughts were…
- Add a listener rule that blocks IP addresses. Unfortunately, the only way I see to do that is to have a Host header filter on
*.*.*.*
. That won't work as we could be serving a site forsite.group.example.com
. - Only forward request to the target group if the Host header matches one of the SSL Certificates attached to the Listener. The problem here is that I can't find any way to execute this kind of rule.