- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我正在尝试构建 AWS terraform IPSec VPN 配置。但是,我不记得在哪里可以找到 AWS IPSec IP 地址; terraform cgw documentation表示 ip_address
字段是必需的。
答案应该假定 VPN 将附加到我的 AWS Transit Gateway .
我的地形:
resource "aws_customer_gateway" "cgw-abbv-for-local-and-remote" {
bgp_asn = 65001
ip_address = "A.B.C.D" #<-- I need this IP before terraform apply
type = "ipsec.1"
tags = {
Name = "insert-cgw-name-here"
}
}
resource "aws_vpn_connection" "vpn-abbv-for-local-and-remote" {
customer_gateway_id = aws_customer_gateway.cgw-abbv-for-local-and-remote.id
transit_gateway_id = aws_ec2_transit_gateway.my-tgw-name.id
type = aws_customer_gateway.cgw-abbv-for-local-and-remote.type
tags = {
Name = "insert-vpn-name-here"
}
}
最佳答案
似乎 OP 已经找到了答案,但让我加两分钱,因为两年前我花了很多时间来解决 AWS VPN 问题,以便通过 AWS Advanced Networking 证书。这可能对 VPN 新手很有用 - 特别是在 AWS 生态系统中:
有一本很棒的书,叫做 AWS 认证高级网络官方学习指南,我会推荐所有担任云网络工程师角色的人阅读。 [1]
它指出了以下几点:
After you create a VPN connection, the VPN tunnel activates when traffic is generatedfrom your side of the VPN connection. The VGW is not the initiator; your customer gateway must initiate the tunnels. If your VPN connection experiences a period of idle time (usually10 seconds, depending on your configuration), the tunnel may go down. This is becauseAWS uses an on-demand DPD mechanism. If AWS receives no traffic from a VPN peer for10 seconds, AWS sends a DPD “R-U-THERE” message. If the VPN peer does not respondto three successive DPDs, the VPN peer is considered dead and AWS closes the tunnel. [pp. 100, 101]
At the non-AWS end of a VPN connection, the VPN is terminated on a customer gateway.A customer gateway is the AWS term for the VPN termination device at the customer’s onpremises end. A customer gateway can also be hosted in AWS as an EC2 instance runningVPN software that meets the requirements given in the next section.Most customers don’t require the purchase of an additional device and can reuse anexisting on-premises VPN termination device to create a tunnel to a VPC. [p. 110]
You can use any third-party VPN device that supports Layer 3 VPN technologies. AWSdoes not support Layer 2 VPN technologies.IPsec is used for the VGW at the AWS end of VPN termination, and so the IPsec protocol must be supported by your VPN device. You will set up two VPN tunnels per VGW.Support for BGP routing protocol is optional but recommended for advanced routing capabilities. Other routing protocols like Open Shortest Path First (OSPF) are not supported byAWS. You must ensure that you have opened the right ports in your on-premises firewallfor the IPsec traffic to flow. [p. 111]
That is in particular: both ends of the VPN connection must possess a public IP address!
如果您还没有,我真的非常建议您跳过这些页面,以了解最佳实践和 AWS 在(混合)云架构方面的思维方式。如果事情没有按照您想要的方式进行,您可以避免事后感到困惑。 IPSec(即第 3 层)VPN 比大多数人想象的要难。应该了解所有与路由和安全相关的内容,例如:IKE、SA、基于策略的路由、NAT-遍历、ISAKMP 等 [另见第97:VPN 功能 -> 安全和路由部分]。
另一个很好的引用是 AWS 站点到站点 VPN 指南 (PDF)。 [2]
另请注意:许多 terraform 属性也可以在 AWS CloudFormation 文档中找到。 AWS::EC2::CustomerGateway 资源的 IpAddress 属性状态 [3] 的文档:
The Internet-routable IP address for the customer gateway's outside interface. The address must be static.
[1] https://www.programmer-books.com/wp-content/uploads/2019/04/AWS-Certified-Advanced-Networking-Official-Study-Guide.pdf
[2] https://docs.aws.amazon.com/vpn/latest/s2svpn/s2s-vpn-user-guide.pdf
[3] https://docs.aws.amazon.com/de_de/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-customer-gateway.html#cfn-ec2-customergateway-ipaddress
关于amazon-web-services - 在 terraform IPSec 隧道中使用的 AWS IP 地址(通过 Transit Gateway),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/66711903/
给定的输入是192.168.3.78/27 输入可以是任意C类ip地址,以上ip为例进行尝试 预期输出应显示从 192.168.3.65 到 192.168.3.94 的所有 IP如下 192.168
您好,我是一名 javascript 菜鸟,正在为 IP 范围编写验证器。例如,1.1.1.1-2.2.2.2 是一个有效范围,但我想确保第一个 IP 不大于第二个 IP。 2.2.2.2-1.1.1
在 MySQL 数据库中存储多种 IP 类型的最佳方式是什么: - 单一 IP (123.123.123.123) - IP 范围 (123.123.123.1 - 123.123.123.121)
所以我有一个带有子网的 IP:8.8.8.0/24 我如何将其转换为 8.8.8.0 和 8.8.8.255(实际上是它们的 ip2long 结果) 在 PHP 和 JavaScript 中 最佳答案
我有 Windows7 作为我的基本操作系统。最重要的是,我在 Ubuntu 上安装了 Virtual Box。我希望 ubuntu 获得与我的基本操作系统(Win7)相同的 IP 地址。我如何实现这
关闭。这个问题是off-topic .它目前不接受答案。 想改善这个问题吗? Update the question所以它是 on-topic对于堆栈溢出。 9年前关闭。 Improve this q
阅读后List of IP Space used by Facebook : “真实”列表是最后一个答案,但我想知道 Igy(答案标记为解决方案)如何通过将连续的类添加到更大的类中来大幅缩小列表(通过
我正在开发一个 web 应用程序,我已经在我的本地主机中创建了这个项目,但是网络用户需要访问我的项目,我不想给他们一个不友好的 ip 地址,所以我想用户访问一个名称例子 http://myprojec
有人可以向我解释 Azure 在逻辑应用程序的出站 IP 地址之间不同的新方式之间的区别。 我认为文档在对该问题的正确解释方面非常精简。读起来听起来好像 IP 地址在逻辑应用程序中具有完全相同的作用。
我正在尝试熟悉一个项目中java中的数据报系统,目前,我们只使用UDP包。 为了发送消息,我们在 DatagramPacket 上设置目标 IP。 /* * The fields o
我有一个 Java 服务器,当我获得连接时,我需要检查 IP 是本地 IP 还是公共(public) IP。当它是我自己的本地 IP 时,我可以检测到它,但我在使用其他本地 IP 时遇到了一些问题。J
所以我在网上看到了很多例子,这些例子展示了如果你知道起始 IP 和结束 IP 如何获得完整的 IP,但我需要的是在提供后告诉我完整的 IP 范围带有起始 IP 和所需 IP 地址数的代码。 因此,例如
我创建了一个 python 项目,用于扫描 IP 范围(即 x.y.z.0/24)并返回在线主机列表。它将在线主机列表保存到仅包含 IP 的文件中(即 ['192.168.0.1'、'192.168.
如果用户的 ip 在某个 IP 范围之间,我正在使用重定向。但是,我正在使用多个 ip 范围,所以我想知道执行此操作的最佳方法。我目前正在使用它来重定向, 但是如果 IP 范围是 72.122.166
好的,现在是星期五下午,我度过了漫长的一周,希望能得到一些帮助!目前,我有一个 IP 范围列表,如下所示: List ipRanges = new List(); ipRanges.Add(new I
关闭。这个问题是off-topic .它目前不接受答案。 想改进这个问题吗? Update the question所以它是on-topic用于堆栈溢出。 关闭 10 年前。 Improve thi
下面是我的 CloudFormation 模板的片段,用于将弹性 IP 地址与网络接口(interface)的主 IP 相关联: "MyInterfaceSelfEipAssociat
我在 Azure 上创建了 Python 函数,该函数调用外部 API 服务,该服务仅允许访问白名单 IP。 根据 Microsoft 文档 ( https://learn.microsoft.com
我在 Azure 上创建了 Python 函数,该函数调用外部 API 服务,该服务仅允许访问白名单 IP。 根据 Microsoft 文档 ( https://learn.microsoft.com
我在我的 CentOS 5 x86_64 中使用 IP 别名。为简化此示例:IP 地址 A 是 eth0 地址,IP 地址 B 是 eth0:0地址。我有 2 个 Apache 实例(版本 2.2.3
我是一名优秀的程序员,十分优秀!