728x90
반응형
보안그룹 (group-id)에 포트 추가
aws ec2 authorize-security-group-ingress --group-id sg-1234 --ip-permissions '[{"IpProtocol": "all", "IpRanges": [{"CidrIp": "123.123.123.123/32", "Description": "nonhyun office"}]}]' --profile test &
aws ec2 authorize-security-group-ingress --group-id sg-123 --ip-permissions '[{"IpProtocol": "icmp", "FromPort": -1, "ToPort": -1, "IpRanges": [{"CidrIp": "123.123.123.126/32", "Description": "nonhyun office"}]}]' --profile test &
aws ec2 authorize-security-group-ingress --group-id sg-123 --ip-permissions '[{"IpProtocol": "tcp", "FromPort": 22, "ToPort": 22, "IpRanges": [{"CidrIp": "123.123.123.123/32", "Description": "nonhyun office"}]}]' --profile test &
보안그룹에 포트 제거
aws ec2 revoke-security-group-ingress --group-id sg-123 --ip-permissions '[{"IpProtocol": "all", "IpRanges": [{"CidrIp": "123.123.123.123/32", "Description": "nonhyun office"}]}]' --profile test &
aws ec2 revoke-security-group-ingress --group-id sg-123 --ip-permissions '[{"IpProtocol": "icmp", "FromPort": -1, "ToPort": -1, "IpRanges": [{"CidrIp": "123.123.123.123/32", "Description": "nonhyun office"}]}]' --profile test &
aws ec2 revoke-security-group-ingress --group-id sg-123 --ip-permissions '[{"IpProtocol": "tcp", "FromPort": 22, "ToPort": 22, "IpRanges": [{"CidrIp": "123.123.123.123/32", "Description": "nonhyun office"}]}]' --profile test &
728x90
300x250
'IT > AWS' 카테고리의 다른 글
AWS EC2 NTP 시간 동기화 설정 (0) | 2022.02.18 |
---|---|
Amazon Linux 에서 PHP 7.X 설치 (0) | 2022.01.17 |
AWS S3 + CloudFront CORS 설정 (0) | 2021.08.12 |
AWS AD검증 (0) | 2021.08.12 |
AWS Client VPN 인증서 준비 (0) | 2021.08.12 |