Ubuntu: Firefox does not connect outside proxy while other browsers do


Little background: I am behind a proxy, where we use "automatic proxy config URL" on http://webproxy.mycompany.com:8080

During typing of this question I also tried Chromium browser which seems to be working. However, Firefox and terminal seem to be not working properly:

Setup of my Ubuntu:

System Settings - Network Proxy - Configuration URL http://webproxy.mycompany.com:8080 - applied system wide


Edit - Preferences - Network

Here I tried: Note - the "no use" means = cannot connect outside mycompany.com intranet

  1. Automatic Proxy configuration URL - http://webproxy.mycompany.com:8080 - no use
  2. Use system proxy settings - no use
  3. Autodetect - no use

The error I am getting when trying to reach askubuntu.com:

Unable to connect

Firefox can't establish a connection to the server at askubuntu.com.

The site could be temporarily unavailable or too busy. Try again in a few moments.  If you are unable to load any pages, check your computer's network connection.  If your computer or network is protected by a firewall or proxy, make sure that Firefox is permitted to access the Web.  

Setup of Chromium - I am not that advanced user here, but it seems it takes system settings

system setup


http_proxy=http://webproxy.mycompany.com:8080  https_proxy=http://webproxy.mycompany.com:8080  ftp_proxy=http://webproxy.mycompany.com:8080  no_proxy=.mycompany.com  

sudo visudo

Defaults        env_keep = "http_proxy https_proxy ftp_proxy"  

In terminal, I can effectively run sudo apt-get update but pinging google says this:

PING www.google.com ( 56(84) bytes of data.  --- www.google.com ping statistics ---  10 packets transmitted, 0 received, 100% packet loss, time 9070ms  

How to force Firefox and terminal to reach outside world?

Edit Firefox works on other machines in the same network, so it cannot be security setting on the proxy


I've been having a similar issue: http(s)_proxy are both set as environment variables, and pretty much all CLI-programs work.

But Firefox doesn't.

After many tries we figured out that while http://proxy.mycompany.com:8080 works fine most of the time, Firefox doesn't seem to like the leading http://. Setting a manual proxy to just proxy.mycompany.com:8080 makes Firefox behave as needed.

Not sure whether it's a bug in Firefox or what, but at the very least, it's a sensible workaround.


I do not think that you are using automatic proxy but rather manual proxy, because that is what you fill into /etc/environment. Try to select "Manual Proxy Configuration", fill in the HTTP Proxy as webproxy.mycompany.com, Port 8080 and click "Use this proxy for all protocols". If proxy items in ypour /etc/environment do something, than this must work for Firefox.

Automatic proxy is URL path to the PAC file, which is something else than the actual proxy settings. For more details on Auto proxy configuration : https://en.wikipedia.org/wiki/Proxy_auto-config


If I remember it correctly, there is software that wants the proxy environment variables to be uppercase. Have you tried to define the following?

export HTTP_PROXY=$http_proxy  export HTTPS_PROXY=$https_proxy  export FTP_PROXY=$ftp_proxy  


Make a new file /etc/profile.d/your_new_file.sh and put the below code in it

http_proxy="http://webproxy.mycompany.com:8080"  https_proxy="http://webproxy.mycompany.com:8080"  ftp_proxy="http://webproxy.mycompany.com:8080"  HTTP_PROXY=$http_proxy  HTTPS_PROXY=$http_proxy  FTP_PROXY=$http_proxy  no_proxy=localhost,,,,,updatesrv # enter your network  NO_PROXY=$no_proxy  export http_proxy ftp_proxy https_proxy HTTP_PROXY HTTPS_PROXY FTP_PROXY no_proxy NO_PROXY   

Save the file and reboot your system. Your firefox terminal and every service running on your computer will pass through the proxy.


Try editing the following files and enter your proxy details in them;

In /etc/bash.bashrc:

 export http_proxy=http://username:password@proxyserver.net:port/   export ftp_proxy=http://username:password@proxyserver.netport/  

In /etc/environment:

http_proxy=yourproxy  https_proxy=yourproxy  ftp_proxy=yourproxy  

In /etc/apt/apt.conf:

Acquire::http::proxy yourproxy  Acquire::https::proxy yourproxy  

Then restart the terminal and check. Hopefully, the issue will be resolved.

Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Next Post »