mirror of
https://github.com/samuelclay/NewsBlur.git
synced 2025-09-18 21:50:56 +00:00
Cleanign up ec2 firewall rules.
This commit is contained in:
parent
df1fd7176e
commit
a43e07429a
1 changed files with 3 additions and 25 deletions
28
fabfile.py
vendored
28
fabfile.py
vendored
|
@ -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',
|
||||
|
|
Loading…
Add table
Reference in a new issue