You need to allow outbound traffic only to specific domains from a private subnet. How?
IntermediateScenarioSecurity: Firewalls, SGs, NACLs & VPN
Answer
Situation read → Security groups work on IPs and cannot do domain names.
What I'd do →
- Use AWS Network Firewall with a stateful domain list rule group (allow
.github.com,.amazonaws.com, default deny) - Or a proxy (Squid) allow-listing domains and set
HTTPS_PROXY - Route private subnets through the firewall endpoint
- Look at alert and flow logs for blocked domains and tune
- Note that it inspects SNI, so ECH or domain fronting reduces visibility
Why → Domain filtering needs a device that reads SNI or Host headers.
Interview tip → Say you start in alert mode before deny.
More on Security: Firewalls, SGs, NACLs & VPN
Security group versus NACL: explain the differences.BeginnerHow do you let only your office IP SSH into a server?BeginnerWhat does it mean that a security group can reference another security group?BeginnerStateful versus stateless firewalls: what is the practical difference?BeginnerWhat is a WAF and where do you place it?BeginnerWhat is the difference between a site-to-site VPN and a client VPN?Beginner