Last active
October 29, 2015 06:05
-
-
Save funkytaco/41642e4bea738c52d020 to your computer and use it in GitHub Desktop.
open all virtualbox ports for docker default host
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 | |
for i in {10000..10999}; do | |
VBoxManage modifyvm "default" --natpf1 "tcp-port$i,tcp,,$i,,$i"; | |
VBoxManage modifyvm "default" --natpf1 "udp-port$i,udp,,$i,,$i"; | |
done |
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 | |
# vm must be powered off | |
for i in {49000..49900}; do | |
VBoxManage modifyvm "default" --natpf1 delete "tcp-port$i"; | |
VBoxManage modifyvm "default" --natpf1 delete "udp-port$i"; | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment