From a43e07429abf2b5bea65e8837e51203db0685a83 Mon Sep 17 00:00:00 2001 From: Samuel Clay Date: Mon, 22 Oct 2012 11:22:28 -0700 Subject: [PATCH] Cleanign up ec2 firewall rules. --- fabfile.py | 28 +++------------------------- 1 file changed, 3 insertions(+), 25 deletions(-) diff --git a/fabfile.py b/fabfile.py index 0cdf0806d..aaf309312 100644 --- a/fabfile.py +++ b/fabfile.py @@ -604,30 +604,8 @@ def setup_db_firewall(): sudo('ufw allow from 199.15.248.0/21 to any port 11211 ') # Memcached # EC2 - sudo('ufw delete allow from 23.22.0.0/16 to any port 5432 ') # PostgreSQL - sudo('ufw delete allow from 23.22.0.0/16 to any port 27017') # MongoDB - sudo('ufw delete allow from 23.22.0.0/16 to any port 6379 ') # Redis - sudo('ufw delete allow from 23.22.0.0/16 to any port 11211 ') # Memcached - sudo('ufw delete allow from 54.242.38.48/20 to any port 5432 ') # PostgreSQL - sudo('ufw delete allow from 54.242.38.48/20 to any port 27017') # MongoDB - sudo('ufw delete allow from 54.242.38.48/20 to any port 6379 ') # Redis - sudo('ufw delete allow from 54.242.38.48/20 to any port 11211 ') # Memcached - sudo('ufw delete allow from 184.73.115.5/20 to any port 5432 ') # PostgreSQL - sudo('ufw delete allow from 184.73.115.5/20 to any port 27017') # MongoDB - sudo('ufw delete allow from 184.73.115.5/20 to any port 6379 ') # Redis - sudo('ufw delete allow from 184.73.115.5/20 to any port 11211 ') # Memcached - sudo('ufw allow from 54.242.38.48 to any port 5432 ') # PostgreSQL - sudo('ufw allow from 54.242.38.48 to any port 27017') # MongoDB - sudo('ufw allow from 54.242.38.48 to any port 6379 ') # Redis - sudo('ufw allow from 54.242.38.48 to any port 11211 ') # Memcached - sudo('ufw allow from 184.73.115.5 to any port 5432 ') # PostgreSQL - sudo('ufw allow from 184.73.115.5 to any port 27017') # MongoDB - sudo('ufw allow from 184.73.115.5 to any port 6379 ') # Redis - sudo('ufw allow from 184.73.115.5 to any port 11211 ') # Memcached - sudo('ufw allow from 54.242.137.224 to any port 5432 ') # PostgreSQL - sudo('ufw allow from 54.242.137.224 to any port 27017') # MongoDB - sudo('ufw allow from 54.242.137.224 to any port 6379 ') # Redis - sudo('ufw allow from 54.242.137.224 to any port 11211 ') # Memcached + sudo('ufw allow proto tcp from 54.242.38.48 to any port 5432,27017,6379,11211') + sudo('ufw allow proto tcp from 184.72.214.147 to any port 5432,27017,6379,11211') sudo('ufw --force enable') def setup_db_motd(): @@ -756,7 +734,7 @@ def copy_task_settings(): def setup_ec2_task(): AMI_NAME = 'ami-834cf1ea' # Ubuntu 64-bit 12.04 LTS # INSTANCE_TYPE = 'c1.medium' - INSTANCE_TYPE = 'm1.medium' + INSTANCE_TYPE = 'c1.medium' conn = EC2Connection(django_settings.AWS_ACCESS_KEY_ID, django_settings.AWS_SECRET_ACCESS_KEY) reservation = conn.run_instances(AMI_NAME, instance_type=INSTANCE_TYPE, key_name='sclay',