Page 1 of 1

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

Posted: 27. May 2008, 04:52
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.

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

Posted: 22. Jul 2009, 06:33
by pshah
I need the exact same thing. No luck :(