apt-get unable to resolve

Trying to install iptables-persistent with apt-get. It stucks with resolving resulting in “Temporary failure resolving” this hostname. I checked resolv.conf - it has & nameservers Also apt/sources.list has 5 deb entries with Infact I can’t even ping those nameservers along with other domains I’ve tried. Iptables set to output accept policy with no rules.

Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

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.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

@hungbc2811: You would only need to use if you were on an unsupported version of Ubuntu. If that is the case, I’d highly advise you to upgrade to a current release so that you still receive security support. “old-releases” just allows you to access the existing packages, you won’t get any update or security fixes.

Does it work if you temporarily reset your IPTables rules? <br>Run the following commands to take a backup of your rules and then reset everything to the defaults: <br><pre>sudo iptables-save | sudo tee iptables.backup <br>sudo iptables -F <br>sudo iptables -X</pre> <br>Then, check if the apt-get command works. <br>You can restore your rules by running this command: <br><pre>sudo iptables-restore < iptables.backup</pre>