Hello all, wondering if you can help. I have an AWS Firewall and NAT gateway implemented to allow egress internet access to the EC2 instances I manage. I created some firewall rules to block traffic to all but a few websites however, they do not appear to be working as expected.
Following https://aws.amazon.com/blogs/desktop-and-application-streaming/filtering-internet-traffic-from-amazon-workspaces/ I have done the following.
Firewall Rules
Stateless Rule 1
TCP - source 0.0.0.0/0 - destination 0.0.0.0/0 - Any port - Pass - This allows internet if used
However, if I change it to the following, the internet stops working.
Stateless Rule 1
TCP - source 0.0.0.0/0 - destination 0.0.0.0/0 - Any port - forward to stateful
Stateful Rule 1
URL
google.com
amazonaws.com
Inspect HTTP and HTTPS - Action Allow - No internet
Cloudwatch logs show the following
{
"firewall_name": "FIREWALL",
"availability_zone": "xxxxxxxx",
"event_timestamp": "TIME",
"event": {
"app_proto": "tls",
"src_ip": "FIREWALL IP",
"src_port": 43973,
"event_type": "alert",
"alert": {
"severity": 3,
"signature_id": 5,
"rev": 0,
"signature": "aws:alert_established action",
"action": "blocked",
"category": ""
},
"flow_id": 737098114964242,
"dest_ip": "52.94.50.18",
"proto": "TCP",
"tls": {
"sni": "ssm.DESTINATION.amazonaws.com",
"version": "UNDETERMINED",
"ja3": {},
"ja3s": {}
},
"dest_port": 443,
Thanks for the response! I am a little confused. To confirm, you would have me:
1)remove the Stateless Rule 1 TCP - source 0.0.0.0/0 - destination 0.0.0.0/0 - Any port - forward to stateful 2)I would then create a Stateful rule for each website? 3)Create a stateless rule to replace Stateless Rule 1 and set it to block all. Thanks again