How to access/ping a server located on AWS?

前端 未结 10 1375
广开言路
广开言路 2021-01-30 13:49

With what address should a server located on AWS be accessed?

I\'ve created an AWS instance and installed a web server on it. However the server is not reachable via any

相关标签:
10条回答
  • 2021-01-30 14:18

    I have faced the similar issue while connecting from my local mac machine

    Work around as below:

    1. * Route table => add 0.0.0.0/0 and target to your Internet Gateway *
    2. Under Network ACL add ad below

      2.1 for pings from your local machine ->

      All ICMP - IPv4 ICMP (1) ALL 0.0.0.0/0 ALLOW

      2.2 ssh/other connectivity

      SSH (22) TCP (6) 22 0.0.0.0/0
      
      ALL Traffic ALL ALL 0.0.0.0/0
      
    3. Good practice associate your subnet to your route table

    4. Under Ec2 -> Security Group

      4.1 To allow SSH connectivity, just add as below

      SSH (22) TCP (6) 22 0.0.0.0/0
      

      4.2 for pings to work from your local machine as as below

      All ICMP - IPv4 All N/A 0.0.0.0/0
      

    This will make your connectivity works for pings & ssh from your local machine using your KEY file (xx.pem)

    thanks,

    0 讨论(0)
  • 2021-01-30 14:22

    In your security group open -1 to -1 on ICMP for range 0.0.0.0/0 and you'll be able to ping.

    See my screenshot for a better view:

    AWS Console Image

    Image posted by @emostar below

    0 讨论(0)
  • 2021-01-30 14:24

    Ping doesn't work with EC2 because ping runs over the ICMP protocol which is blocked in a typical EC2 security group configuration.

    Here's a very nifty way to work around this by using tcping (a ping alternative that works over a TCP port):

    tcping ec2-174-129-24-92.compute-1.amazonaws.com

    tcping ec2-174-129-24-92.compute-1.amazonaws.com 22

    It runs on port 80 (the first example) but you can also specify a different port (the second example) to be used to test connectivity.

    0 讨论(0)
  • 2021-01-30 14:24

    I found that if you install a VPN server on your AWS server, you can connect to the VPN and ping the private IP address in the virtual private network.

    0 讨论(0)
提交回复
热议问题