Opening and Forwarding Ports To A VirtualBox-based Guest
Here are the commands used to open and forward the host’s port 2222 to the guest’s port 22 (SSH Server Port).
Type this into a terminal:
VBoxManage setextradata nameofyourguest "VBoxInternal/Devices/pcnet/0/LUN#0/Config/ssh/HostPort" 2222
VBoxManage setextradata nameofyourguest "VBoxInternal/Devices/pcnet/0/LUN#0/Config/ssh/GuestPort" 22
VBoxManage setextradata nameofyourguest "VBoxInternal/Devices/pcnet/0/LUN#0/Config/ssh/Protocol" TCP
Could also be used to forward PostgreSQL and HTTP:
VBoxManage setextradata nameofyourguest "VBoxInternal/Devices/pcnet/0/LUN#0/Config/postgresql/HostPort" 5432
VBoxManage setextradata nameofyourguest "VBoxInternal/Devices/pcnet/0/LUN#0/Config/postgresql/GuestPort" 5432
VBoxManage setextradata nameofyourguest "VBoxInternal/Devices/pcnet/0/LUN#0/Config/postgresql/Protocol" TCP
VBoxManage setextradata nameofyourguest "VBoxInternal/Devices/pcnet/0/LUN#0/Config/http/HostPort" 8080
VBoxManage setextradata nameofyourguest "VBoxInternal/Devices/pcnet/0/LUN#0/Config/http/GuestPort" 80
VBoxManage setextradata nameofyourguest "VBoxInternal/Devices/pcnet/0/LUN#0/Config/http/Protocol" TCP
Related posts:
Popular Related Items »
Incoming search terms
- virtualbox port forwarding
- virtualbox open port
- virtualbox open ports
- virtualbox port forward
- virtualbox port forwarding windows
- open port virtualbox
- virtualbox forward ports
- virtualbox guest server
- open ports virtualbox
- port forwarding virtualbox
- virtualbox nat open port
- virtualbox forward port
- virtualbox redirect port
- port forward VirtualBox
- VBoxManage port forwarding
- virtualbox port redirect
- ssh into virtualbox guest
- ubuntu virtualbox port forwarding
- vboxmanage setextradata
- virtualbox mysql
- virtualbox mysql port forwarding
- virtualbox opening ports
- vboxmanage http
- virtual box open port
- VIRTUAL BOX OPEN PORTS
- virtualbox redirect ports
- how to open ports in virtualbox
- virtualbox port forwarding mysql
- connect to virtualbox apache
- forward ports to virtualbox
- open ports in virtualbox
- vboxmanage ports
- vboxmanage ssh
- virtualbox mysql port
- virtualbox port forwarding ubuntu
- virtualbox postgresql
- virtualbox windows port forwarding
- forward ports virtualbox
- open all ports virtualbox
- opening port on virtualbox
- ubuntu virtualbox port forward
- virtualbox forwarding
- virtualbox port forwarding windows 7
- virtualbox port open
- virtualbox port redirection

Christ said,
September 25, 2008 @ 11:40
Thanks. Unfortunately, the guest is still closing the connection when using pgAdmin to connect. Did you get this to work?
Redirecionando portas para VirtualBox. @ Matheus Bratfisch said,
May 18, 2009 @ 19:49
[...] IPtables Tutorial IPTables Port Redirect VirtualBox, com nat VBoxManage Port Forward Linux porta, redirecionamento, [...]