Created
July 6, 2015 08:54
-
-
Save trastle/d118465bd413283ffc2e to your computer and use it in GitHub Desktop.
boot2docker-portforward.sh
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
VMNAME="boot2docker-vm" | |
VBoxManage modifyvm "${VMNAME}" --natpf1 "tcp-port$i,tcp,127.0.0.1,2376,,2376"; | |
VBoxManage modifyvm "${VMNAME}" --natpf1 "udp-port$i,udp,127.0.0.1,2376,,2376"; | |
for i in {49001..49999}; do | |
VBoxManage modifyvm "${VMNAME}" --natpf1 "tcp-port$i,tcp,127.0.0.1,$i,,$i"; | |
VBoxManage modifyvm "${VMNAME}" --natpf1 "udp-port$i,udp,127.0.0.1,$i,,$i"; | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment