0

I installed a Ubuntu 16.04 VirtualBox and wrote the apt.conf file to access Internet via my proxy:

Acquire::http::proxy "http://userID:pwd@host:port";

And now I can update & install packets.

I also configured Firefox (a.w.a. Opera) to connect through the proxy.

From Preferences > General > Network Proxy > Settings, I ticked the "Automatic proxy configuration URL" option and typed the URL to my proxy script:

http://host/proxy-file.pac

This also works and I can browse the wonders of the web.

However, when I try to access the Internet through other softwares (e.g. give my license in CLion or connect to my GitKraken account) my request fails, and it looks like the software cannot access Internet through the proxy.

In my VM configuration window, I changed the network access type from NAT to Bridged, yet it doesn't work & GitKraken tells me again that it can't connect to the server (even though it asked for my credentials to connect to the proxy, which it didn't do before).

I also tried to set general setting for proxy on Ubuntu in Settings > Network > Network Proxy. I chose the manual method and gave the URL to my proxy script in the HTTP Proxy field.

Is there a step that I missed for configuring Internet connection? What can I do to set the proxy configuration for softwares that aren't browsers or in CLI?

1

Solved the problem with editing wgetrc and installing cntlm.

Editing wgetrc:

cd /etc
sudo nano wgetrc

I uncommented the following lines:

https_proxy = http://username:userpwd@proxy:3128/
http_proxy = http://username:userpwd@proxy:3128/
ftp_proxy = http://username:userpwd@proxy:3128/

use_proxy=on

Editing and configuring cntlm:

sudo apt install cntlm
sudo nano /etc/cntlm.conf

And then edit the following fields:

Username username
Domain proxydomain
Paswword pwd
[...]
Proxy proxyaddress:3128
Noproxy localhost, 127.0.0.*, 10.*, 192.168.*
Listen proxyport

cntlm gives proxy information to all programs in need. For some reason, I still needed to override wgetrc proxy values for the cntlm conf file was not enough.

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.