我可以在 aws 安全组中添加 dns 名称吗 [英] Can I add dns name in aws security group

查看:29
本文介绍了我可以在 aws 安全组中添加 dns 名称吗的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我必须将我的动态 IP(每次都会更改)连接到 AWS EC2 机器.
为此,我将我的公共 IP 映射到域名 (xyz.com),现在我正在尝试将其添加到安全组.
但是 AWS 安全组不允许添加 DNS 名称.这样做是否正确,如果不是,请建议我.

I have to connect my dynamic IP(which changes every time) to the AWS EC2 machine.
For this I mapped my public IP to the domain name(xyz.com), now I am trying to add it to security group.
But AWS security group not allowing to add DNS names. Is it the right process to do it, if not please suggest me.

推荐答案

安全组和 ACL 无法解析 DNS 主机名.

Security Groups and ACLs are not able to resolve DNS hostnames.

您可以使用 AWS CLI 编写更新 IP 动态地址的脚本:

You can use the AWS CLI to script the update of your IP dynamic address:

aws ec2 authorize-security-group-ingress --group-id --protocol tcp --port 22 --cidr/24

aws ec2 authorize-security-group-ingress --group-id --protocol tcp --port 22 --cidr /24

http://docs.aws.amazon.com/cli/latest/userguide/cli-ec2-sg.html

这篇关于我可以在 aws 安全组中添加 dns 名称吗的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆