ksaitoの日記

日々試したことの覚え書き

VirtualBoxのNATでHTTPのポートフォアード

移転しました。

自動的にリダイレクトします。

VirtualBoxのNATの設定続きです。
以下の設定でホストOSの1080からゲストOSのHTTPにアクセスできました。
Config/適当な文字列/[Protocol|GuestPort|HostPort]という認識でよいのでしょうか?

$ VBoxManage setextradata "Ubuntu 8.04 Server LTS (Hardy Heron)" "VBoxInternal/Devices/pcnet/0/LUN#0/Config/www/Protocol" TCP
VirtualBox Command Line Management Interface Version 1.5.6_OSE
(C) 2005-2008 innotek GmbH
All rights reserved.

$ VBoxManage setextradata "Ubuntu 8.04 Server LTS (Hardy Heron)" "VBoxInternal/Devices/pcnet/0/LUN#0/Config/www/GuestPort" 80
VirtualBox Command Line Management Interface Version 1.5.6_OSE
(C) 2005-2008 innotek GmbH
All rights reserved.

$ VBoxManage setextradata "Ubuntu 8.04 Server LTS (Hardy Heron)" "VBoxInternal/Devices/pcnet/0/LUN#0/Config/www/HostPort" 1080
VirtualBox Command Line Management Interface Version 1.5.6_OSE
(C) 2005-2008 innotek GmbH
All rights reserved.

$