Skip to content

Instantly share code, notes, and snippets.

@funkytaco
Last active October 29, 2015 06:05
Show Gist options
  • Save funkytaco/41642e4bea738c52d020 to your computer and use it in GitHub Desktop.
Save funkytaco/41642e4bea738c52d020 to your computer and use it in GitHub Desktop.
open all virtualbox ports for docker default host
#!/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
#!/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