Me in IT UNIX/Linux Consultancy is based in Breukelen, The Netherlands and specialized in UNIX and Linux consultancy. Experience with Red Hat Enterprise Linux (Red Hat Certified Architect), Fedora Project, CentOS, OpenBSD and related released Open Source products makes Me in IT UNIX/Linux Consultancy a great partner in implementing, maintaining and upgrading your environment.

Open Source software is an important aspect of any Linux distribution. Me in IT UNIX/Linux Consultancy tries to use Open Source software where possible and tries to share experiences actively. In the articles section you will find many UNIX/Linux adventures shared for others to benefit.

SSH door knocking to zero

Do you see your log files filling up with failed ssh login attempts? Read on, I have seen the rate drop from thousands of attacks per day to 0.

Here are some stats of "top days". The last column represents the number of failed login attempts. Well you will understand that it was not me trying to login thousands of times.

13 Aug 2007 - 2811
15 Aug 2007 - 2997
16 Aug 2007 - 2961
19 Aug 2007 - 4408
26 Aug 2007 - 1071
27 Aug 2007 - 524
28 Aug 2007 - 1371
5 Sep 2007  - 1743
8 Sep 2007  - 4430

After applying some extra rules, the rate dropped to 0. (ZERO!) Here is the content of my /etc/sysconfig/iptables:

# Generated by iptables-save v1.2.11 on Thu Sep 13 09:05:18 2007
:INPUT ACCEPT [140:7830]
:OUTPUT ACCEPT [579921:740182530]
-A INPUT -i eth0 -m state --state RELATED,ESTABLISHED -j ACCEPT
-A INPUT -i lo -j ACCEPT
-A INPUT -s -p tcp -m tcp --dport 22 --tcp-flags SYN,RST,ACK SYN -j ACCEPT
-A INPUT -s -p tcp -m tcp --dport 22 --tcp-flags SYN,RST,ACK SYN -j ACCEPT
-A INPUT -s -p tcp -m tcp --dport 22 --tcp-flags SYN,RST,ACK SYN -j ACCEPT
-A INPUT -s -p tcp -m tcp --dport 22 --tcp-flags SYN,RST,ACK SYN -j ACCEPT
-A INPUT -p tcp -m tcp --dport 80 --tcp-flags SYN,RST,ACK SYN -j ACCEPT
-A INPUT -p udp -j DROP
-A INPUT -p tcp -m tcp --tcp-flags SYN,RST,ACK SYN -j DROP
# Completed on Thu Sep 13 09:05:18 2007

And don't forget to change the fake IP addresses,, and to IP addresses of machines you can also login to.

Share screens with GNU Screen

When you are troubleshooting Linux, UNIX, BSD, or whatever platform that has GNU Screen installed, you can share a screen to see what you are doing.

Combine GNU Screen with an instant messenger, and you have a great live collaborate support tool.

First start screen:


Then enable multiuser mode:

:multiuser on

And let another person see your screen:

screen -x

You are now both working in the same screen. Please also ready my article about the undervalued program screen.

List of Google tools that you should use

To remember all the tools that Google provides, an (personal) order of usefulness:

Google Search - Search the web.
Google Apps - Use Gmail, Calendar, and other "office tools".
Google Analytics - Extensively monitor your websites.
Google Maps - Satellite images of the earth.
Google AdWords - Display your add in Google searches.
Google Webmaster Tools - See how Google sees your website.
Google Trends - Check search history graphs for keywords.

Compare searchwords to make a buy decision

Here is a simple trick to determine what product is most popular. I use it to make buy decisions for products.

Here are some examples:

  1. An Ipod or a Zune? - Ipod!
  2. A Nikon or a Canon Camera? - Canon, but I still choose Nikon.
  3. The D40 or the D200? - D40!
  4. Apple or Linux as a desktop? - Close call, happily I am using Apple, and have switched from Linux some years ago.
  5. A Hybrid Toyota, Honda or Lexus car? - Close call, Toyota.

Google Trends graph

Tux and Firefox image in coloured ASCII art

Firefox in ASCII art Here are two comparable, but cool images of Firefox and Linux in ASCII art. I happen to love ascii art, also be sure to check the alt.ascii-art group and the aalib library for linux, that can even display movies in ASCII! Tux in ASCII art

Joining data in SQL

The first time somebody explained to me what a (SQL) "join" was, I was confused and amazed. Let me try to help you understand what a join is by simply explaining a situation.

First of all you will have to know that it is normal to store information into different tables in databases. This makes managing the data more efficient. So lets assume that we already have two tables in a database:

| books |
|-------+   +---------+
| id    |   | authors |
| title |   +---------+
| aid   |---| id      |
+-------+   | name    |

What I tried to "draw" is that two tables exist, and they are sort of related to each other. The books aid is related to the authors id.

You can see what tables are available by this command:


In our case the output will be:

| Tables_in_mydatabase |
| books                |
| authors              |

For a more detailed scheme of how these individual table are configured, use "DESCRIBE table;".

Now imagine the content of these tables looks like this:

SELECT * FROM books;

| id | title                                | aid |
|  0 | Harry Potter and the deathly hallows |   0 |

And our other table "authors":

SELECT * FROM authors;

| id | name         |
|  0 | J.K. Rowling |

You can see that these things are related right? J.K. Rowling wrote that book of Harry Potter.
To "attach"/"connect"/"join" the data in both tables, you can use a query like this:

SELECT * FROM books, authors WHERE;

As you see, you indicate a field (id, title, aid, name, etc) with the corresponding table before the field, separated by a dot. This is a bit weird, but how would the SQL engine otherwise be able to know the difference between the "id" field of "books" and "authors"?

The output will look like this:

| id | title                                | aid | id | name         |
|  0 | Harry Potter and the deathly hallows |   0 |  0 | J.K. Rowling |

Wow, you just joined these two tables! But, there is a bit more to know about joining tables; you don't need those "id" and "aid" fields right? They are just there to link the data, not to show to everyone that wants to buy a book of your website. Here is how to properly structure a query then:

SELECT books.title, FROM books, authors WHERE;

Again, you indicate fields by adding the table name in front of the field, followed by a ".".

The ouput would now look like this:

| title                                | name         |
| Harry Potter and the deathly hallows | J.K. Rowling |

Well, that is the result you wanted to see right?

You can also join more then one table, just add "AND table.field=othertable.field" to the last part of your query. Do know that joining is quite CPU intensive, especially those multiple joins.

There are some variations on how to indicate the table. Until now I used the table.field format, which is my absolute favorite, but you will see queries abbreviated like this:

SELECT b.title, FROM books b, authors a WHERE;

This code looks rather fuzzy to me, I never use it. Imagine you'd have to join several tables:

SELECT b.title,,, w.price FROM books b, author c, publisher p, weight w WHERE AND AND;

It is up to you, but I suggest not using these difficult abbreviations, as the only tend to confuse.

Good luck joining data, you have learnt a valuable skill today!

IP coolness

Your IP address as a bitmap
Check out this utility, that checks how cool your IP address actually is... Also check out the IP address of this website.

Google Earth FlighSimulator

Screenshot of Google Flight SimulatorTake a look at the page that explains how you can use Google Earth as a Flight Simulator! That is good news if you want to see your country from flight view! I will certainly try this at home! Google offers so many great services, it scares me how dependent I am becoming of services that they offer.

Next time you launch Google Earth, hit this combination:

Command+Option+A or CTRL+ALT+A

How google works

Google signHere is a quick presentation on how Google manages their data and serves all those requests.

Be aware; this is not a SEO-thing, but more technical about machines, clusters, queries, etc. For people in this business it could be rather interesting to know how it is possible that on web-site serves millions of requests each hour. This is done by introducing a cluster of several locations. Wow, I'd like to have a website that popular!

Generating traffic to your website

The big quest for traffic is on! It is actually on for quite some time already. Finding new ways to generate (targeted) traffic to your website is exciting and here is things I have done, with their success rate.

Media Minimum price Traffic Generated daily Price per visitor
Google AdWords € 25,- per month 2-5 clicks € 0,50
Animated Homepage $ 15,- per slot 10 $ 0,-
Yahoo Search Marketing $ 50 per campaign 2-5 $ 0,50
Stubmleupon Advertising $ 5,- daily 100 $ 0,05

Animated Homepage is unique in the sense that their website redirects visitors to one of the available slots. There are 100.000 slots available, around 100 have been sold so far. About 250.000 visits are registered daily, so now you can own a piece of internet history for only $ 15,- which will generate 2500 visitors daily. Please bear in mind that these visitors are browsing around the internet, not specifically to buy your product, but to discover cool websites.

One thing to mention is the type if traffic you are looking for. If you are looking for targeted (location based) sales leads, Google AdWords and Yahoo Search Marketing are likely the best choices. To have more visitors on your website, Animated Homepage and stubleupon are a better pick.

Please bear in mind that you do not have to pay stubleupon to generate traffic, when people "thumb-up" your site, traffic is sent to your site automatically.

About Consultancy Articles Contact

References Red Hat Certified Architect By Robert de Bock Robert de Bock
Curriculum Vitae By Fred Clausen +31 6 14 39 58 72
By Nelson Manning [email protected]
Syndicate content