OSX Workflow still has a pointer to sshuttle #218

Closed
chuckbutler opened this Issue Jan 9, 2015 · 5 comments

Comments

Projects
None yet
3 participants
Collaborator

chuckbutler commented Jan 9, 2015

Adam Israel has removed the dependency on sshuttle, and we should probably remove this from the workflow docs and replace it with his new and improved workflow - as sshuttle dumps core on yosemite. Not an awesome experience for new users.

Member

evilnick commented Jan 16, 2015

I thought this was already fixed in docs?

Collaborator

chuckbutler commented Jan 18, 2015

It may be fixed in another location - but its still on the OSX Workflow page

Member

evilnick commented Jan 20, 2015

This is what currently lives there, is this not correct?

N.B. This is what is in the actual docs, not the docs published on jujucharms, which haven't been refreshed since it went live.


Routing local traffic to Vagrant

Note: If your local network is using 10.0.3.x you will need to alter the Juju networking in the vagrant box, and substitute the network provided in the command above

Native routing (OS X 10.10 and above)

It is possible to natively route traffic from your local machine to the lxc containers running within the Vagrant virtual machine.

sudo route add -net 10.0.3.0/24 172.16.250.15
This will only work until your next reboot. Instead, there is a way to create the route when you up your vagrant image and tear it down when you halt:

Install the vagrant-triggers plugin:

vagrant plugin install vagrant-triggers
Add the config.trigger rules in your Vagrantfile:

config.trigger.after [:provision, :up, :reload] do
system('sudo route add -net 10.0.3.0/24 172.16.250.15 >/dev/null')
end

config.trigger.after [:halt, :destroy] do
system('sudo route delete -net 10.0.3.0/24 172.16.250.15 >/dev/null')
end
Now, when you up and halt your Vagrant box, the route will be handled for you.

Using sshuttle (OS X 10.9 and below)

sshuttle creates a transparent proxy server on your local machine that allows you to connect directly to the lxc containers running within the Vagrant virtual machine. This process disassembles the TCP stream locally, multiplexes it statefully over the ssh session, and reassembles the packets on the other end of the tunnel.

Ensure that you have sshuttle installed

brew install sshuttle
sshuttle -r vagrant@localhost:2222 10.0.3.0/24
Note: You can skip the brew install line if you already have sshuttle installed

Note: sshuttle does not work under OS X 10.10 (Yosemite) due to the deprecation of ipfw in favor of pf.

When prompted for the password enter vagrant.

Collaborator

chuckbutler commented Jan 22, 2015

@evilnick ah that looks like it has been fixed up. 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment