I'm on a Windows machine behind a corporate NTLM proxy and I need to vagrant up
a VM from the given Vagrantfile
.
I've read a few things on this topic:
- http://runefs.com/2014/11/28/setting-up-vagrant-behind-a-corporate-proxy/
- VirtualBox: How to set up networking so both host and guest can access internet and talk to each other
What I've so far:
CNTLM on my Windows machine, listening to 192.168.33.1:5865
. Here's a snippet from cntlm -v -f
section: global, Listen = '5865'
section: global, Listen = '192.168.33.1:5865'
Exported HTTP_PROXY
and HTTPS_PROXY
:
set HTTP_PROXY=http://192.168.33.1:5865
set HTTPS_PROXY=http://192.168.33.1:5865
Installed the vagrant-proxyconf
plugin
Created the .vagrant.d\Vagrantfile
:
Vagrant.configure("2") do |config|
# configuration based on http://digitaldrummerj.me/vagrant-behind-proxy-server/
if Vagrant.has_plugin?("vagrant-proxyconf")
config.proxy.http = "http://192.168.33.1:5865/"
config.proxy.https = "http://192.168.33.1:5865/"
config.proxy.no_proxy = "localhost,127.0.0.1,10.43.125.137,10.43.125.137,10.43.124.177"
end
end
Set up a Windows firewall rule to allow everything from 192.168.33.10
to 192.168.33.1
, on any port, for all programs and profiles.
And I'm still getting:
==> default: Cannot add PPA: 'ppa:webupd8team/java'.
==> default: Please check that the PPA name or format is correct.
==> default: Err http://security.ubuntu.com trusty-security InRelease
==> default:
==> default: Err http://security.ubuntu.com trusty-security Release.gpg
==> default: Unable to connect to 192.168.33.1:5865:
==> default: Err http://archive.ubuntu.com trusty InRelease
==> default:
==> default: Err http://archive.ubuntu.com trusty-updates InRelease
==> default:
==> default: Err http://archive.ubuntu.com trusty-backports InRelease
==> default:
==> default: Err http://archive.ubuntu.com trusty Release.gpg
==> default: Unable to connect to 192.168.33.1:5865:
==> default: Err http://archive.ubuntu.com trusty-updates Release.gpg
==> default: Unable to connect to 192.168.33.1:5865:
==> default: Err http://archive.ubuntu.com trusty-backports Release.gpg
==> default: Unable to connect to 192.168.33.1:5865:
==> default: Reading package lists...
==> default: W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/trusty/InRelease
==> default:
==> default: W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/trusty-updates/InRelease
==> default:
==> default: W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/trusty-backports/InRelease
==> default:
==> default: W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/trusty-security/InRelease
==> default:
==> default: W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/trusty-security/Release.gpg Unable to connect to 192.168.33.1:5865:
==> default:
==> default: W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/trusty/Release.gpg Unable to connect to 192.168.33.1:5865:
==> default:
==> default: W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/trusty-updates/Release.gpg Unable to connect to 192.168.33.1:5865:
==> default:
==> default: W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/trusty-backports/Release.gpg Unable to connect to 192.168.33.1:5865:
==> default:
==> default: W: Some index files failed to download. They have been ignored, or old ones used instead.
Note all these Unable to connect to 192.168.33.1:5865
.
Why can't my guest connect to the proxy on my host? How can I diagnose this?
I am quite sure CNTLM proxy works, Vagrant itself accesses it a couple of times to check if the box is still actual. But the provisioning scripts which are executed later on can't.
I'm trying this for several hours already, getting desperate. Does anyone have an idea?