How to delete VirtualBox networking rule

virtualbox

I add a rule:

VBoxManage modifyvm "xp" --natpf1 "guestrdp,tcp,127.0.0.1,33890,,3389"

I list it:

VBoxManage showvminfo "xp" | awk '/NIC/ && /Rule/ {print}'
NIC 1 Rule(0):   name = guestrdp, protocol = tcp, host ip = 127.0.0.1, host port = 33890, guest ip = , guest port = 3389

But how can I delete it?

Best Answer

The first argument inside the quotes of the rule you created is the rule name. You can delete the rule by name like this:

VBoxManage modifyvm xp --natpf1 delete guestrdp

To find these kind of things out the fastest place to look is VBoxManage --help | less.

Related Question