0

I'm unable to ping domain name or amazon static ip from the lightsail instance (attached to that static ip)

  1. Bought a domain name (say, test.com) from Google.
  2. Created an Amazon Lightsail ubuntu 16.04 instance & attached a static IP
  3. Enabled firewall on lightsail instance & allowed ports ssh/http/https
  4. DNS settings added on google domain as below

Using google domain name servers

Registered host: www.test.com -> Amazon static ip

Custom resource records: @ -> A -> Amazon static ip

Custom resource records: www -> A -> Amazon static ip

After all the above steps, am able to access test.com from web-browser

Now the issue is, am unable to ping test.com from lightsail instance (the same created in step-2). To add, am able to ping google.com from the same instance. I'm doubting if any route missed.

Can someone guide me here. Many thanks.

Community
  • 1
  • 1
Gopi
  • 11

3 Answers3

1

Ping is uses the ICMP protocol, and the Lightsail firewall rules do not have a way to allow that protocol so that instances to be pinged from the Internet -- they only allow TCP and UDP. All outbound traffic is allowed, and the firewall is stateful, so you can ping out but not in.

Michael - sqlbot
  • 169,571
  • 25
  • 353
  • 427
0

Even it is late, it might be useful for someone. In lightsail just add new rule Allow TCP+UDP 0-65535.

Dilshod
  • 147
  • 4
  • 12
0

As of April 19, 2021, the protocol options in Lightsail firewall rules now include:

  • Ping (ICMP)
  • Custom ICMP
  • All ICMP

I have successfully got a Lightsail instance to respond to pings by selecting the first option, Ping (ICMP). No port selection is required. I recommend adding an IP restriction for enhanced security, if your use case allows.