Sahidul Islam
Sahidul Islam

Reputation: 489

how to add inbound rules for AWS EC2 security group for all traffic

i am trying to add inbound rules for AWS EC2 security group for all traffic. i am using python boto module to do so.

i already did add rules for tcp|udp|icmp protocol. But cant add rules for all traffic. how should i do it?

Upvotes: 2

Views: 2411

Answers (1)

Naveen Vijay
Naveen Vijay

Reputation: 16532

This worked for me. I was able to add the All allow Ingress to the security group

import boto
ec2 = boto.connect_ec2()
sg = ec2.get_all_security_groups(group_ids='sg-12345')[0]
sg.authorize(ip_protocol="-1", from_port=None, to_port=None, cidr_ip="0.0.0.0/0", src_group=None, dry_run=False)

Upvotes: 3

Related Questions