2009年4月17日

Setup VirtualBox port forwarding

The following are the how-to information for setting up the virtualbox port forwarding:

Example:
  • Host: Windows/MacOSX
  • Guess: Linux
  • Service name (any name without space): guestssh
  • Guess Port: 22
  • Host Port: 2222
  • Note: If network interface in VBox is set to Intel, use e1000 rather than pcnet
@Host, run in command line/Terminal
  1. VBoxManage setextradata {Virtual Machine Name} "VBoxInternal/Devices/{pcnet | e1000}/0/LUN#0/Config/{Service Name}/HostPort" 2222
  2. VBoxManage setextradata {Virtual Machine Name} "VBoxInternal/Devices/{pcnet | e1000}/0/LUN#0/Config/{Service Name}/GuestPort" 22
  3. VBoxManage setextradata {Virtual Machine Name} "VBoxInternal/Devices/{pcnet | e1000}/0/LUN#0/Config/{Service Name}/Protocol" TCP
- Check if it creates localhost listening port:
  • (@MacOX):
  • netstat -nlap tcp
- To connect to guess SSH, type:
  • ssh -p 2222 localhost

沒有留言:

發佈留言