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



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

no_proxy=localhost,,,,,updatesrv # enter your network
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:


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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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