I have a fresh install of Ubuntu 18.04 and need to configure proxy in a corporate environment which comes with a corporate proxy (I know domain, credentials, proxy server and port).
I copied out proxy url and port from another PC (non linux), and put it inside Firefox in Ubuntu. It asked me for my credentials and after entering them it worked for that Firefox session.
I figured now I can just add that to the Network options in Ubuntu. I chose the manual option in Proxy settings and filled all the protocol options with tested proxy URL and ports. It didn't work.
What I have tried so far:
- Inputting
username:password@proxyurl
anddomain\username:password@proxyurl
in manual proxy settings for every protocol. Port went to the designated input. - I tried just adding the proxyurl and port in the Manual config of Proxy settings without authorization
- Doing the terminal way of
export http_proxy="http://username:password@proxyurl:port/"
without any success - Setting up cntlm for domain, username, password hash, proxy server with port and rebooting ubuntu, restarting cntlm
- Previously tried on Ubuntu Gnome LTS (based off of Ubuntu 16.04 LTS) with all the aforementioned without any success
Question
How can I add a system-wide proxy to Ubuntu 18.04 that works in every app and terminal?
Best Answer
I have been able to solve this issue successfully. For anyone facing the same issues, here is what I did:
Tested on Ubuntu 18.04, 16.04 and CentOS 7
Instructions
cntlm
(supplied through Virtualbox Shared Folders)cntlm
in bash/etc/environment
to127.0.0.1:3128
(cntlm's listening port locally)/etc/apt/apt.conf
(e.g.Acquire::http::Proxy "http://127.0.0.1:3128";
for both http and https separately)Now either open a new terminal window to test connection (wget/apt) or sign out and back in to test system-wide settings.
Setting up with firefox
Firefox however didn't work with the steps above only. Open settings and on the bottom of the General tab there are proxy settings. Just input the address to your local server manually and check the box to use it for every protocol.