Skip to content

Instantly share code, notes, and snippets.

@sgonyea
Created December 11, 2013 19:02
Show Gist options
  • Save sgonyea/7916375 to your computer and use it in GitHub Desktop.
Save sgonyea/7916375 to your computer and use it in GitHub Desktop.
function forward-vagrant-ports {
ssh-add ~/.vagrant.d/insecure_private_key
ssh -fNL 11211:127.0.0.1:11211 \
-L 3306:127.0.0.1:3306 \
-L 6379:127.0.0.1:6379 \
-L 6380:127.0.0.1:6380 \
-L 26379:127.0.0.1:26379 \
-R 8081:127.0.0.1:8081 \
vagrant@192.168.33.10
}
function list-open-ports {
lsof -i -n | egrep 'COMMAND|LISTEN'
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment