Wednesday, September 12, 2018

networking - apt-get not working behind restricted internet access


I have boxes running in a company but they have internet browsing and firewalls for security.


When I do apt-get update or install it fails. But I have a remote server which ip is only allowed to have access.


How can I tell apt-get to go to my cloud server and via the cloud server get the packages downloaded or updated?



Do you have a proxy at your company?
If so, you can set the proxy before running the apt-get update logged in as root first:


export http_proxy=http://host:port
apt-get update

Using sudo:


sudo http_proxy=http://host:port apt-get update

If your proxy requires authentication, you can set it in the URL (beware that the password will be saved in history as plain text):


http://username:password@host:port

No comments:

Post a Comment

11.10 - Can't boot from USB after installing Ubuntu

I bought a Samsung series 5 notebook and a very strange thing happened: I installed Ubuntu 11.10 from a usb pen drive but when I restarted (...