Uninstalling Proxy Servers

Asked by Philip

I used to have to connect through a proxy server, so someone set up the computer to run through the proxy server. Now I have a direct connection to the Internet, and firefox accesses the internet, but my update manager can't, either through the desktop interface, or the terminal. I've reset the Network Proxy Preferences to Direct Internet Connection, but it hasn't helped, I think that my problem is deeper. My apt.conf file is just a blank page, if you know what I should paste into it then please post it here. The file at "gedit ~/.bashrc" doesn't contain any references to the proxy connection, if that helps.
Can anyone help me so that I can upgrade to Gutsy?

Question information

Language:
English Edit question
Status:
Answered
For:
Ubuntu gnome-nettool Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
marcobra (Marco Braida) (marcobra) said :
#1

Philip try this, open a terminal and type, and look for proxy def line:
sudo gedit /etc/apt/apt.conf
or move the:
sudo mv /etc/apt/apt.conf.d/proxy /etc/apt/apt.conf.d/proxy.old
then try to update and upgrade
sudo apt-get update; sudo apt-get upgrade

HTH

Revision history for this message
Philip (philipwallbridge) said :
#2

I'm sorry, but my /etc/apt/apt.conf file is just a blank page. Should I paste something into it, and if so what?

Revision history for this message
marcobra (Marco Braida) (marcobra) said :
#3

It is ok it'is only a check to get and remove old proxy setup.

Have you checked if you don't have any /etc/apt/apt.conf.d/proxy
file if is there simply remove or move it.

Then open a terminal from Applications->Accessories->Terminal and try to update and upgrade your system with:

sudo apt-get update; sudo apt-get upgrade

Give your password when requested (you don't see nothing when you type it) then press enter.

Please give the result of upgrade.

There are other places where we must remove old proxy conf.

Thank you.

Revision history for this message
Philip (philipwallbridge) said :
#4

I don't seem to have a proxy file in /etc/apt/apt.conf.d. I have 01ubuntu, 05aptitude, 10periodic, 20archive, 50unattended-upgrades, 70debconf and 99update-notifier.
When I use sudo apt-get update in the terminal it still tries to access the proxy server. It gives the following.

philip@Pips-Mean-Machine:~$ sudo apt-get update
0% [Connecting to wwwcache2.dur.ac.uk (129.234.4.10)] [Connecting to wwwcache2.

where wwwcache2 was the proxy server.

Revision history for this message
marcobra (Marco Braida) (marcobra) said :
#5

Unset proxy setting if they are setted:
A) Go to System->Preferences->Network proxy and unset it
B) Go to System->Administration->Synaptic Package Manager->Settings->Preferences->Under Network Tab

HTH

Revision history for this message
Philip (philipwallbridge) said :
#6

Sorry, they were already both set to direct internet connection. I've re-checked it, and it still doesn't work.

Revision history for this message
marcobra (Marco Braida) (marcobra) said :
#7

Be sure you don't have some http_proxy environment variable set open a terminal and type:
set | grep -i proxy

HTH

Revision history for this message
Philip (philipwallbridge) said :
#8

Thank you, we seem to be getting somewhere. When I did what you requested I got the following appear in the terminal. How do I now use this to remove this proxy server setting.

philip@Pips-Mean-Machine:~$ set | grep -i proxy
http_proxy=http://wwwcache2.dur.ac.uk:8080

Revision history for this message
Clóvis Fabrício (nosklo) said :
#9

You may unset this variable:
unset http_proxy

and

sudo apt-get update

Should work.

If this is ok then you must find out where in your system this variable is being defined so it will work without having to unset this variable every time.

Please check if it is being defined in /etc/environment, and if it is, remove it.

Revision history for this message
marcobra (Marco Braida) (marcobra) said :
#10

Ok unsetting this variable must make all go fine
now to find where it is set you can do this from terminal:
cd
grep -i http_proxy=http://wwwcache2.dur.ac.uk:8080 *
and
grep -i http_proxy=http://wwwcache2.dur.ac.uk:8080 .*

You will get the list or the single file of your home directory where the http_proxy var is setted up
edit this file with:

gedit filename

and remove the row with the variable.

HTH

Revision history for this message
Crazyness (crazyness) said :
#11

Hi, I know im a little late on the sunbect, but i seem to have snagged on this problem.

The last post submitted by marcobra
I cant follow it.

See, my problem is that instead of an actuall proxy, the machine keeps pointing to localhost:4001
when i do a set | grep -i proxy
 i get [code]xxx@xxx:~$ set | grep -i proxy
HTTP_PROXY='http://localhost:4001 '
http_proxy=
   --ftpproxy --ftpport --justdb --httpproxy --httpport \
    --rcfile --requires --ftpport --ftpproxy \
    --httpproxy --httpport --provides --triggers \
    --requires --triggeredby --ftpport --ftpproxy \
    --httpproxy --httpport --provides --triggers \
    --requires --triggeredby --ftpport --ftpproxy \
    --httpproxy --httpport --provides --triggers \
[/code]
Where do i find the file and how. I cannot execute what marcobra stated, the terminal just hangs.

Thanks

Revision history for this message
marcobra (Marco Braida) (marcobra) said :
#12

To find row that set your proxy environment variable:

Open a terminal and type:

grep -i http_proxy .bash_profile

and

grep -i http_proxy .bashrc

Plase tell me the result...

Thank you

Revision history for this message
Crazyness (crazyness) said :
#13

xxx@xxx:~$ grep -i http_proxy .bash_profile
grep: .bash_profile: No such file or directory
xxx@xxx:~$ grep -i http_proxy .bashrc
xxx@xxx:~$

It gave me nothing.

On a lighter side, i did solve the problem with a whole bunch of shenanigans. In the end all it took was a simple restart.
see http://ubuntuforums.org/showthread.php?p=5609567#post5609567

Revision history for this message
marcobra (Marco Braida) (marcobra) said :
#14

Please be sure you have typed the right command:

grep -i http_proxy .bash_profile

grep <space> -i <space> http_proxy <space> .bash_profile

then please type:

grep -i http_proxy *

thank you

Revision history for this message
Crazyness (crazyness) said :
#15

i typed it word for word, copy/paste and again character by character.

xxx@xxx:~$ grep -i http_proxy .bash_profile
grep: .bash_profile: No such file or directory
xxx@xxx:~$ grep -i http_proxy *
xxx@xxx:~$

Nothing happens.

I did mention that i dont have the http_proxy problem anymore
 like if i issue

shype@troggie-2:~$ echo $http_proxy
[intentionally left blank]
shype@troggie-2:~$
and
shype@troggie-2:~$ set | grep http_proxy
shype@troggie-2:~$

I can now download from repositories, update packages, etc. I actually wanna thank you guys. I dont know how it worked, but it did. So thanks.

But sorry marcobra, the commands you're giving me yield nothing. sorry and thanks

Revision history for this message
marcobra (Marco Braida) (marcobra) said :
#16

The previous suggested commands will get nothing back if there are not string like "http_proxy" into some common files usually used to set environment variables.
It was only a check to find the "http_proxy" string into your home directory files.

Hope this helps

Revision history for this message
Neil (neil-ghosh) said :
#17

deleting the http_proxy entry from /etc/environment worked !

Can you help with this problem?

Provide an answer of your own, or ask Philip for more information if necessary.

To post a message you must log in.