使用Windows Power Shell搜索和测试与AWS RDS的连接

时间:2016-12-21 13:42:28

标签: powershell amazon-web-services networking tfs rds

我正在尝试在Windows 2012 AWS EC2实例上安装和配置TFS服务器。我想将RDS SQL Server配置为后端,但我面临连接的一些问题,所以我使用此命令测试端口和连接:

Test-NetConnection -Port 1433 -ComputerName tfsserver.sqlserver.region.rds.amazonaws.com -InformationLevel Detailed

命令结果为:

ComputerName             : tfsserver.sqlserver.region.rds.amazonaws.com
RemoteAddress            : sql_server_address
RemotePort               : 1433
AllNameResolutionResults : sql_server_address
MatchingIPsecRules       : 
NetworkIsolationContext  : Internet
InterfaceAlias           : Ethernet
SourceAddress            : tfs_server_address
NetRoute (NextHop)       : gateway_hop_address
PingSucceeded            : False
PingReplyDetails (RTT)   : 0 ms
TcpTestSucceeded         : False

注意:我更改了原始IP地址和RDS端点名称

我的问题是:

我的安全组中不允许使用ping命令,因此如何知道连接是否已打开,因为:

TcpTestSucceeded         : False

该结果是否与ping命令相关或 1433 端口是否已关闭?我想知道连接是否打开。

1 个答案:

答案 0 :(得分:2)

这是tcp端口无法访问的结果。要么它没有打开,它不允许在路径的某个地方(本地防火墙,路由或RDS安全组)

如果指定-Port参数,那么它是TCP测试而不是ICMP echo(ping)https://technet.microsoft.com/en-us/library/dn372891.aspx