2

I am using amazon aws ec2 instance. I created an instance. I got a key-pair, and using that I logged in via ubuntu. Now, I am trying to run sudo apt-get update on the remote server. What I am getting is:

ubuntu@ip-172-31-30-46:~$ sudo apt-get update
Err http://us-west-2.ec2.archive.ubuntu.com trusty InRelease                   

Err http://us-west-2.ec2.archive.ubuntu.com trusty-updates InRelease           

Err http://us-west-2.ec2.archive.ubuntu.com trusty-backports InRelease         

Err http://us-west-2.ec2.archive.ubuntu.com trusty Release.gpg                 
  Unable to connect to us-west-2.ec2.archive.ubuntu.com:http: [IP: 54.184.254.88 80]
Err http://us-west-2.ec2.archive.ubuntu.com trusty-updates Release.gpg
  Unable to connect to us-west-2.ec2.archive.ubuntu.com:http: [IP: 54.184.254.88 80]
Err http://us-west-2.ec2.archive.ubuntu.com trusty-backports Release.gpg
  Unable to connect to us-west-2.ec2.archive.ubuntu.com:http: [IP: 54.184.254.88 80]
0% [Connecting to security.ubuntu.com (91.189.91.15)]

I think that internet is not working on my server. After googling I got the following solution: Ec2 instance on AWS apt- get not working, but it is already configured in my instance. Please help me to solve this.

Community
  • 1
  • 1
learner
  • 4,614
  • 7
  • 54
  • 98
  • 1
    How did you set up this EC2 instance internet access? in a VPC with an internet Gateway + public IP, in a VPC private subnet with NAT? – Tom Jan 24 '16 at 10:48

1 Answers1

0

I will advise you to check your firewall settings. There is a probability you've set deny all outgoing connections.

sudo ufw default allow outgoing

This will allow connection to outside server

David Addoteye
  • 1,587
  • 1
  • 19
  • 31