Why you should limit login attempts

limit-logins

Some idiot at 213.155.4.184 hit all my websites over the last few days trying to login to my blogs. He fired off hundreds of automated requests probing and searching and testing my admin login. Each request had a different password. I use difficult to guess passwords but seeing the attempts was disconcerting.

I went searching and found the Limit Login Attempts plugin. After installing, a new page appears under Settings with a wealth of options:

lockout

I’m glad I did install it, it caught the same guy when he hit this blog a few hours later! You should probably install it too.

PS. Matt asked me to explain how I recorded those requests. There is a WordPress plugin that sends an email when a POST request is made but I threw this code into a file and load it with the “auto_prepend_file” directive in my php.ini (saves adding it to every installation of WordPress on my server)

if ( ( isset( $HTTP_RAW_POST_DATA ) || !empty( $_POST ) ) && $_SERVER[ 'REQUEST_URI' ] != '/wp-cron.php?doing_wp_cron' && $_SERVER[ 'SCRIPT_NAME' ] != '/wp-comments-post.php' && substr( $_SERVER[ 'REQUEST_URI' ], -10 ) != '/trackback' && substr( $_SERVER[ 'REQUEST_URI' ], -11 ) != '/trackback/' ) {
    mail( "MYEMAIL@gmail.com", $_SERVER[ 'HTTP_HOST' ] . " POST request: " . $_SERVER[ 'REMOTE_ADDR' ], "URL: {$_SERVER[ 'REQUEST_URI' ]}\nPOST: " . print_r( $_POST, 1 ) . "\nCOOKIES: " . print_r( $_COOKIE, 1 ) . "\nHTTP_RAW_POST_DATA: $HTTP_RAW_POST_DATA" );
}

Irish Blog Awards 2009 Photowalk

About time I posted these. The Blog Awards took place in Cork this year, last February, and before the big night, a good number of photographers wandered around Cork City. I posted several IBA09 photos on my photoblog already but here are a few more:

BTW – if you’re in Cork next weekend, there are still places left in the photowalk! I haven’t decided where we should go after the walk but it’ll probably be The Old Oak as they have plenty of room.

Continue reading “Irish Blog Awards 2009 Photowalk”

WordPress MU 2.8.1

WordPress MU is a multi user or multi blog version of WordPress that is used to run sites like WordPress.com.

Just a day after WordPress 2.8.1 came out and here’s WordPress MU 2.8.1. The original WordPress announcement has plenty to say about this release, but what you need to know is this is a security update and a required upgrade.

This is the first MU 2.8.x release because of course there wasn’t a 2.8 one. Make sure you upgrade to stay up to date. The handy auto upgrade facility built in to the software should kick in but if not, go to the download page and grab the new zip file. Unzip over your current install and any database upgrades will take care of themselves when people login.

The WPMU Timeline is a good place to look to keep track of what has changed. Many bugs were squashed and features added.

WordPress MU 2.8.1 beta

Autumn Trees WordPress MU is a multi user or multi blog version of WordPress that can be used to run sites like WordPress.com.

MU Admins! Please download and test wpmu-2.8.1-beta.zip on a test server! This is a beta release that is this <—> close to being final but it needs testing by the community.

It works fine on my test server but I haven’t been able to test every last thing to death. That’s where you come in. Download it, install it, login, look around. Notice anything broken? That’s what Trac is for. Verify you can repeat the problem, open a ticket and describe how the problem can be reproduced. Well done. You’ve just contributed to a Free Software project. 🙂

PS. I know there are two “My Blogs” links in the beta. That was fixed 2 days ago. Grab the zip file from the end of this page to get the most up to date code.

Run a program on one CPU core in Linux

Modern computers use CPUs with multiple cores for performance reasons. Software can take advantage of that and use both cores to run separate threads but sometimes it’s useful if you can force a process to use one core rather than both.

In Linux that’s easy to do. If you’re using Ubuntu or Debian grab the schedutils package:

sudo apititude install schedutils

That will install a program called “taskset” which is a tool to “retrieve or set a process’s CPU affinity”. It’s really easy to use too.

I wanted to force Bibblelabs on to one core while importing photos.

# ps auxw|grep bibble
donncha 19482 78.7 33.1 1090388 681220 ? RNl 09:56 77:28 ./bibblepro
# taskset -p 19482
pid 19482’s current affinity mask: 3
# taskset -p 01 19482
pid 19482’s current affinity mask: 3
pid 19482’s new affinity mask: 1

The app is still heavy on the system, and “System Monitor” doesn’t suddenly show 0% usage on one CPU because I’m also running Firefox, Xchat, X, Gnome Terminal but I’d almost swear the browser window refreshes faster.

PS. Thanks to whoever told me about this on Twitter a while back. It had slipped my mind and I had to search for it again. Blogging it to remember it!

Please help the World Health Organisation

I received a nice polite email from a man asking for my help last week. He was a bit cryptic but he replied this morning saying he works with the World Health Organisation.

Help the World Heath Organisation

Hi Donncha O Caiomh,
there is something to talk about , i want your assistance coz i work with W.H.O ( world health organisation ) and i bought some goods in state and i am in finland here for official purpose.
Will you kindly send me your address so i can send the goods to you and also maybe when am through with my official assignment i will come down there and collect the goods bought.
Pls kindly reply me so as to know what to do.
THANKS
JUNIOR BENRICHARD.

Oh the poor guy! He’s stuck in Finland and needs goods delivered? As I was about to reply with my full address, I remembered getting another email from him. He had contacted me about a post I wrote. That was last week when I was on holiday and I still haven’t got around to clearing out my inbox. I went searching and here it is:

electric car info

hi
yea i drive an electric car. i work with the car construction company. if you wanna know, kindly send me 3000usd via western union and i will get back to you as possible.
you can call me on +2348029479959. am junior by name.

Oh what a talented guy! He works for W.H.O. and for a car company! I don’t know if I want to know about electric cars that much. I mean, $3000? That’s a lot of money!

Oh, and Ben, since you’re subscribed to my blog, please get in touch again. The Irish Police want a word with you.

Edit (10/08/09) Ben has been in touch again:

Hi donncha, how r you nd everything, am off state and i some1 wanna send some money to my credit-card so as to collect and use it to pay my childs school fee. pls send me you details so as to send you the money nd you will only help me to western it to my child coz she is totally inneed of it.
am looking forward to see your reply
JUNIOR BENRICHARD.

The King of Pop is dead

Michael Jackson

Where were you when you heard? My wife and I were relaxing in the sitting room of the Dingle Skellig Hotel when we heard that Michael Jackson had died. An elderly couple across the room had the Irish Examiner and were poring over the news.

I remember the day he played in Cork. I lived in Blackrock, only a mile and a bit from the stadium, Pairc Ui Chaoimh, where he played to a sold out audience. That day my French exchange student arrived by ferry and spent the evening in bed recovering from the trip. I hung around the house since I didn’t want to be away in case he woke up.
I could hear the glorious pop tunes from my front door and I longed to walk down and sneak into the grounds around the stadium for a better listen, but nooooo, I bloody well stayed at home. He never woke up. He slept through until the morning! Argh!

Thankfully my wife has better memories of the day. She was there, and even before today she’s said it was the best concert she’s been to. She has mentioned it several times over the years. She remembers the 15 year old teenager with tears of joy as MJ sang “Man in the Mirror”. She went on and on about how he played all his hits rather than pushing “the new stuff” nobody knew yet.

*Sigh*. Jean-Jacques, I wonder if you’ll ever read this. I don’t hold it against you, but I should have had the sense to wander off down there!

Edit: a few more posts about Michael Jackson:

  1. MS Paint Portrait
  2. A mashup of “Rock With You” and (Queen and?) David Bowie’s “Under Pressure”.
  3. Did you know MJ registered a patent?

Murphy's Ice Cream

Murphy's Ice cream

We called into Murphy’s Ice Cream in Dingle this morning. I bought a chocolate and mint ice cream mix. If you’re in the town you really should call in for a scoop or two! Yum!

The business is run by brothers Sean and Kieran who I had hoped would be there but unfortunately they were out. They blog at Ice Cream Ireland and both have twitter accounts: Sean, Kieran

The Lisbon Laws

200px-VulcansHammer(1stEd) Around a year ago I was reading Vulcan’s Hammer when I came upon something that rattled me. At the time the (first) Lisbon Treaty was about to be voted on so everyone was talking about Lisbon this, Lisbon that, and what it all meant, and how nobody knew what it all meant, etc etc.

Well, in Vulcan’s Hammer, written by Philip K. Dick in 1960, the world has become a totalitarian society ruled by mysterious computers given absolute power in 1993 by legislation called “The Lisbon Laws”. It didn’t affect how I voted of course but the naming coincidence was starling!

Here’s an extract from the book. Anti Lisbon Treaty folk better get your tinfoil hats on!

Mrs. Parker made a note on her chart. “Correct.” She felt pride at the children’s alert response. “And now per­haps someone can tell me about the Lisbon Laws of 1993.”
The classroom was silent. A few pupils shuffled in their seats. Outside, warm June air beat against the windows. A fat robin hopped down from a branch and stood listening for worms. The trees rustled lazily.
“That’s when Vulcan 3 was made,” Hans Stein said.
Mrs. Parker smiled. “Vulcan 3 was made long before that; Vulcan 3 was made during the war. Vulcan 1 in 1970. Vulcan 2 in 1975. They had computers even before the war, in the middle of the century. The Vulcan series was developed by Otto Jordan, who worked with Nathan­iel Greenstreet for Westinghouse, during the early days of the war…”
….
For a moment there was no response. The rows of face were blank. Then, abruptly, incredibly: “The Lisbon Laws dethroned God,” a piping child’s voice, came from the back of the classroom. A girl’s voice, severe and pene­trating.
….
Mrs. Parker paced rapidly down the aisle, past the chil­dren’s desks. “The Lisbon Laws of 1993,” she said sharply, were the most important legislation of the past five hundred years.” She spoke nervously, in a high-pitched shrill voice; gradually the class turned toward her. Habit made them them pay attention to her-the training of years. “All seventy nations of the world sent representa­tives to Lisbon. The world-wide Unity organization for­mally agreed that the great computer machines developed by Britain and the Soviet Union and the United States, and hitherto used in a purely advisory capacity, would now be given absolute power over the national govern­ments in the determination of top-level policy-”
….
“Mr. Dill,” a girl’s voice came. “Can I ask you some­thing?”
“Certainly,” Dill said, halting briefly at the door. “What do you want to ask?” He glanced at his wrist watch, smil­ing rather fixedly.
“Director Dill is in a hurry,” Mrs. Parker managed to say. “He has so much to do, so many tasks. I think we had better let him go, don’t you?”
But the firm little child’s voice continued, as inflexible as steel. “Director Dill, don’t you feel ashamed of yourself when you let a machine tell you what to do?
….
“The Lisbon Laws, which you’re learning about. The year the combined nations of the world decided to throw in their lot together. To subordinate themselves in a realistic manner-not in the idealistic fashion of the UN days-to a common supranational authority, for the good of all man­kind.”
….
“There was one answer. For years we had been using computers, giant constructs put together by the labor and talent of hundreds of trained experts, built to exact stand­ards. Machines were free of the poisoning bias of self-interest and feeling that gnawed at man; they were capable of performing the objective calculations that for man would remain only an ideal, never a reality. If nations would be willing to give up their sovereignty, to subordi­nate their power to the objective, impartial directives of the-”

It’s a great story and well worth a read. It was part of a 3 story book called “Philip K Dick Three Early Novels” containing The man who japed, Dr. Futurity, and Vulcan’s Hammer. The first story almost put me off reading the other two as it had dated badly. Some of the character’s names and the technology are really old fashioned! Persevere, it’s worth it.