安全组内的EC2安全组(EC2 Security Group inside Security Group)

编程入门 行业动态 更新时间:2024-10-28 16:21:52
安全组内的EC2安全组(EC2 Security Group inside Security Group)

我在安全组中使用安全组。

例如,我希望mysql安全组允许mysql 3306连接到app服务器安全组。

但是,我的app服务器无法与mysql通信(通过mysql cli进行测试),但是当我专门将ip地址添加到mysql安全组中时,它就可以工作了。

救命?

I'm using security groups inside security groups.

For instance, I would like the mysql security group to allow mysql 3306 connections to the app server security group.

However, my app server cannot talk to mysql (testing via the mysql cli) but when I specifically add the ip address into the mysql security group, then it works.

Help?

最满意答案

考虑到您提供的配置信息很少,这可能有点远。 但是,我有一个非常奇怪的类似经历,所以这里...

检查您是使用私有IP而不是公共IP。 如果您单独指定公共IP,则它将起作用,但不会与安全组内的安全组一起使用。

另一方面,私有IP不是外部可访问的,但安全组似乎可行。

如果仍然无效,请确保在VPC中设置了本地路由,以确保私有IP可以跨子网工作。

This may be a bit of a long shot, given how little information about your configuration you've provided. However, I had a very eerily similar experience so here goes...

Check that you're using the private ip's and not the public ip's. The public ip will work if you individually specify, but won't with security groups inside security groups.

On the other hand, private ip's are not externally accessible, but then security groups seem to work.

If that still doesn't work, make sure that you have local routes set in your VPC to make sure that the private ip's can work across subnets.

更多推荐

本文发布于:2023-08-02 04:15:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1369419.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:Security   Group

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!