Apt-get update doesnt pull

Posted April 24, 2019 3.2k views
NetworkingUbuntu 18.04

Clean droplet
First command apt-get update on root user fails
Removing /var/lib/apt/lists/* and cleaning apt-get clean doesn’t fix the problem
Adding DNS doesn’t either
I’m using IPV6
Pings to work

$ sudo apt-get update
0% [Working]
Err:1 main InRelease
Could not resolve host:
Err:2 xenial InRelease
Temporary failure resolving ''
Err:3 xenial-security InRelease
Temporary failure resolving ''
0% [Working]

What’s going on?

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Submit an Answer
2 answers

It was a firewall problem, I blocked tcp upd all in digitalocean’s firewall, didn’t notice the huge title saying they are outbound.



That is interesting. Given that outbound ping works I think we can rule out a lot of possibilities. I’m going to go out on a limb and theorize that outbound DNS resolution (53/UDP) may be blocked. Try this:

iptables -I OUTPUT -p udp --dport 53 -j ACCEPT

See if that helps any.