Blog

VirtualBox Multiple TCP Port Forwarding

When I need to test some Django code, I find it much easier to just run or install a copy of Turnkey Linux and grab the appliance that I need. They have a few different types of appliances and if you need to do any code testing for Django, Rails, Drupal, and more, I suggest you give this a shot if you don’t want to sit there and configure a server just for testing.

One thing with the Turnkey Django appliance, there are 2 HTTP ports. One is 80 for the Django administration interface and the other is 10000 for the Webmin administration interface. One problem I just ran across was how do I forward 2 TCP ports with Virtual Box. Easy, just do this:

$ VBoxManage setextradata <vbox guest name> "VBoxInternal/Devices/pcnet/0/LUN#0/Config/apache/HostPort" 8888
$ VBoxManage setextradata <vbox guest name> "VBoxInternal/Devices/pcnet/0/LUN#0/Config/apache/GuestPort" 80
$ VBoxManage setextradata <vbox guest name> "VBoxInternal/Devices/pcnet/0/LUN#0/Config/apache/Protocol" TCP

To connect to your guest OS via Firefox, you would go to the following URL in your web browser: http://localhost:8888

This works great for one port, but what if I need 2 HTTP ports? Then try this:

$ VBoxManage setextradata <vbox guest name> "VBoxInternal/Devices/pcnet/0/LUN#0/Config/guesthttp/HostPort" 8889
$ VBoxManage setextradata <vbox guest name> "VBoxInternal/Devices/pcnet/0/LUN#0/Config/guesthttp/GuestPort" 10000
$ VBoxManage setextradata <vbox guest name> "VBoxInternal/Devices/pcnet/0/LUN#0/Config/guesthttp/Protocol" TCP

To connect to your guest OS via Firefox to this port, look above on how I explained the connection via port 8888. Just change the 8888 to 8889.
Adding more than this, well that I will have to dig in to further, but for this case, I only needed to forward the 2 HTTP/Apache ports.

Now if you would like to SSH into your guest, try this:

$ VBoxManage setextradata <vbox guest name> "VBoxInternal/Devices/pcnet/0/LUN#0/Config/ssh/HostPort" 2222
$ VBoxManage setextradata <vbox guest name> "VBoxInternal/Devices/pcnet/0/LUN#0/Config/ssh/GuestPort" 22
$ VBoxManage setextradata <vbox guest name> "VBoxInternal/Devices/pcnet/0/LUN#0/Config/ssh/Protocol" TCP

You can now SSH into your guest box by typing the following at the command line:

$ ssh -p2222 username@localhost

Or you could add the following to your ~/.ssh/config:

Host guest
        Hostname localhost
        Port 2222
        User username

And now to connect you would just do:

$ ssh guest
Posted in Application | Tagged , , | 8 Responses

Global Bug Jam Chicago Style

Yes, the Ubuntu Chicago LoCo team is looking to make a substantial contribution to the Ubuntu Global Bug Jam, February 20-22. Details at this time are sketchy of course, but with the help of the Chicago members, we should be able to pull of some good stuff.

Also, I am planning on adding upstream work to this jam by including members of Chicago who work for upstream projects such as:

  • KDE
  • GNOME
  • Banshee
  • MySQL
  • Drupal
  • Django
  • and more…
    • If you are interested in participating in the bug jam with Ubuntu Chicago, please keep an eye on our Mailing List. If you have yet subscribed to the list, please do so. It is a very low traffic mailing list. Also stop by our IRC channel on Freenode in #ubuntu-chicago.

      We could use any and all help in planning this event. I have put out an email to the list already. You can view it HERE. Thanks!

Posted in Linux | Tagged , , , , , | 4 Responses

UDS Day 4: Community and Kubuntu

Day 4, not as busy for me, but still a very productive day nonetheless. The two main tracks I covered on day 4 were community and Kubuntu.

Community

A lot more round table discussion took place. There seems to be a common theme this week when it comes to community, and it is LoCo teams. We talked about how we could improve the interaction between the LoCo teams and how we could also improve our ways of attracting new contributors. There are more community sessions setup for the final day, so we shall see how that turns out.

Kubuntu

Ahh, Kubuntu, one of my favorite subjects. On day 4 we discussed package management as well as what packages we will place in Jaunty for Kubuntu. Package management wise, it seems there was a consensus on switching from Adept to KPackageKit. We do understand there is a lot of work that still needs to be completed with KPackageKit, and the Kubuntu ninjas will do their best to get it up to speed. If something was to happen, and we were unable to deliver on KPackageKit, then we have Adept to fall back to. My question I just thought of is this, “If we use Adept as a fallback, shouldn’t we still try to fix it as well?” Wouldn’t it make sense to continue working on Adept side-by-side with KPackageKit, just in case we do not finish KPackageKit in time? I think so.

The next session for Kubuntu was to discuss what packages we will have in the Kubuntu Jaunty release. As it stands, we will of course follow the KDE 4.2 track. It looks like we will try shedding any remaining KDE 3 dependencies from the CD installation. With that said, Konversation will not be shipped by default, but will be available for installation via the repositories. Somewhere out there, there is a package for a KDE 4 version of K3b, so Anthony (tonio) will work on getting it all ready for Jaunty.

Later on, I will link everyone to the updated specifications, or blueprints, so they can see the Jaunty roadmap for Kubuntu. I will also locate specs concerning the community, and if I can’t, I will either wikify the Gobby sessions or I will just make stuff up ๐Ÿ™‚

After day 4 was winding down, we decided to…well…..party. One thing I learned last night was that Jorge really loves Metallica, even their flops! It made for some really funny discussions on the world of metal. Believe it or not, Jono wasn’t there to try and save the metal night.

Posted in Linux | Tagged , , , , | 4 Responses
  • Archives

semidetached
semidetached
semidetached
semidetached