I add a rule:

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

I list it:

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

But how can I delete it?


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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.