Linux Blog

Linux For Everyone!

Filed under: General Linux — TheLinuxBlog.com at 12:12 am on Friday, January 30, 2009

Today, while I was in the shower I was thinking:

“What way do people closely interact with Linux everyday without even knowing it”


With the recent re-regurgitation of the old GNU vs. Cisco case it came to mind that many people use Linux on a daily basis by using their routers. While this is not the best example of Linux in its prime it is a good way to demonstrate the versatility of the Linux operating system. To some, the concept of an operating system running on anything other than the latest and greatest hardware is alien. To Linux users this is part of its beauty.

I personally have two Linux powered routers. The first is a cheapo Belkin that is not very well suited, the second is the better supported WRT54G.

There are many variants of the WRT’s My personal favorite is DD-WRT because this is what I’ve used for a while, and I’m most familiar with it. I have an office with quite a lot of equipment that is somewhat distant from my cable modem and access point. What I use the first router for is a static access point, next to the cable modem, the second router has been re-purposed to be a full time bridge. I encrypted the communications and set up some static IP’s. I have a hundred or so DHCP lease IP’s available for friends and virtual machines. Whats great about this setup is DD-WRT does a great job as a bridge and hardly ever drops. My cable connection has gone out far more times then the bridge, if it ever has at all. I am able to connect many machines to the Internet over wireless while keeping my office communications switched. I do not have any of the hassles of multiple wireless cards with touchy Windows and Linux drivers and random dropped connections. The wireless bridge is so reliable I am able to do VOIP over it, with QoS to ensure that my calls always have priority over streaming media and other network traffic. DD-WRT truly has been the best thing that I’ve ever done to my routers and is really a great replacement for the Linksys junkware.

With this in mind next time your dearest Windows zealot complains about the stability of their Small/Home Office router, perhaps taking a stab at the stability of Linux (if their router even runs it) how about you educate them on the versatility of Linux. If you like, you could walk them through the very easy steps of installing a WRT variant onto the router (if possible) and enable Linux’s full potential to shine through.

Finding a PC on your network

Filed under: General Linux,Linux Software — TheLinuxBlog.com at 4:31 am on Tuesday, September 4, 2007

When I’m at a remote location I sometimes need to gain access to a computer that is not accessible from the internet but is on the same network as another machine that is. I have remote SSH access into the box that is on the same network but I often don’t know the IP address for the computer that I am trying to gain access to since they are assigned via DHCP.
I have a simple solution that will locate the computer I wish to use once logged into the gateway in no time. The program needed is from our friends at insecure.org and is called nmap. It is a pretty standard tool so it should be included with your distribution. However if you do not own the Linux machine then it may not be installed or you may not have the ability to install it or have sufficient privileges to run it.
Basically what nmap does is scan the network.
The command I use to scan a whole subnet for my host is:

nmap -sP 192.168.x.x/24

The type of scan I use is a ping scan, I only determine if the host is online. If I know the DHCP pool starts from 1.1 and ends at 1.100 then I would use:

nmap -sP 192.168.1.1-100

This will yield faster scanning results since it only has to ping 100 hosts not the whole subnet.
Sometimes if the environment is a busy one (one with lots of hosts) a lot of online IP’s will be returned and its hard to identify which one your trying to connect to. I remedy this by just scanning the host range I need that only have port 22 open.

nmap 192.168.3.1-100 -sT -p22

The -sT option doesn’t require the user to be root but if you have root the -sS option is better as it gives detailed information such as the mac address which can come in handy if you happen to know what brand of network card is in the computer you are trying to log into.

This will work to find a computer on a network with Linux but it still requires you to know a little information about the PC your trying to find. If you need a better way of finding your PC’s I would recommend using static IP’s and DNS. Give it a shot if your on location somewhere and need access to your computer.