- Newest
- Most votes
- Most comments
Yes, the AWS Network Firewall solution you're referring to can be modified to accept and resolve multiple hostnames. The current CloudFormation template is designed for a single domain, but it can be adapted to handle multiple domains with some modifications.
To achieve this, you would need to make several changes to the existing setup:
-
Modify the Lambda function to accept a list of domains instead of a single domain. This could be done by changing the input parameter to an array or a comma-separated string of domains.
-
Update the DNS lookup logic in the Lambda function to iterate through the list of domains, perform DNS lookups for each, and collect all the resolved IP addresses.
-
Adjust the IP Set update process to include all the IP addresses resolved from multiple domains.
-
Change the CloudFormation template to allow input of multiple domains, perhaps as a comma-separated parameter or as a list type parameter.
-
Consider adding a DynamoDB table or a similar persistent storage to maintain the list of domains. This would allow you to easily update the domain list without modifying the CloudFormation stack.
-
Implement a mechanism to trigger the Lambda function periodically or on-demand to refresh the IP Set with the latest resolved IP addresses for all domains in your list.
By making these modifications, you can create a more flexible solution that allows you to manage multiple domains and keep the Network Firewall rules updated with their corresponding IP addresses. This approach would enable you to easily add, remove, or modify domains in your list as needed, providing a more scalable solution for your environment.
Remember to test thoroughly after making these changes to ensure that the Network Firewall rules are correctly updated for all your specified domains.
Sources
Use Network Firewall to capture the DNS domain names from the Server Name Indication (SNI) for outbound traffic - AWS Prescriptive Guidance
Welcome - AWS Network Firewall
What is AWS Network Firewall? - AWS Network Firewall
Relevant content
- asked 3 years ago
- asked a month ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated 2 years ago