Amazon EC2 Network Subnets

For a project that exists both in Amazon Web Services EC2 US-EAST-1b and another cloud, I wanted to block network traffic between the two to ensure they didn’t affect each other. I started by doing an whois looking via ARIN for all of the IP addresses we are currently assigned in EC2, and I ultimately got the same list that I found registered to the AMAZO-4 contact with ARIN, with the exception of AMAZON-AES, which I presume is for Amazon Enterprise Solutions. I couldn’t tell you offhand if the same IP blocks are used in other AWS zones.

Network CIDR Netmask ARIN Name /19 AMAZON-EC2-2 /18 AMAZON-EC2-3 /17 AMAZON-EC2-4 /16 AMAZON-EC2-5 /17 AMAZON-EC2-6 /15 AMAZON-EC2-7 /14 AMAZON-EC2-8

Here are the IOS commands:

name EC2-2 description AMAZON-EC2-2
name EC2-3 description AMAZON-EC2-3
name EC2-4 description AMAZON-EC2-4
name EC2-5 description AMAZON-EC2-5
name EC2-6 description AMAZON-EC2-6
name EC2-7 description AMAZON-EC2-7
name EC2-8 description AMAZON-EC2-8
object-group network ec2-us-east

4 thoughts on “Amazon EC2 Network Subnets

  1. btm Post author

    Thanks guys. It’s interesting that in the forum post they include the AES block for US-EAST. Parts of the networks I listed above are subnetted out to regions other than US-EAST, so it is inclusive, but there are a couple networks specifically assigned to other regions.



  2. Yonatan Ryabinski

    $rst = $ipt.” -F “.$chain.” -t mangle”;

    foreach($items as $item) {
    if (preg_match(“/\d+\.\d+\.\d+\.\d+/”,$item[‘startAddress’])) {
    $cmd = $ipt . ” -A $chain -t mangle -m iprange –dst-range ” .$item[‘startAddress’].”-“.$item[‘endAddress’].” -m time –timestart 08:00 –timestop 01:00 -j MARK –set-mark 7 -m comment –comment \”AWS Day Time Queue\””;
    echo “Adding range “.$item[‘startAddress’].”-“.$item[‘endAddress’].” to Day Time Queue\n”;
    $cmd = $ipt . ” -A $chain -t mangle -m iprange –dst-range ” .$item[‘startAddress’].”-“.$item[‘endAddress’].” -m time –timestart 01:00 –timestop 08:00 -j MARK –set-mark 4 -m comment –comment \”AWS Night Time Queue\””;
    echo “Adding range “.$item[‘startAddress’].”-“.$item[‘endAddress’].” to Night Time Queue\n”;

Leave a Reply

Your email address will not be published. Required fields are marked *

Time limit is exhausted. Please reload the CAPTCHA.