Using apt-get through UCT's proxy


I have been having real issues trying to use apt-get from my laptop while at university. I configured cntlm just as they tell me to in, I also have edited apt.conf to include the correct proxy. But it does not work.

Is there any standard way of doing this? I am at my witts end, and help would be greatly appreciated.

What does “it does not work”

What does “it does not work” mean? Does it just hang while attempting to download anything?

0) You should be using the LEG repository mirror; it’s much much faster from campus. You should be able to install anything in the standard repositories without a proxy. Follow these instructions:

1) Are you exporting the proxy environment variables in your .bashrc? You should have something like this (the port should match “Listen” in your cntlm.conf, unless you have another proxy layer before cntlm):

export http_proxy=http://localhost:3128
export ftp_proxy=http://localhost:3128
export https_proxy=http://localhost:3128

2) If your proxy variables are set correctly, and you are able to e.g. download an external webpage on the commandline using wget, did you edit your sudoers file to ensure that these variables are kept when you use sudo?

$ sudo visudo

Add this line above “Defaults env_reset”:
Defaults env_keep = “http_proxy ftp_proxy https_proxy no_proxy”

3) The other thing people usually forget is setting the proxy variables again in the apt config. You have done this, so you should be fine. For anyone else reading, edit /etc/apt/apt.conf and add something like:

Acquire::http::proxy “http://localhost:3128/”;
Acquire::ftp::proxy “http://localhost:3128/”;
Acquire::https::proxy “https://localhost:3128/”;

I think I have the same

I think I have the same problem. Since the upgrade to 12.04 I haven’t been able to download anything with command lines and none of the non-uct repositories appear to be working. I’m guessing then that those requests are not going through the network proxy. Any attempt to download from those sources just times out.

I tried the cntlm instructions but they didn’t seem to work. When I tried “$ sudo cntlm -M” It took a long time and then just finished without giving any configuration or error messages. The usual UCT repositories work and all my programmes (browsers, messengers and Mendeley) seem to work.

I fiddled with cntlm again

I fiddled with cntlm again and got told my profile was okay when I did “$ sudo cntlm -M” but it’s still not downloading from other repositories. I’m not sure where the .bashrc is so I haven’t edited that but I did try the other steps with no success. When I edited apt.conf Synpatic wouldn’t start because it said there was extra stuff at the end of the config file.

I fixed my problem. While I’m

I fixed my problem. While I’m pretty sure I followed all the instructions the first time I found that to get Synaptic to work I just had to go to it’s network settings and set proxy to localhost on port 8080. I’m guessing then that that didn’t export as it was supposed to when setting up cntlm.

Syndicate content