NAT Port Forwarding for Webrick (Ruby on Rails) Dont' Work

Discussions related to using VirtualBox on Windows hosts.
Post Reply
oldtype
Posts: 1
Joined: 27. May 2008, 04:23

NAT Port Forwarding for Webrick (Ruby on Rails) Dont' Work

Post by oldtype »

Hi, I'm trying ubuntu 8.04 server as guest on my XP PC using VirtualBox 1.6. My object is to use ubuntu as web server (blog, bbs, etc), and other PCs connect to ubuntu.

I've already succeeded some features I wanted - run apache web server on ubuntu and connect from outside using port forwarding. Here is my port forwarding command:

Code: Select all

VBoxManage setextradata "ubuntu"
"VBoxInternal/Devices/pcnet/0/LUN#0/Config/apache/Protocol" TCP
VBoxManage setextradata "ubuntu"
"VBoxInternal/Devices/pcnet/0/LUN#0/Config/apache/GuestPort" 80
VBoxManage setextradata "ubuntu"
"VBoxInternal/Devices/pcnet/0/LUN#0/Config/apache/HostPort" 80
Then I installed ruby and rails, and created a test rails project, and ran it. I can connect inside ubuntu thru the following url :

http://localhost:3000

Then I also set port forwarding command for port 3000 :

Code: Select all

VBoxManage setextradata "ubuntu"
"VBoxInternal/Devices/pcnet/0/LUN#0/Config/webrick/Protocol" TCP
VBoxManage setextradata "ubuntu"
"VBoxInternal/Devices/pcnet/0/LUN#0/Config/webrick/GuestPort" 3000
VBoxManage setextradata "ubuntu"
"VBoxInternal/Devices/pcnet/0/LUN#0/Config/webrick/HostPort" 3000
Unfortunately, it didn't work. I can't connect http://(host PC ip):3000 from outside. What's wrong with it? I need your help. Thank you.
pshah
Posts: 5
Joined: 20. Jul 2009, 00:04
Primary OS: Mac OS X Leopard
VBox Version: OSE other
Guest OSses: Ubuntu/CentOS

Re: NAT Port Forwarding for Webrick (Ruby on Rails) Dont' Work

Post by pshah »

I need the exact same thing. No luck :(
Post Reply