Created
July 8, 2015 12:38
-
-
Save micheleb/f26cea573aa292f6a184 to your computer and use it in GitHub Desktop.
A script to add NAT forwarding rules to a VirtualBox VM
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 | |
if [[ "$#" -eq "4" ]]; then | |
VBoxManage modifyvm "$1" --natpf1 "$2,tcp,,$3,,$4" | |
else | |
echo 'USAGE: vm_forward_add vm_name rule_name host_port guest_port' | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment