Firewall – limit outbound access for an EC2 instance

amazon ec2firewallrouting

Our company is in the process to become PCI compliant and one of the requirement is to limit the outbound access of our servers.
We have only 1 EC2 instance that falls in the PCI scope and I would like to limit outbound internet access to this instance to only the services needed.

Is there anyway to build that? Is a VPC the best option to do it?

Thanks a lot,

Elie

Best Answer

Consider the following:

  • Security Groups allow you to choose CIDR (ip range) and port. You can restrict outbound access at the Instance level.
  • Network ACLs allow you to do the same, but at the Subnet level.
  • You can place a firewall into your network or utilise your NAT device, to control outbound access. This can help with logging which may be a requirement for PCI compliance.
  • You could employ software firewalls, like iptables for linux which can also assist with logging requirements.