Tuesday, August 17, 2010

Use Sandwich Bags to Untangle your Cords

If you are a geek like me, you probably have a huge box or bin full of cables that seem to have woven together into a not-so-fine tapestry or nest. "Do I really need those modular power supply cables which I don't even have the power supply to and that power a floppy drive?" "Probably not." But in my quest for cleaning out my electronics bin and drawer I've found some cables that I know will still be useful or that I have no clue what they go to so I fear throwing them out. Instead, after spending an hour or so detangling I came up with the following solution:

Each cable now is in its own individual sandwich baggy. All of the cables fit into that bin and take up about 1/4th the size they previously did. You could use twist ties or Velcro instead but I had neither of those. This is also a good idea if you are moving and you can label or write on the bag to more easily identify the cable.

 Anyone else have any cable management tips? Those Velcro cable ties work wonders on in-use cables. I can never seem to optimally route my desktop cables both inside and outside.

Sunday, August 15, 2010

Setting up SSH on your Wireless Router with DD-WRT

My network setup sometimes requires me to use SSH to tunnel into my home network to work on my machines remotely. Before my project, my desktop was running an SSH server (WinSSHD) which had its ports forwarded on my DLink DIR-615 router. This was far from ideal because if my desktop was down/disconnected I wouldn't be able to access any of the network via SSH. The ideal solution would be to run an SSH server on my router.

The Ideal Solution

After doing some quick research, I learned I could install new firmware on my router from an open source project called "DD-WRT". DD-WRT has at least all the features I took advantage of on my router (port forwarding, upnp, web interface). It also had the feature I wanted, an ssh server daemon. It is an open source project based on Linux. You can check to see if your router hardware is supported here.
Note: Flashing your router with new firmware can result in it no longer working! I won't be held responsible by anything you do to your router and you should be confident before attempting anything recommended here!

The nice thing about the DIR-615 is that it provides a web interface for updating your firmware. This is also a means to easily install DD-WRT. Just download the firmware file and upload it via the web interface. These are the instructions I used. Remember to check your hardware revision (letter) because it might be different and cause problems. The main DD-WRT router hardware page should tell you what is compatible. I was actually surprised at how easy everything was to setup. The only gotcha with the firmware upgrade was using IE instead of Chrome for the upload. Also, I put my router into a reduced state by holding the reset button until the Internet light flashed on the front. This will reset everything(including admin password) and make sure the router isn't too busy to complete the update. Always wire in when doing the upgrade since it will reset the wireless settings! Don't forget to download everything you need including instructions before starting since you might not have Internet access afterwards! Download your router's original firmware and know how to restore before starting as well. If you need Internet, reroute your cable modem to your computer instead of through your router. Don't attempt on borrowed or rented hardware!

After the firmware update, your router will now be accessible from http://192.168.1.1 since its IP is changed. Set your wired settings to use the 192.168.1.* subnet in order to see it. That url should bring up the following:
This is the router's info screen. At some point the router will ask you to make an admin username and password.

To get SSH working, I reviewed the following Wiki pages:
http://www.dd-wrt.com/wiki/index.php/SSH_access_from_internet
http://www.dd-wrt.com/wiki/index.php/Easy_SSH_tunnels
http://www.dd-wrt.com/wiki/index.php/Telnet/SSH_and_the_Command_Line

If you are lazy [Note: you are responsible for your own security]:

  1. Navigate to Services -> Services
  2. Scroll down to Secure Shell
  3. Turn on SSHd
  4. Turn on SSH TCP Forwarding
  5. Enable password login or provide public keys for login (if you don't know, just go with password)
  6. Give it a port
  7. Navigate to Administration -> Management
  8. Scroll down to Remote Access
  9. Turn on SSH Management
  10. Give SSH a port to run on 
  11. For my ports I use 443 since 443 is usually open in firewalls and represents encrypted https traffic
  12. Setup a Dynamic DNS service on the router or a pc (Setup -> DDNS)
Some gotchas:

  • You can't enable https for the web GUI since it will use port 443. Give your SSHd a different port to run on and then you can use https
  • You can only have one user if using password login and that user is "root" with admin password
  • I use Putty Tray as my ssh client because it is powerful and minimizes to the system tray.

Other Things to Do With Your Router

Enable Remote Access -> Web GUI Management

This is useful for performing maintenance remotely or rebooting your router. Especially nice if you won't have anyone to help your troubleshoot your router while you are away or if those people aren't tech savvy.

Setup static IPs for your computers

Leave your computers as DHCP and setup the DHCP server on the router to associate a specific MAC address with a specific IP address.  Use these IPs in your port and firewall rules.

Setup a PPTP VPN

This should let you use Window's to connect your your home VPN without any computers running the VPN server.

Add a second way to connect to your wireless

This tutorial might get you started.
Some other things you can do with this:

  • Create a temporary wireless point for guests with a different password. 
  • Create an access point using a less secure encryption but set access restrictions. 
  • Create a public wireless network but with lower signal so only in-house guests can access the wireless
  • Create a public wireless network but make it ad supported using the other DD-WRT services such as Chilispot, WifiDog, or AnchorFree under Services->Hotspot or Services->My Ad Network
  • User DD-WRT to provide a wirelss hotspot for customers but a private network for your business
With any of these methods, you should use a separate subnet and other security controls to prevent breeches.

Bridge two different LANs with wireless or Add a wireless repeater

This is good if you have a computer in a different part of the house without wireless and you have a spare router r have a big house.
http://www.dd-wrt.com/wiki/index.php/Linking_Routers

Run a VoIP PBX via Asterisk on your router

Watch out, this is tricky!
http://www.dd-wrt.com/wiki/index.php/Asterisk

Add network storage via SMB or FTP

Only if you have a USB port in your router
http://www.dd-wrt.com/wiki/index.php/USB_storage

Block websites, time restrict access to certain websites

Stop yourself from playing too  much farmville
Left as an exercise for the reader.

Many, many more ideas

http://www.dd-wrt.com/wiki/index.php/Tutorials

Remember, some things your router might need more memory or specific hardware that you don't have. I know my router doesn't support jffs so that prevents me from doing some things.

Let me know what project you decide to undertake.

Sunday, August 8, 2010

#GoneGoogle - Letting Go

I originally micro-blogged about staring to use Google on my twitter @MatthewMMorrow but here is a some more.

The first part of this series: #GoneGoogle - Taking off into the Cloud

Browser

I have been using Internet Explorer as my browser of choice since IE was indistinguishable from Netscape Navigator and Microsoft made it the Window’s default. At times I’ve fervently defended the browser and dreamed of the next version. At work I still use IE but that is mostly for development reasons.

As part of my Google experience,  I decided to test out Google Chrome [Get Chrome]. For some reason IE was giving me some speed problems and so I figured it was as good of a time as any. I had dabbled with Chrome when it first came out; it was nice, fast, and sleek, but it didn’t quite grab me then. This time my experience was different.

The install process for Chrome is smart. It installs itself to your user application data directory. This means you don’t need administrator access to perform the install. The install is little more than going to a specific link. Later on I switched to the Dev channel [how to switch] to get the newest features and again it automatically changed itself just by visiting a webpage. Chrome also keeps itself up-to-date. No more multiple versions to support (curse you IE6, die already).

This isn’t going to be a review of Chrome, try it out for yourself if you want one. But instead I’ll focus on the neat features and extensions that I use.

The first feature I appreciate is syncing. I can sync bookmarks, settings, and extensions between my laptops and desktops. Currently extensions are only able to be synced in the Dev channel [Lifehacker].

Feature #2 is tab pinning. Not terribly useful all the time but it helps me keep where I left off.

Feature #3 are all the extension I use. There is a better collection than those available for IE.

Here are the extension I use:

Label your Physical Hard Drives for Easier Troubleshooting

In my desktop computer I have a total of 4 SATA drives. When the drives are in the computer, you can't see the manufacturer's sticker to determine the size nor identify which drive is which. This last time I was working on my machine I decided to take all the drives out and use a white paint marker to write the size on the back end of the drive. Since all my drives have a unique size this takes the guess work out of troubleshooting and removal. It would look nicer with a label but I don't have a label maker.
Any other good tricks?