简体   繁体   中英

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?

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)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM