Proxy authentication with terminal Ubuntu 14.04
Solution 1
Test this:
sudo su -
apt-get update
apt-get install ntlmaps
Configure it: domain, username, password, proxyserver.net, port
Files:
/etc/bash.bashrc
export http_proxy=http://127.0.0.1:5865
export https_proxy=http://127.0.0.1:5865
export ftp_proxy=http://127.0.0.1:5865
/etc/environment
http_proxy=http://127.0.0.1:5865
https_proxy=http://127.0.0.1:5865
ftp_proxy=http://127.0.0.1:5865
/etc/apt/apt.conf
(create the file if it does not exist)
Acquire::http::Proxy "http://127.0.0.1:5865";
Acquire::https::Proxy "http://127.0.0.1:5865";
Acquire::ftp::Proxy "http://127.0.0.1:5865";
Solution 2
What you did (export http_proxy=http://name:password@proxy_server:port/
) is actually pretty close to what works for me:
http_proxy="http://name:password@proxy_server:port/"
export http_proxy
I hope this works for you, too. ;)
Related videos on Youtube
muru
Updated on September 18, 2022Comments
-
muru over 1 year
I would like to access the internet to update files etc. from the terminal on a secured proxy network. I've already tried the following:
Adding to
/etc/apt/apt.conf
,/etc/apt/apt.conf.d/01proxy
,/etc/apt/apt.conf.d/01ubuntu
:Acquire::http::proxy "http://name:password@proxy_server:port";
export http_proxy=http://name:password@proxy_server:port/
on a terminal.- Adding
export http_proxy=http://name:password@proxy_server:port/
to/etc/bash.bashrc
These were few of the major efforts. There are no spaces in my username nor are there any special characters in my password (especially "@"). I've double checked and all the information entered is correct. The info is correct because it works with the browser (Manual proxy in Network and authentication when first opened the browser). I've also tried by making the "p" in "proxy" into capitals but to avail. I always get the error:
407 Proxy Authentication Required.
Any help is appreciated.-
Admin over 9 yearsWhere do ntlmaps (or cntlm) come from? Are they part of the install? But if they come from an internet store, how is this going to work if the internet connection is what's not working?
-
codeape over 9 yearsAnother option is to use cntlm: apt-get install cntlm. I have not measured, but cntlm is supposed to have better performance. This seems reasonable since cntlm is C and ntlmaps is Python
-
Merlijn Sebrechts about 9 yearsThis is exactly the same, just in two lines instead of one...
-
Merlijn Sebrechts about 9 yearsHow can you download ntlmaps when you have no internet connection because you need to connect to a proxy?
-
octavian about 9 yearsIt works for me if I use quatation marks. Without it doesn't...
-
JFA almost 9 yearsNow
wget
,apt-get update
, andapt-get upgrade
are not hanging, butapt-get
is failing andwget
is saying "Proxy request sent, awaiting response." Not sure what's going on. No one has a terminal solution at my work bc they all use the GUI.