Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

This question already has an answer here:

I am trying to bypass the proxy for all addresses that are local network addresses. Such as http://test/ and http://mymachine/ and http://hismachine/

Is there an easy way to do that?

share|improve this question

marked as duplicate by jokerdino Jun 3 at 7:31

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

easier then a gui, i would try the command line using gconftool. – nelaar May 12 '11 at 12:03
have a look at this file ~/.conf/system/http-proxy/%gconf.xml. You would still need to update the system some how. Still looking into that. – nelaar May 12 '11 at 12:06

How are proxy settings set in the Ubuntu gnome environment.

These methods are not full proof and can break the configuration of the system. Making the network behave in an undesired way. Only do this if you understand how it affects different parts of the system.

You can set some of the proxy settings here. But for ignore hosts you will need to set that else where.

$ cat /etc/environment 

The env command is related to the above file but many programs and system utilities make changes to the environment. More info can be found here, read this before making changes.

$ env | grep proxy

simply change this by

export no_proxy

We need to add back the list of previously set no_proxy hence we add it back at the end of the line. This is only applicable to the terminal session that the command is run in and will not apply system wide read the community help documentation to make permanent changes.

To make changes in the gnome environment you can use the gconftool. Read the following guide before attempting to make changes.

Here are instructions on changing proxy settings using the gconftool

$ gconftool --recursive-list /system/http_proxy 
use_authentication = false
authentication_password = 
authentication_user = 
ignore_hosts =[localhost,,]
use_http_proxy = true
port = 8080
use_same_proxy = true
host =

The following file ~/.conf/system/http-proxy/%gconf.xml. Will be changed by the next command. I am unsure how to set a list type with gconftool. MY attempts ended up removing all the previous settings.

I am sure their is a better way to do this!!
Safe way to do it. get the current contents of the /system/http_proxy/ignore_hosts

gconftool -g  /system/http_proxy/ignore_hosts  

Next copy its contents into the next command and add the host you want to add.

gconftool  --type list --list-type string  -s /system/http_proxy/ignore_hosts '[localhost,,myhost]'
share|improve this answer

Assuming you're using the default Ubuntu Gnome desktop: You need to add your local host addresses to the ignore list in the gnome proxy settings:

alt text

share|improve this answer
I know about this, what I'm wondering is there anyway to add all addresses that do not have a domain... such as intranet or sharepoint to this site implicitly. It would really suck to have to add thousands of ignore entries. – spoon16 Nov 4 '10 at 4:38
That wasn't your question though. You asked how to ignore localhost addresses, this is how you do that. You should use the *.local address for all your localhost services anyway, that will make it easier to specify in this ignore list. But I don't know why you would have thousands of localhost services, could you explain? – Martin Owens -doctormo- Nov 4 '10 at 4:46
Using either .local when using mDNS/Avahi or some other LAN domain when using DNS (including when using something like Active Directory) is a good idea indeed. – JanC Nov 4 '10 at 11:44
Owens, my question was how to ignore ALL local host addresses. I reread it, I think the wording is clear :) I work at a very large organization, internal resources are not referred to locally with any sort of domain identifer in hrefs and there are literally thousands of domain local resources on the network. – spoon16 Nov 4 '10 at 17:29
Then you mean 'local network' not 'local host'. Although I maintain that a properly configured network would have only a handful of common domains. Your network seems misconfigured, but if you can't do anything about that now, then you could make a script and download the local dns repository parse it and put them all in ignores which are all stored in gconf. I don't think there is any existing way to do that, although perhaps a feature bug would be a good place to start from. – Martin Owens -doctormo- Nov 5 '10 at 8:21

Our IT department was able to provide an auto configuration URL that includes all of the appropriate ignore patterns and hosts for our domain. This is definitely the easiest way to go if it is available to you.

share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.