问题标签 [vpc]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
1 回答
519 浏览

amazon-web-services - AWS VPC 环境中的排队电子邮件失败

如果数量增加,我有一个系统可以发送电子邮件并将它们排队。

如果它是每小时 1 或 2 封电子邮件,则可以正常发送。

在繁忙的时间,队列得到备份,很快电子邮件发送开始失败。

我已经从本地对 SMTP 服务器进行了负载测试 - 那里没有问题。

但是,当我尝试从我的 EC2 服务器
(位于 VPC 的私有子网中)进行负载测试时
,传出流量通过 NAT
并且我们已经设置了自己的 DNS 服务器

前几个很好 - 其余的开始抛出错误。

这是 C# 异常 ToString()

我很确定这不是代码问题 - 很可能是 NAS 或 DNS 上的设置。有人可以指出我正确的方向吗?

0 投票
4 回答
9967 浏览

amazon-web-services - 如何从 VPC 私有子网访问 Internet

我在 AWS 上创建了一个带有私有子网和公共子网的 VPC。我从私有子网启动了一个实例,我想通过 NAT 服务器访问互联网。

这是我的 NAT 实例上的 iptables。

链 PREROUTING (policy ACCEPT) num target prot opt source destination
1 DNAT tcp -- 0.0.0.0/0 0.0.0.0/0 tcp dpt:10234 to:10.0.1.58:22

Chain INPUT (policy ACCEPT) num target prot opt source destination

Chain OUTPUT (policy ACCEPT) num target prot opt source destination

Chain POSTROUTING (policy ACCEPT) num target prot opt source destination
1 MASQUERADE all -- 10.0.0.0/16 0.0.0.0/0

我应该向我的 NAT 或私有子网中的实例添加什么才能从私有子网中的实例访问 Internet

非常感谢!!

0 投票
2 回答
1091 浏览

amazon-web-services - Amazon EC2 VPC with multiple subnets to host compute cluster supported web application

I have been trying to port a web application set-up to EC2 using VPC. The application requires an externally accessible web server which is to talk to a number of back end servers managing a database and other data resources within a subnet of the VPC. In addition to this I require a compute head node which should connect to a grid of EC2 worker nodes hosted in another subnet of the VPC accessible only through the head node which should act as a router between the two subnets of the VPC using NAT.

The basic configuration should be something similar to the below schematic:

At the moment I have been able to configure the two subnets and set-up the required EC2 nodes.

I have set up the Network ACL within the two subnets to prevent the EC2 instances in subnet 1 from directly communicating with any IPs within subnet 2 by setting rules within the two subnets as follows:

Subnet 1:

  • 99 ALL Traffic ALL ALL 10.81.82.0/24 DENY
  • 100 ALL Traffic ALL ALL 0.0.0.0/0 ALLOW
  • * ALL Traffic ALL ALL 0.0.0.0/0 DENY

Subnet 2:

  • 80 ALL Traffic ALL ALL 10.81.82.0/24 ALLOW
  • 100 ALL Traffic ALL ALL 0.0.0.0/0 ALLOW
  • * ALL Traffic ALL ALL 0.0.0.0/0 DENY

The issue I seem to be having with this set-up is that I don't see any obvious way of allowing the compute node, which is attached to both subnet 1 and subnet 2, from not giving precedence to the 10.81.82.0/24 DENY rule of subnet 1 over the 10.81.82.0/24 ALLOW rule of subnet 2.

I have read most of the pages from Amazon's VPC networking documentation however I am still struggling to work out how to achieve this kind of hierarchical setup. Any help or pointers in the right direction would be much appreciated.

0 投票
3 回答
6104 浏览

amazon-web-services - AWS - 将 RDS 移至 VPC

我们有几个 RDS 没有添加到 VPC 下,所以我们需要将它们带到 VPC 下。请让我知道预期的步骤和停机时间。如果需要对网络服务器进行任何更改,请告诉我,以便 RDS 在 VPC 下一切正常。

0 投票
1 回答
556 浏览

amazon-ec2 - AWS 云形成:由于等待处理超时,堆栈创建失败

我正在尝试启动一个堆栈,该堆栈将创建一个 VPC(具有公共和私有子网)、公共子网中的负载均衡器和在私有子网中启动的应用程序服务器。启动配置具有将从 s3 存储桶下载应用程序并引导服务器的脚本。我在公共子网中使用 NAT,以使应用程序服务器能够访问 s3 服务。为此,我对 AWS 网站上提供的模板进行了更改。

问题是,我在启动配置中使用的等待句柄每次都会超时,而没有部署我的应用程序。但iis已配置。

问题似乎出在互联网连接上。请帮我解决这个问题。

我使用的模板可以在https://cti-application-bucket.s3-ap-southeast-1.amazonaws.com/cloudformation.template找到

0 投票
2 回答
709 浏览

amazon-web-services - 在aws Ec2 vs VPC上部署mysql galera集群?

我想在 aws 上部署 galera 集群。使用 VPC 还是使用 2-3 个开放的 ec2 实例创建集群是个好主意。有什么好处和坏处。

另外,VPC 是否需要额外计费?任何帮助都会很棒!

0 投票
1 回答
252 浏览

amazon-web-services - 如何从 AWS 上的另一个虚拟机连接 AWS VPC 上的 hornetq

我在 AWS 上有 2 个虚拟机。在第一个 VM 上,我有 hornet 和向 hornet 发送消息的应用程序。在另一个 VM 上,我有一个使用 hornet 的应用程序。消费者无法从大黄蜂中提取消息,我不明白为什么。Hornetq 正在运行,我打开了任何 IP 的端口。我尝试将 hornet 与 jconsole(在我的本地计算机上)连接但失败了,所以我看不到 hornet 是否有任何消费者/供应商。

我尝试将“绑定”配置更改为 0.0.0.0,但是当我重新启动 hornet 时,它们会自动更改为我在 config.properties 中的服务器 IP。

有什么建议可能是我未能将我的应用程序连接到 hornetq 的问题吗?

谢谢!

0 投票
1 回答
842 浏览

amazon-web-services - ELB 来自网络服务器的出站连接的不同路由

我目前正在将我们所有的服务器/服务移至 AWS,但我们遇到了一个问题,即我们的网络服务器连接到客户端服务器上的网络服务,以便在用户登录时检索信息。我们的大多数客户通过我们在防火墙 NAT 级别的 IP 以及内置在 Web 服务中的密码来限制他们的 Web 服务。

使用 ELB 时,我们的 IP 会发生变化。是否无法为 ELB 服务器指定默认网关,因此流量可以进入并响应 ELB 选择的任何 IP,但是默认情况下,任何像 Web 浏览或 .NET 连接到 Web 服务器上的 Web 服务的东西都将通过静态连接IP网关?

这适用于我们当前的设置,因为我们也有用于 Web 和默认网关设置的 NAT 规则,因此每件事都是独立的。

问候

利亚姆

0 投票
2 回答
299 浏览

amazon-web-services - VPC 和 EC2-Classic 实例之间的安全交互

我面临着鸡和蛋的问题。我目前在 EC2 经典中有一个服务器,以及一个 RDS 实例——在 EC2 经典中也是如此。EC2 实例还与同样驻留在 EC2 经典中的 Cassandra 集群进行交互。

但是,我需要将 RDS 移入 VPC。现在,在一个理想的世界中,此时我将把我所有的东西都放在 VPC 中。然而,这带来了一个重大的迁移挑战,我想尽量减少对用户的影响并将步骤保持在最低限度——这主要是因为 Cassandra 集群。

事实证明,我无法在 VPC 和非 VPC 安全组之间创建安全组规则。

那么,我怎样才能在 VPC 中拥有我的 EC2 实例可以访问的 RDS,而无需向全世界开放我的 RDS?

任何帮助是极大的赞赏。

更新:因此,我的一个想法是将弹性 IP 分配给我的 EC2 实例,并将 IP 显式添加到 VPC 中 RDS 的安全组。那行得通吗?(现在尝试使用https://github.com/skymill/aws-ec2-assign-elastic-ip

0 投票
2 回答
1453 浏览

amazon-web-services - 如何使用 boto 在子网上“修改自动分配公共 IP”?

如何使用 boto 在子网上“修改自动分配公共 IP”?

亚马逊的网络界面中有一个我在博托中找不到的选项。

在此处输入图像描述