How to deal with someone trying to login as admin? During these last days, I noticed in my dblog, that someone has been trying to sneak around.

The person tried finding the login url (my website isn't open for user registration) so they tried everything from my-domain.com/admin, my-domain.com/administrator.. and also my-domain.com/wp-login (which indicates that the person isn't familiar with drupal..)

Once the person ended up on /user he or she tried to login as admin by trying different usernames : admin, administrator etc... (I never use 'admin' as a username for the root user)

is there a way to prevent/protect a drupal website from this sort of things ?

Thanks

ps : i'm interested in how to do this both for d6 and d7.
These kinds of probes are very common across the internet. There are a few things you can potentially do to block this problem and reduce the success of an attacker.

First, I recommend everyone use Two Factor Authentication so that even if the attacker guesses your username and password they still can't login. There was a bounty for $500 to break TFA and although the white-hat attackers had username and password they couldn't break in.

The security review module or Droptor can help monitor these failed logins. If they happen a lot then you need to start taking more actions. Brute force attacks on passwords only work if someone does them a lot so if it just happens a few dozen times I wouldn't worry.

You can track the IP address in use by this person using watchdog entries and then use the built-in D6 Access Rules (or the d7 equivalent - http://drupal.org/project/user_restrictions ) to block access via that IP. You could also deny access to the IP in Apache or some other server level firewall. The firewall/webserver is a more efficient place to block the users in terms of load on the server, but it usually requires a bit more effort.

For Drupal 6 and 7, AjitS has provided an answer with a good description of how to use a rate-limiting feature to prevent repeated login attempts from the same IP.