IP Address Ranges for Countries

If you need to know what IP address ranges are allocated for an entire country, you can download a list for each country from the IPdeny website. This would be useful if you wanted to just firewall block an entire country from accessing your server like all of those hackers in China hammering your SSH or web server looking for exploits.

Each list is a plain text file with one CIDR notation address range per line. The plain text file and standard CIDR notation makes parsing the file with a script easy to do. The lists are updated fairly often. Here is the direct link to download the lists: http://www.ipdeny.com/ipblocks/

Shadow of hand over keybaord

How to Search for an Exact String With GREP

GREP is one of those simple UNIX programs that you can’t live without if you do any kind of systems administration of an operating system based on UNIX such as Linux or Mac OS X. If you need to search for an exact string and NOT just a substring, all you have to do is specify the “-w” command line switch. For example, say you wanted to search for the string “username” in a text file named “login.php” that contains the following lines:

username = "foo";
groupusername = "myGroupUserName";
defaultusername = "defaultUser";

If you try the command:

grep “username” login.php

all of the lines in the file would be returned since they all contain the substring “username” somewhere in the line.

locahost ~: grep "username" login.php
username = "foo";
groupusername = "myGroupUserName";
defaultusername = "defaultUser";

However if you specify the “-w” command line switch, only the first line will be returned:

localhost ~: grep -w "username" login.php
username = "foo";

Terminal

If You’re Tired of Answering Simple Tech Support Questions…

This post is more for people that are tired of receiving technical support questions which are easily answered with a simple Google search. I don’t mind receiving questions from paying clients, it’s the family and friends seeking free computer help that gets annoying sometimes. There is a very clever website called “Let Me Google That For You” which will allow you to type in a Google search phrase like you normally would except this website will generate a URL that you can give to someone which will graphically illustrate what you did. When the person you give this URL to loads it in their web browser what they see is a short animation of you typing in the Google search phrase along with an obnoxious caption explaining each step that is done in an almost child-like manner. It sort of points out how easy it is to find the information yourself rather than bothering someone else for help.

Here is a demo of what the website produces for a simple search I did: http://tinyurl.com/7hasnj

Here is the URL for the Let Me Google That For You Website: http://www.letmegooglethatforyou.com

Google Logo