Skip to content

Instantly share code, notes, and snippets.

@anex
Last active December 18, 2015 18:53
Show Gist options
  • Save anex/763d6d5e8689d5ba77ac to your computer and use it in GitHub Desktop.
Save anex/763d6d5e8689d5ba77ac to your computer and use it in GitHub Desktop.
Docker machine forward port
#SSH Tunnel
ssh docker@$(docker-machine ip default) -L host_ip:host_port:guest_ip:guest_port (pass: tcuser)
#Virtualbox forward
#When the machine is running
VBoxManage controlvm <docker_machine_name> natpf1 “<rule_name>,<rule_protocol>,<host_ip>,<host_port>,<guest_ip>,<guest_port>“;
#When the machine isn't running
VBoxManage modifyvm <docker_machine_name> natpf1 “<rule_name>,<rule_protocol>,<host_ip>,<host_port>,<guest_ip>,<guest_port>“;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment