Recovering a VirtualBox mess after changing network settings

After switching a virtual machine from NAT to BRIDGED mode, I ran in the following issue: related to NAT forwards.

I wasn’t able to restore the original settings via GUI – which didn’t ever show the forwards.

I solved simply removing the nats with vboxmanage.

# for svc in {apache,proftpd}/{HostPort,GuestPort,Protocol}; do
vboxmanage setextradata ubuntu VBoxInternal/Devices/pcnet/0/LUN#0/Config/$svc;