venerdì 23 ottobre 2009

How to configure a port-forwarding in Virtualbox

I want that the oracle installed in to my virtualbox VM can be accessed from outsite.
The idea is to mount the port 1521 in to 127.0.0.1

You have to execute the following command on console when the VM is stopped:
VBoxManage setextradata "VMNAME" "VBoxInternal/Devices/pcnet/0/LUN#0/Config/oracle/Protocol" TCP
VBoxManage setextradata "VMNAME" "VBoxInternal/Devices/pcnet/0/LUN#0/Config/oracle/HostPort" 1521
VBoxManage setextradata "VMNAME" "VBoxInternal/Devices/pcnet/0/LUN#0/Config/oracle/GuestPort" 1521

To check if all is fine:
netstat -na | grep 1521
You'll see that the 1521 on your host (127.0.0.1) is listening

Nessun commento:

Posta un commento