VirtualBox NAT Port Forwarding Settings(Windows XP)
2008-11-23 14:02
357 查看
Applies to VirtualBox 2.0
Use VBoxManager.exe (In VirtualBox installation directory).
Type in command line:
VBoxManager.exe setextradata "GuestName" "VBoxInternal/Devices/pcnet/0/LUN#0/Config/ssh/Protocol" TCP
VBoxManager.exe setextradata "GuestName" "VBoxInternal/Devices/pcnet/0/LUN#0/Config/ssh/GuestPort" 22
VBoxManager.exe setextradata "GuestName" "VBoxInternal/Devices/pcnet/0/LUN#0/Config/ssh/HostPort" 29876
"GuestName" is name of virtual machine.
"ssh" is just a name for this port forwarding, can be anything
This will add the following lines in the virtual machine's .xml file:
<ExtraDataItem name="VBoxInternal/Devices/pcnet/0/LUN#0/Config/ssh/Protocol" value="TCP"/>
<ExtraDataItem name="VBoxInternal/Devices/pcnet/0/LUN#0/Config/ssh/GuestPort" value="22"/>
<ExtraDataItem name="VBoxInternal/Devices/pcnet/0/LUN#0/Config/ssh/HostPort" value="29876"/>
To add another port forwarding, use another name and port sets, e.g.:
VBoxManager.exe setextradata "GuestName" "VBoxInternal/Devices/pcnet/0/LUN#0/Config/web/Protocol" TCP
VBoxManager.exe setextradata "GuestName" "VBoxInternal/Devices/pcnet/0/LUN#0/Config/web/GuestPort" 80
VBoxManager.exe setextradata "GuestName" "VBoxInternal/Devices/pcnet/0/LUN#0/Config/web/HostPort" 8080
To set a global port forwarding, use "Global" instead of "GuestName", and the change is made in VirtualBox's global settings .xml,
usually it's at C:/Documents and Settings/<Profile Name>/.VirtualBox/VirtualBox.xml
All settings above require to close virtual machines and restart VirtualBox.
Use VBoxManager.exe (In VirtualBox installation directory).
Type in command line:
VBoxManager.exe setextradata "GuestName" "VBoxInternal/Devices/pcnet/0/LUN#0/Config/ssh/Protocol" TCP
VBoxManager.exe setextradata "GuestName" "VBoxInternal/Devices/pcnet/0/LUN#0/Config/ssh/GuestPort" 22
VBoxManager.exe setextradata "GuestName" "VBoxInternal/Devices/pcnet/0/LUN#0/Config/ssh/HostPort" 29876
"GuestName" is name of virtual machine.
"ssh" is just a name for this port forwarding, can be anything
This will add the following lines in the virtual machine's .xml file:
<ExtraDataItem name="VBoxInternal/Devices/pcnet/0/LUN#0/Config/ssh/Protocol" value="TCP"/>
<ExtraDataItem name="VBoxInternal/Devices/pcnet/0/LUN#0/Config/ssh/GuestPort" value="22"/>
<ExtraDataItem name="VBoxInternal/Devices/pcnet/0/LUN#0/Config/ssh/HostPort" value="29876"/>
To add another port forwarding, use another name and port sets, e.g.:
VBoxManager.exe setextradata "GuestName" "VBoxInternal/Devices/pcnet/0/LUN#0/Config/web/Protocol" TCP
VBoxManager.exe setextradata "GuestName" "VBoxInternal/Devices/pcnet/0/LUN#0/Config/web/GuestPort" 80
VBoxManager.exe setextradata "GuestName" "VBoxInternal/Devices/pcnet/0/LUN#0/Config/web/HostPort" 8080
To set a global port forwarding, use "Global" instead of "GuestName", and the change is made in VirtualBox's global settings .xml,
usually it's at C:/Documents and Settings/<Profile Name>/.VirtualBox/VirtualBox.xml
All settings above require to close virtual machines and restart VirtualBox.
相关文章推荐
- (OK) android update sdk - virtualbox nat port forwarding adb "device offline"
- (OK) How to access a NAT guest from host with VirtualBox - NAT Port Forwarding
- CentOS in VirtualBox (NAT模式) 实现 SSH
- virtualbox+centos 使用nat或桥接不好用问题
- VirtualBox + CentOS 使用 NAT + Host-Only 方式联网
- NAT&Port Forwarding&Port Triggering
- virtualbox NAT网络模式详解以及NAT模式下端口映射
- VirtualBox NAT host-only高级网络配置
- virtualBox NAT模式,设置虚拟机可上网,宿主机可访问虚拟机的方法
- VirtualBox NAT Network配置
- Virtualbox NAT ssh to guest
- VirtualBox Network设置的NAT和Bridged Adapter模式区别
- VirtualBox + CentOS 使用 NAT + Host-Only 方式联网
- (OK)(OK) adb -s emulator-5554 shell - natpf1 - VirtualBox - NAT Port Forwarding
- VirtualBox NAT 模式下,主机ssh访问虚拟机配置
- VirtualBox NAT方式端口转换
- Configure port forwarding with NAT
- VirtualBox NAT+host-only高级网络配置 ,实现互通
- CentOS in VirtualBox (NAT模式) 实现 SSH
- ubuntu+virtualbox+NAT 无法上网