I have created a centos 7 ec2 instance on AWS. it resides in a public subnet which have an internet gateway attached to VPC.
the inbound rules are as follow:
Ports Protocol Source ohio-dev-rst-public
80 tcp 0.0.0.0/0, ::/0 ✔
22 tcp 0.0.0.0/0, ::/0 ✔
the outbound rules are as follows:
5439 tcp sg-06fb92bc4187207c5 ✔
80 tcp 0.0.0.0/0, ::/0 ✔
22 tcp sg-06fb92bc4187207c5 ✔
I need internet to do software updates but I can access the internet and I can’t ping.
[centos@ip-192-168-3-205 ~]$ ping www.google.com
PING www.google.com (172.217.0.4) 56(84) bytes of data.
2
Answers
Ping uses the ICMP protocol. Add that protocol to your outbound rules and try again.
when you create an EC2 instance by using the console, by default all the outgoing traffic are enabled.
It is tricky to say what ports the software updates uses. In my opinion, it may vary depend on the operating system that you are using.
I would suggest to start with enabling the following ports and see if you can get the software updates running again.
80 – HTTP
443 – HTTPS
21 – FTP
All Ports- ICMP (ping)
Hope this helps.