Amazon web services 如何在Amazon EC2上为VPN正确配置入站规则?

Amazon web services 如何在Amazon EC2上为VPN正确配置入站规则?,amazon-web-services,amazon-ec2,vpn,inbound-security-rule,Amazon Web Services,Amazon Ec2,Vpn,Inbound Security Rule,我将入站规则(在服务–>EC2–>实例–>安全组下)配置如下 # Type, Protocol, Port Range, Source All TCP, TCP, 0-65535, 0.0.0.0/0 (anywhere) All UDP, UDP, 443, 0.0.0.0/0 (anywhere) All IMCP, ICMP, 0-65535, 0.0.0.0/0 (anywhere) 如下图所示 任何地方都

我将入站规则(在
服务–>EC2–>实例–>安全组
下)配置如下

# Type, Protocol,     Port Range, Source
All TCP,     TCP,     0-65535,    0.0.0.0/0 (anywhere)
All UDP,     UDP,     443,        0.0.0.0/0 (anywhere)
All IMCP,    ICMP,    0-65535,    0.0.0.0/0 (anywhere)
如下图所示


任何地方
都太危险了如何正确配置入站规则以提高安全性?

您的VPN安全组是开放的。如果您正在使用IpSec,则只需为来自另一端的流量打开UDP 500UDP 4500。例如,您希望连接两个VPC。如果另一端的VPN地址为172.217.4.174,则允许172.217.4.174中的UDP 500和UDP 4500。如果要允许来自其他VPN的流量,请添加另一组允许来自该VPN的流量的规则