Search code examples
amazon-web-servicesapacheamazon-ec2firewallufw

Does Ubuntu UFW overrides Amazon Ec2's security groups and rules?


If I'm configuring UFW and also Amazon EC2 Security group, which will override the other, or do they both co-exist without any issues?


Solution

  • A firewall like UFW is running at the OS level, while Amazon Security Groups are running at the instance level. Traffic coming into the EC2 would first pass through the SG, and then be evaluated by UFW. Take a scenario where traffic is explicitly allowed to pass through the SG but UFW denies it -- in this case UFW would sort of 'override' the settings in the SG.

    As long as you manage both effectively they _could_ coexist without issues.