[英]Set AWS Security Group inbound rule to let Gilabci pipeline make changes in RDS
I am able to access AWS RDS from gitlabci pipeline using 0.0.0.0/0 CidrIp but it is widely opened.我可以使用 0.0.0.0/0 CidrIp 从 gitlabci 管道访问 AWS RDS,但它已被广泛开放。
This is my SecurityGroupIngress definition in cloudformation file:这是我在 cloudformation 文件中的 SecurityGroupIngress 定义:
SecurityGroupIngress:
- CidrIp: 0.0.0.0/0
FromPort: 5432
ToPort: 5432
IpProtocol: TCP
Description: Allows traffic from gitlb ci
It works fine.它工作正常。
I have no idea how to set gitlabci's ip address range to make AWS RDS more secure.我不知道如何设置 gitlabci 的 ip 地址范围以使 AWS RDS 更安全。
I found this docs: gitlab ip range我找到了这个文档: gitlab ip 范围
There is link to all possible ip addresses on google cloud cloude.josn谷歌云cloude.josn上有指向所有可能的 ip 地址的链接
Here is similar topic on stackoverflow这是关于stackoverflow的类似主题
I need ip and mask.我需要 ip 和口罩。
For outgoing connections from CI/CD runners, we are not providing static IP addresses.对于来自 CI/CD 运行器的传出连接,我们不提供 static IP 地址。 All GitLab.com shared runners are deployed into Google Cloud Platform (GCP) in us-east1所有 GitLab.com 共享运行器都部署到 us-east1 的谷歌云平台 (GCP)
Here is a list of all GCP CIDR blocks in us-east1
, assuming you are using Gitlab runners.这是us-east1
中所有 GCP CIDR 块的列表,假设您使用的是 Gitlab 跑步者。
"34.23.0.0/16"
"34.24.0.0/15"
"34.26.0.0/16"
"34.73.0.0/16"
"34.74.0.0/15"
"34.98.128.0/21"
"34.118.250.0/23"
"34.138.0.0/15"
"34.148.0.0/16"
"35.185.0.0/17"
"35.190.128.0/18"
"35.196.0.0/16"
"35.207.0.0/18"
"35.211.0.0/16"
"35.220.0.0/20"
"35.227.0.0/17"
"35.229.16.0/20"
"35.229.32.0/19"
"35.229.64.0/18"
"35.231.0.0/16"
"35.237.0.0/16"
"35.242.0.0/20"
"35.243.128.0/17"
"104.196.0.0/18"
"104.196.65.0/24"
"104.196.66.0/23"
"104.196.68.0/22"
"104.196.96.0/19"
"104.196.128.0/18"
"104.196.192.0/19"
"162.216.148.0/22"
"2600:1900:4020::/44"
Methodology:方法:
curl https://www.gstatic.com/ipranges/cloud.json | jq '.prefixes[] | select(.scope=="us-east1") | .ipv4Prefix // .ipv6Prefix'
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.