Technology Insights

Restart DD-WRT Web Server Using The Command Line From An SSH Connection

I have a Linksys WRT54G wireless router running DD-WRT open source firmware. A lot of the work I do requires providing access to clients or coworkers to various devices on my local network. I also view the DD-WRT web interface regularly on the Linksys WRT54G to see what devices it can see on the network via ARP or IP. A lot of the time when I attempt to connect to the web server which is only running HTTPS on port 443 the connection via my browser will just hang or simply won’t make a connection at all. During the times when I am unable to open the DD-WRT web interface I am always still able to connect to the Linksys device via SSH meaning that for some reason the web interface is failing.

Technology Insights

How to Reset a Serial Port in Linux, ttyS0, ttyAM0, etc.

When connecting to a Linux device using a serial port there may be times where that connection becomes stuck open and thus will not provide sane output to the TTY port. This issue can be resolved by killing the PID (Process ID) and letting the serial port process restart.

The serial port connection should be configured in inittab which will allow you to specify various configuration options as well as respawning the process. So when you specify respawn the process will automatically restart if it is no longer running as will be the case if you kill the process off. The inittab entry will look similar to one of the two below examples.

Technology Insights

How to Search For Patterns In Files That Are Compressed With gzip or gunzip

It can be beneficial sometimes to search for patterns in files on a Linux server that have been compressed with gzip instead of having to uncompress each file to search through it. A good example of this if typically in log rotation you rotate the logs and compress the older log files so if you are troubleshooting an issue and need to search for an error in older log files you could use the method below to search the compressed log files to match a pattern without having to uncompress each log file.

Technology Insights

Verify a External USB Hard Drive On a CentOS Linux Computer

Recently I had a hard drive crash that was in a Windows XP laptop. The drive would  not mount under Windows however I was able to eventually mount it under Linux and rescue some of the data. In this article I will describe how to verify the USB hard drive enclosure is seen on a CentOS Linux computer and verify that Linux is able to see the USB device and the drive.

First you will want to remove the hard drive from your Windows XP computer and physically mount it into the USB hard drive enclosure. This will involve connecting it inside (IDE or SATA) and then plugging the USB cable or cables into the CentOS server. Since the hard drive is damaged its hard to know if its not reading it or if you have something misconfigured, a loose cable, etc. Below are a couple tips to make sure that the hard drive is being recognized via the USB connection.

Technology Insights

Windows XP: Figure Out What Service is Running on a Specific Port

Finding out what application is running on a specific port in Windows XP is easy by using two command line utilities. By using netstat with the proper switches you can list out all of the ports that are being used and then use Tasklist to list all of the applications that are running. The combination of the two utilities will allow you to figure out which application us using which port. As an example you can use the below directions to figure out what application is using port 80 for instance.

  1. Open Command Prompt: Click Start in the lower left hand corner of your PC and then select Run from the pop up. Type command in the Run window and click Enter to open up the command prompt.