We want to block access for unknown ip-addresses to specific subdomains.
We are using one aws application loadbalancer that forwards (subdomain) traffic to specific ECS target groups. Some of these subdomains should not be accessable by unknown ip-addresses.
I considered using AWS WAF to block the ip’s but it looks like i cant specify to which subdomains the rule should apply.
2
Answers
That’s correct. You can’t block "access" to dns name. Internet does not work like that. You have to block access to resources pointed to by the dns name, such as an ec2 instance or load balancer. But anyone will always be able to "access" your domain.
I think you simply need to use security groups and then specify the ips allowed to access the subdomains resources.