Articles

Software - Sub Categories

Search engine fun!

Given rare, unique words on a web page, one would expect search engines could easily determine the top sites to list for the keywords.

My interest led me to these keywords: "aczoom home page".

Google search, MSN search, Ask Jeeves search, all list my home page as the first or second item in the search results. They also list other aczoom pages in their results, and adding more keywords can find links to key pages at my site.

Here's a picture of the Google results in January 2006.

Yahoo search results are strange - they do not list a single page hosted at aczoom.com for the above search! They do list numerous pages that link to aczoom.com, but not a single direct aczoom.com page is listed.

[Well, one page is listed, but that area is supposed to be off-limits to search engines, I guess robots.txt does not work as it is supposed to work.]

Here's a picture of the Yahoo results in January 2006.

I have mostly used Google for my searches, but recently got intrigued with the issue search engines have with handling redirects, and I use Drupal, so started checking out how search engines behaved. My conclusion is that if Yahoo can't get this simple query right, it diminishes my confidence in the credibilily of their search results. This is also technically interesting - how is Yahoo building their list, that would result in this situation?

I did try to help them along, submitted aczoom.com manually to Yahoo, but that was a while ago. Shouldn't have had to do that anyway - they have so many pages that link to aczoom.com, would that not lead them to spider aczoom.com itself?

Solar Energy for Lighting in India

Regions in India receive an abundance of sunlight - over 300 days on average in a year.

Solar Energy can be harnessed to provide lighting for millions of homes, and in the villages, using solar energy achieves two goals: it provides good quality, longer lasting light for the homeowner, and it helps reduce the burning of fossil fuels such as kerosene resulting in decreased green-house gas generation.

burning kerosene using solar energy

Grameen Surya Bijlee Foundation has initiated the
Dignity through Electricity Program, and has taken the lead in installing 200 systems in a village. GSBF is now looking for partners - NGOs or Individual Donors - to help spread solar energy lighting to many villages that today cannot afford to use anything other than kerosene for lighting.

Grameen Surya Bijlee Foundation (GSBF) is a non-profit Trust set-up to provide lighting and other amenities to the villages in India, using renewable energy sources.

For more information, including names and addresses of the trust management, please visit: suryabijlee.com.

Related articles:
From online edition of Indian Express Nov 27, 2005, Sunlit nights by Rituparna Bhuyan, Digital solar lamps designed by two IIT graduates have brought light to Bhairavnath Vasti in Maharashtra.

Details

blockhosts.py scans system logs, and looks for failed login attempts. It keeps a record of the number of times a particular IP address had a failed login. When the count exceeds a configured value, that IP address is added to /etc/hosts.allow with a deny flag, so the next time that IP address attempts to connect to that box, they will get a refused connection message. Optionally, null-routing or packet filtering can be used to block all communication from that IP address. Program also offers a way to provide email notification of the list of blocked as well as watched IP addresses, and a way to specify lists of whitelisted and blacklisted IP addresses and IP address patterns.

Requirements:

  1. Python, version 2.3 or later.
  2. If using hosts.allow blocking, TCP_WRAPPERS enabled services can be blocked. Extensions to the access control language as described in the man 5 hosts_options page are required, which allow use of :allow and :deny keywords.
  3. All services can be protected if using null-routing or packet filtering. The requirements for this are that there should be a way to detect failed accesses in some system log file, and a way to run this script each time such an access is made (or if sufficient, this script can be run periodically using cron).
  4. IPv4 addesses supported, IPv6 not supported at this time.
  5. Many patterns are now available, to support detection of failed access to many services. OpenSSH and proftpd logs were the first to be supported, for the current patterns, see the default blockhosts.py configuration, in blockhosts.cfg file.

For details on the program arguments and configuration, run the script with the --help option:
blockhosts.py --help

Overview

Blocks IP addresses based on SSH or FTP incoming login failures, by looking at SSHD and ProFTPD logs, and updating hosts.allow as needed.

If you are a Linux user running SSH server, it is likely that you have been probed by script kiddies, and your daily LogWatch emails will show 100-150 login attempts in a short interval, before they go away. There is no option in OpenSSH to make it difficult to slow down repeated login attempts coming from one IP address -- logins occur at a pretty fast clip -- one attempt every few seconds.

For a home or small business linux user at least, it does not make sense to keep the door open for logins for so long. Use this script, and see the daily LogWatch email notifications now showing only 7-9 login attempts, and remote hosts start getting "Refused incoming connection" messages. Then, reading the daily LogWatch emails is not terrifying at all, in fact, it may be fun to see these script kiddies get blocked!

  • Be sure to acquaint yourself with material available on the web, related to security, and denial-of-service. In particular, see the discussion in the OpenSSH mailing list related to SSHD blocking and FAIL_DELAY:
  • Make your sshd/proftpd configurations as tight as possible. For example, for sshd - turn off root logins (PermitRootLogin), use the AllowUsers keyword to only allow one or a select usernames to be accepted. As far as possible, try to avoid common usernames, make even the user names hard to guess. For ProFTPD, use /etc/ftpusers, which contains names of users that will not be allowed to use FTP, root should be in there.
  • Last, but not least - always use strong passwords! That may be the only final protection.

Download

Program Source Code

Update notifications: To get email notifications of new releases, use the facilities available at the freshmeat.net BlockHosts project page. Updates are not very frequent, may be weeks or months between releases.

BlockHosts

Automatic blocking of remote IP hosts attacking ssh and other services

Script to record how many times system services are being probed, using configurable pattern matching to recognize failed accesses (such as for "sshd" or "proftpd" or any service), and when a particular IP address exceeds a certain number of failed attempts, that IP address is blocked by using multiple techniques: using /etc/hosts.allow for services that support TCP_WRAPPERS, or by executing ip route commands to setup null-routing for that source host address, or by executing iptables commands to setup packet filtering to drop packets from a source host address. Both IPv4 and IPv6 supported.

Requires python version 2.3, and runs on Unix-like machines only.

Script is most suitable for home Linux users, who need to keep ssh/ftp ports or other services open, and need to block the script kiddies. With null-routing or packet filtering, any service can be protected, since those mechanisms block at the IP routing or packet filtering level. In this case, the only requirement is that there should be a way to detect failed accesses in some system log file.

Also available: BlockHosts Forum and BlockHosts FAQ.

Moving to Drupal

After months at looking at various Content Management Systems, Blogging Tools, I've decided to move this site to Drupal.

All the links that most people use are available at the top of the left-sidebar on this page, those pages will continue to stay as they are.