Saturday, December 27, 2008

Using SSH to securely tunnel traffic from your XP laptop through your home or office network.

If you are even just a bit computer savvy, then your probably aware of the extreme lack of security when you use open WiFi to connect to the internet from remote locations. Even just connecting your laptop to the network at your workplace can be a hazard assuming the guy in the cubical next to you has some knowledge of packet sniffing. I am assuming of course that while connected to that popular WiFi hotspot at the local Starbucks coffee place you will be doing more than just basic web surfing. Marthat Stewart's articles may be interesting to you but perhaps not to that of a hacker nearby.

It's true!, what the hacker typically waits for is the unsuspecting soul who connects to every open WiFi connection available to his laptops antenna, and then surfs to their internet banking site or connects to their MSN messenger. You may even think that your vpn connection is totally secure, but is it?

The other situation that got me thinking about writing this article is the annoyance of corporate firewalls. I make frequent visits to a large hospital and sometimes I find myself being forced to work from the not so comfortable place in a plastic chair or in a lobby. Often I will connect to either the hospitals network because it's much faster than that of the Starbucks in the lobby. The one problem though is that the connection goes through a proxy so all of the traffic on the typical port 80 is sent through a firewall that restricts sites and type of traffic flowing through it. Common places like facebook and blogspot are even restricted which makes blogging not possible. Somthing I was just not willing to accept so I looked for a way around.

What I found was that since I am running my own Linux system at home and actively use an SSH connection to send and recieve data to my cellular phone. Keep me up to date on various statistics etc, that I could also use this encrypted connection to make a tunnel much like the virtual private networking tunnels used in the windows world.

You'll have to use firefox to get this to work because for some reason IE just didin't work. I'm not quite sure what it is that prevents it but none the less, Firefox is a much better browser anyhow, and you should be using it.

  • First you may want to prove to yourself just what network your actually using. Open up Firefox web browser and surf over to http://ipchicken.com There you will see your current IP address. Write it down so that you can reference it later.
  • If you don't already have your own Linux system running at home, you can usually find some shell account at a university or something who may be willing to give you an account for this very purpose. Although I am sure it's getting more and more difficult to find these. Your better off to just get an old slow computer and install Ubuntu and SSHD to leave running at your home.
  • Most people have a router with firewall enabled at home, if you don't then you probably shouldn't even be trying to run servers at home and should probably also promptly find the power button on your computer, turn it off and then call the local newspaper to advertise a slightly used and possibly infected computer system. If you are one of the smarter geeks, you should go into your router's configuration and forward whatever port your SSH server is running on, usually this is port 22 but it is also wise to change the port number since many Trojans and network worms attempt to brute force attack ssh servers on this port.
If your running Windows XP or Vista, download a copy of PUTTY.EXE and configure it as follows...

Windows PUTTY.EXE setup;
  1. Open your putty.exe client and enter the host name or IP address of your linux server. Port is usually 22, and connection type is SSH.
  2. In putty's "Category" column click on SSH, under the "Protocol Options" to the right checkmark Enable compression and set "Preferred SSH protocol" to "2"
  3. Now under the "Category" menu again, click on "Tunnels", under the "Add new forwarded port" enter "4567" in the source port box, and make sure "Dynamic" and "Auto" are checked. When you click on the "ADD" button you should see "D4567" in the forwarded ports list.
  4. Last, but not least you'll want to go back to the "Category"menu on the left and click on "Session". Give your new connection a name in the "Saved Sessions" box to the right and then click on "SAVE" this way you can connect to this anytime you like from the "Load, save or delete a stored session" menu.
Firefox Configuration;

  1. Go to "Tools > Options..."
  2. Click on "Advanced" then the "Network" tab and then "SETTINGS"
  3. From the "Connection Settings" menu, select "Manual Prosy configuration" and enter "127.0.0.1" where it says "SOCKS HOST" and make sure the port is set to "4567" just like it is set in putty. Also make sure "SOCKS v5" is selected.
Now all you need to do is make the connection using Putty.exe and the saved session you created. Log into the server and then open Firefox. Your IP address should be the same as the one your Linux server is using. You can check from http://ipchicken.com

This process also works for using US television sites that do not allow Canadian IP's to view their content. The linux server or shell you connect to however must reside in the US. :) I am fortunate enough to have a friend who runs a public server in the US so it's very handy for me when I want to watch television from within Canada.

Good luck Geeks!

Tuesday, December 23, 2008

Easy DTV transition.

If your anything like me, you may have cable television or even a satellite dish to receive your television fix. But you may also have or may only have an antenna on the roof of your house or rabbit ears on your television to receive local channels. If so, then this blog post is for you.

By February 17, 2009 All broadcast television signals (over the air) will be digital. This means that your analog televisions won't be able to receive the signal.

If you use an antenna to receive your television broadcasts you will have three options.

- Subscribe to cable television or Satellite provider. "Uggggh, more monopoly money"

- Upgrade to an HD or SD television with a digital tuner built in.

- Buy a DTV converter to connect to your old antenna.

Being the cheap a$$ that I am, I am planning to buy the DTV converter box for the transition. I still have my Satellite receiver from Bell ExpressVu but for the kids playroom and my mom's bedroom television they really don't need access to all those porn and movie channels that I currently subscribe too.

One nice thing about it though is that when your antenna's set up you'll either have perfect reception or no reception at all. Which means no more snowy channels with a ghost of the adjacent channel. It's a digital stream so it's either perfect or it's not. No in between...

I'll keep you posted on different models of digital TV tuners in future blogs... Oh boy, think of all those old geezers who will wake up one morning and not be able to view their televisions... Then think of all those grandkids and children who will receive said call from the geezer begging them to come fix their television...

I bet bestbuy's gonna be busy that cold February morning eh?

Wednesday, December 17, 2008

Sharing your Ubuntu printer with an XP machine.

Now I did not write these instructions, they came from {HERE} But since they did a much better job of describing the steps for this procedure than I ever could, I thought I would just paste it here for my own reference and yours. In the past, printers have been a HUGE source of frustration for the Linux world so recent improvements in this area are a welcome thing...

_________________________________________________________________________

Gutsy

NOTE: This was tested with the beta version of Gutsy.

1) Make sure your printer is installed.

2) Open the Printing window (System -> Administration -> Printing).

3) Click Server Settings in the list of printers.

4) To the right, under Basic Server Settings, check the box that reads, "Share published printers connected to this system".

5) In the list of printers, click the printer you want to share.

6) Click in the Policies tab and make sure all three check boxes (Enabled, Accepting jobs, and Shared) are checked.

7) Click the Apply button in the lower-right corner of the window.

On the Windows machine:

1) Now add the printer to the Windows computer by using the Windows "Add Printer" Wizard. Select to connect a network printer and then select the option to connect a printer on the Internet or on a home or small office network. Type in the following for the printer URL:

http://HOSTNAMEorIP:631/printers/PRINTERNAME

Replace "" with the hostname of the Ubuntu computer sharing the printer. It's also possible to replace "" with the IP address of the computer sharing the printer.

Replace "" with the name (exactly as displayed including displayed casing) that was shown in the Printers window you opened earlier on the Ubuntu machine. If you're unsure about the exact printer name, you can use your webbrowser to open

http://localhost:631/printers/

That should show your printer in a webpage. Click on your printer link, and you should see the exact URL in your browser's address bar. You can use that URL in the Windows setup mentionned above.

2) Windows will ask you to select a driver for the printer. If you have the Windows print drivers, you should use them. Click the "Have Disk" button and select the .inf file that describes your print drivers.

If you do not have the drivers for the printer or cannot load the .inf file, you should select the "MS Publisher Color Printer" driver from the "Generic" manufacturer. This driver should be found on all Windows 2000 and XP installations by default and it gives all the printing functionality one should need.

NOTE: Windows XP can print over IPv6 to Ubuntu Linux (tested between Windows XP SP3 and Ubuntu Linux 8.10). Make sure both the Windows and Ubuntu have IPv6 connectivity. You should tick "Allow Printing from the Internet" on the Ubuntu machine. Then use the URL (which resolves to IPv6) of the Ubuntu machine as described above.
____________________________________________________________________________

I hope this benefits some linux users, I know it helped me a lot...

Tuesday, December 16, 2008

Moving Files in Linux BASH

Here's a great example of the power of the command line interface in Linux. In my case and probably most of your systems I'm using BASH as my CLI.

I recently used the all powerful wget command to mirror a rather large database of images from an undisclosed location on the web. This website had almost 4000 clipart images that I really wanted to add to my collection for web design etc. Anyhow the issue was going through the website one by one and saving the files would have killed me. Just not practical so I just recursivly retrieved 5 levels deep of the clipart which incidentally was located in hundreds of sub folders labelled as per the content... Example: www.site.com/images/cars, www.site.com/images/plants etc... You get the idea... So now I have a mirrored site with a problem, how to get all those handy little .jpg and .gif files moved into a single directory that I could peruse on my own terms.

PROBLEM: Thousands of .jpg exension files in hundreds of subdirectories.
SOLUTION: Use some BASH commands... In this case FIND and MV.

The syntax I used looks like this;

find /websitedir/ -name "*.gif" -type f -exec mv {} /onlyimages/ \;

OK so lets break this down... The find command is being told to look in directory /websitedir/ for files named *.gif the * is a wildcard so it means find anything with the .gif extension. Then the second switch -type f tells find that it is a file it's looking for and not a directory. When it finds the files -exec invokes the mv (move) command recursively to copy the said files to the new directory /onlyimages/ then it ends with \;

The result is a directory called /onlyimages/ that is filled with all the images from those hundreds of subdirectories that are in the original find dir...

Fantastic eh?

Picasa 3 Software review.

I've never been easily impressed by graphic databases but there have been a few that caught my eye. In my early windows years around 1998 I was an avid user of acdsee program. It allwed me to catalog all my images etc but it costs a fee and I don't like giving my money away to people and I do not believe in pirating software in a world where so much can be obtained for free.

Google however has many useful tools and toys to please the average geek. And being Google they are a trustworthy monopoly to say the least. Does that qualify for an oxymoron? "Trustworthy, Monopoly" :) Anyhow, while adding photos to my blog I realized that it's actually uploads and stores the photos to my picasa account which incidentally I did not know I even had. It is one of the perks of having a gmail account at Google. Even all the photos in my personal blog's slide show come from my picasa account. So As I started to realize how useful this photo storage place at google is, I found that instead of using their web based uploader you can actually download software to incorporate uploading directly from your photo catalog. Fantastic features... It even has the ability to throttle bandwidth usage so if you have 10 thousand photos to upload and it may take a few days you can limit how much of your internet speed it uses.

Picasa 3 brags the following features;
  • The ability to make web albums, even videos can be viewed over the web.
  • Easy search and Explore features. Photos that you forgot you even had on your hard drive are cataloged.
  • Creative printing, create slideshows, add text to your pictures etc.
  • Easy, or should I say STUPID easy to share photos with other people on the web.
  • One click fixes for common problems like red eye and lighting, the software is intelligent enough to assist without any graphic skill.
  • Using name tags, like people are grouped together so that all the photos of a particular person for example will be in one place.
  • And of course they have the usual ability to purchase professional prints and download the photos again so you can print them somewhere else.
  • The best thing about this software though, is that it's absolutely FREE!
All in all, if you have a lot of photos and want to keep them backed up somewhere, why not use this software to keep a copy on your local hard drive, and a copy on google's servers?

Software Review (VirtualBox)

OK I have to share with all the geeks out there some fantastic software I have stumbled across.

A year or so ago I was running Vmware to add a windows compatability layer to my Linux distribution. A virtual machine offers severe performance advantages over emulation so it was the way to go for me. I have been running Linux as my primary desktop since the early 1980's. I have never been a big fan of pirated Microsoft software and so I being the cheap bastard that I am looked for an alternative to Windows. My Amiga was a unix like OS and so I was already comfortable with the Command Line Interface or CLI, the move to Linux was just a natural one to me. Above: Original Amiga 1000

Recently I had been listening to a friend rave about VirtualBox, how fast it is and how well it supports hardware as a much improved virtual machine over vmware. VirtualBox is produced and released free by the Gods at Sun Microsystems and so I was willing to give it a chance.

Well I had this Acer piece of crap laptop that I spent 600 bucks on in Calgary and in less than a year the laptop had died on me. The so called support team at Acer refused to help me get the laptop fixed for any reasonable price. They said the best they could do is replace the laptop for around 500 bucks... W00T? I am stuck with this piece of crap that doesn't work? Stupid Acer, I will never recommend or buy another one, they are made with cheap plastic that cracks and fades within months anyhow... Ok enough of the anger... I installed VirtualBox on my linux ubuntu distro and created a drive of 2GB... Then I used the windows license I paid for when I bought that stupid ACER laptop to install WindowsXP Home Edition... not sure why I made such a small drive cause Windows is a pig... But I guess I was thinking that the option to dynamically resize the partition would apply if I needed space in the future... what it actually means is that the actual space on your physical drive is only the size of the data that is contained in the virtual drive and so you have a maximum dynamic state of up to the 2Gb... So I suggest you make a larger drive to begin with in VirtualBox...

Anyhow now for the software I recommend highly... I was looking for a way to clone this virtual drive and I stumbled across yet another awsome Linux ISO disk. It's called G4U - Harddisk Image Cloning for PC's the iso can be burned to a real CD to be booted in the drive or it can be loaded by VirtualBox as if it were a physical CD. Now this is awsome!

On to what it does...

G4U has the ability to copy a disk to disk partition just like Norton Ghost does, or if you don't have a second drive installed... you can use the FTP option to upload the hard drive image to an FTP location and then back down to several or a single system. This is a FANTASTIC feature!

And so I was able to clone my 2 gb virtual partition to the new 25 gb virtual partition which should leave room for all the basic programs and files...

This is FREE and quality software folks... If your a geek, and you need to clone hard drives, this is for you!

Monday, December 15, 2008

Microsoft's Brain Fart!

Imagine I build a new brand of car. Millions of them are sold, and occasionally when you get to a red light, as you slow down to stop your car suddenly stalls without warning. You have to start it back up again and sometimes the engine just turns over for a while before starting. So you take it to a garage and tell the mechanic.. "My car stalls without any apparent reason, just quits sometimes while I'm using it..." "In Fact" you say, "I think it's rather dangerous... " The mechanic looks at you and says yeah it's just the way this model of car is.. you'll just have to deal with it because there are problems deeply embedded in the makeup of the car that the manufacturer just isn't willing to deal with.

Out of Redmond Washington on November 18th, 2008 Microsoft announced their plans to release a free anti virus software solution that runs with such light resources that it can even function on a windows 98 machine... Uhhhh pardon me but guys Isn't this a decade too frickin' late? You create an entire line of computer operating systems that are riddled with problems and somehow manage to go from the extremely unstable 3.x versions to the fairly stable XP and now Vista and now suddenly you release this band aid solution to keep external problems out?

Now don't get me wrong, I've used the free windows defender for a few years now and feel that it has protected me quite well. But just how is this new project code named "Morro" suppose to be accepted by the thousands of people who avoided this operating system for stability and security reasons?

Root kits, and Trojans, spy ware, and viruses... All have become sort of like the much anticipated car that stalls at every fourth or fifth red light. You just deal with it.... Reboot your computer and the problem will go away right?
Your solution is entirely toooooooooo late!

The other thing that bothers me, I have always felt that somehow the antivirus software developers of the world have had a hand in creating and or at least perpetuating both the virus scare and the streamlined code that makes up these nasty little "de"buggers... I mean come on, can you think of a better way of selling ice cream than to get all the teenaged kids in the neighborhood hooked on pot? Munchies anyone?

In closing, how is this going to affect companies like Mcaffee or Norton... I find it hard to believe that people are going to be continuing to renew their licenses when they can get protection right from the horses mouth... The demise of the anti virus software industry may happen quicker than you can say "Mass Lay Offs".

Anyhow, congrats Microsloth for finally including the protection that should have been built into your product from day one... I would not have minded a six floppy disk install instead of the five I received when I purchased windows 3.0 and probably wouldn't have seeked out an alternative operating system had yours not stalled at every fourth red light...

Oh and, Bahh Humbug day is approaching... UghhhH!

Introduction

I am a "Terminal Geek". Self diagnosed, I will die a terminal geek and could not be happier about it!

I have other blogs, but this one will be strictly geek related!

I hope you will actively participate and make your comments about various subjects known. Correct me when I'm wrong, suggest something useful etc...

romrider@mousecrash:~$ exit