Archive for May, 2008

Using SSH to access internal network sites from an external network

Objective: I want to access my internal website from home so I can do work.

Computers involved:

  • sharms-desktop: My home desktop
  • sharms-server: Server at work with an External IP that allows port 22 to connect to it
  • sharms-webdev: Server at work with the webpage I need to work on

How to do it
This is actually super easy. All we need to do is create an “ssh tunnel” that will allow us to go from sharms-desktop to sharms-server to sharms-webdev. I made a pretty picture to illustrate:

And now the goods, here is exactly what I type, and thats it:

sharms-desktop ~# ssh -N -f -L 10001:sharms-webdev:443 sharms@sharms-server

Now when I point my browser to https://localhost:10001 I am actually seeing the page as if I were on the lan at https://sharms-webdev. Change port 443 to 80 if you are not using ssl. Also the -N means we don’t actually want to open up a new ssh session to run commands, -f means go ahead and run in the background, and the -L lets you specify the tunnel parameters.

Brain = Off

OSNews questions if developers are flocking to the Mac. Just for anyone who wonders if that is the case, it just isn’t the case. When I install my system, I no longer tweak my xorg.conf, compile any drivers, or do any number of things everyone claims makes linux so hard. I fire it up, install some build tools, and I am good to go. As distributions continue to progress in usability, this will only be more-so the case.

  • Polished 3D Accelerated Desktop? Check
  • Drivers For All Hardware? Check
  • 3D Icon Bar? Check
  • Hotplug USB Devices? Check
  • Plays Media (mp3 / avi / etc)? Check
  • Girlfriend Uses It? Check
  • Flash Support (youtube, dailymotion etc)? Check
  • Seamless Windows XP Integration (Virtualbox)? Check

Pray tell, what in the world are most people doing where using Ubuntu is so much harder than a Mac?

What do you have open?

  • Firefox 3 with 42 tabs
  • Synergy
  • Rythmbox
  • Terminator
  • VMWare workstation

Terminator lets me split up gnome terminals in a bunch of windows, so I always have atleast 2 terminator’s going. My work setup consists of 2 19″ widescreen monitors and one 15″ laptop monitor (all monitors at 1440×900).

For fun:

MogileFS / Tahoe

I was recently playing with MogileFS and got it working, and just stumbled upon Tahoe today. Does anyone have any opinions of one vs the other? I see Tahoe depends on python where as MogileFS depends on perl, and I generally like python for the sake of readability. Google turned up nothing, any experiences?

Firefox 3.0 Patch

Has anyone build a .deb fore firefox (maybe a ppa) patched with the sqlite / fsync performance fix from https://bugzilla.mozilla.org/show_bug.cgi?id=421482?

(https://bugzilla.mozilla.org/attachment.cgi?id=320806)

Do your windows turn grey often?

If you are like me, in Hardy, quite a bit of time my windows grey out etc waiting for a response. Also if you run synergy, synergyc probably isn’t even close to usable unless you run it as root. Also this causes some audio stuttering.

The problem
Improper configuration of the new kernel scheduler broke a lot of things. https://bugs.launchpad.net/ubuntu/+source/linux/+bug/188226

The good news
If you use ubuntu-server kernel, or have hardy-proposed repository enabled, this resolves it.

Bazaar love

http://kubasik.net/blog/2008/05/19/bazaar-and-its-rockage/
http://www.grillbar.org/wordpress/?p=271

Just to add to this, I use bzr also. I have various large source repositories of projects for work, and I don’t see issues with speed. I also appreciate the attention paid to usability.

Installing VMWare tools

When you need to install VMWare tools, it will want to compile modules for your system if it is a newer distro. Here are the commands needed to install the required prerequisites to accomplish this:

Ubuntu
sudo apt-get install build-essential

Fedora 9
yum groupinstall "Development Tools"

Novell SLES
yast2 -i binutils gcc gcc-c++ kernel-source make

Ubuntu-everyone: Your ssh keys should be considered compromised

Just read this and the security release. There is a checker provided in the security release note, but at any rate, your ssh key was probably generated incorrectly with respect to random time (mine were). Joy.

Update: Ubuntu Security Advisory.

Warning! Your ssh keys will stop working:
“Once the update is applied, weak user keys will be automatically rejected where possible (though they cannot be detected in all cases). If you are using such keys for user authentication, they will immediately stop working and will need to be replaced (see step 3). “

Vim as a Django IDE

I primarily develop in Python these days, and have been giving Django a try. John Anderson posted a very detailed, excellent blog post about using VIM as a python IDE. If you follow that post, and use synic’s colorscheme, you pretty much have my IDE environment. I find this feature complete with any Visual Studio type program I have used, as long as you know a few vim commands you will be good to go.

I should also note, to install a plugin for vim, you just put it in your .vim/plugin directory. If that dir does not exist, just create it (mkdir -p ~/.vim/plugin)