Monday, September 22, 2014

Working with Chef and Vagrant while on VPN

I've been beating my head against every object in my living room for the last 2 hours.

Last time this happened it turned out that the VPN I was on was blocking all 10.* addresses - in case you didnt realize, Vagrant assigns 10.* address by default. So simply changing the network IP address in Vagrantfile solved the problem.

Solution to internal network blocking 10.* addresses: :public_network, ip: ""

Well, something happened and everything stopped working again (I am a consultant for a company, so perhaps something got locked down just for contingent staff, because all of the FTEs can work just fine with default config).

Solution is to allow VPN passthrough in Vagrantfile:
... :private_network, ip: ""
config.vm.provider :virtualbox do |p|
    p.gui = true
    p.customize ["modifyvm", :id, "--memory", "1500", "--clipboard", "bidirectional", "--natdnshostresolver1", "on"]

* shamelessly stolen from a random (but very useful) site I found after banging my head against a keyboard failed to produce the desired outcome. (source: (I even kept the pretty code background)).

Random yet very accurate and completely unrelated funny