Archive for the 'Linux' Category

New lame Adserving software

Mark Evans has written an article about a new Ad Serving company called AdGenta.

It is supposed to deliver more relevant ads because you upload your blogs posts through a downloadable AdGenta application called Qumana (where do they come up with these names?). You compose the post in Qumana, click on the advertising button and an ad is placed into your article based on the text of your piece.

All sounds fine until you go to download Qumana and you see the Qumana System Requirements:

Operating System: Windows(R) XP, Windows(R) 2000, Windows(R) 98

Hello? Where is the Mac version? And the Linux version?

Then you look at the blog platforms supported:

metaWeblog
Blogger
MoveableType

metaWeblog? Who uses metaWeblog? Where is the WordPress support? What about LiveJournal? TypePad?

Lame.

Guys - if you want to take on the big boys you need to get bloggers on board, - to do that, you need to support the platforms we use.

UPDATED:
Edited to add the Linux versions question - thanks Michele

Block hotlinkers but allow some sites remote access to images using .htaccess

In a previous post I explained how to create a .htaccess file to stop remote image linking (hotlinking) and bandwidth theft - however, there are some situations where you might want your image files linked to from remote sites - how do you make exceptions for these sites?

The code to block all sites from hotlinking to your images is, as follows (see my previous post for a detailed explanation of the code):

RewriteEngine on
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://(www\.)?tomrafteryit.net [NC]
RewriteRule \.(png|gif|jpe?g)$ - [NC,F]

To allow Google, AltaVista, Gigablast, Comet Systems, and SearchHippo translators and caches to be able to link to images we need to use the following code:

RewriteEngine on
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://(www\.)?tomrafteryit\.net [NC]
RewriteCond %{HTTP_REFERER} !^http://216\.239\.(3[2-9]|[45][0-9]|6[0-3]).*(www\.)?tomrafteryit\.net [NC]
RewriteCond %{HTTP_REFERER} !^http://babel.altavista.com/.*(www\.)?tomrafteryit\.net [NC]
RewriteCond %{HTTP_REFERER} !^http://216\.243\.113\.1/cgi/
RewriteCond %{HTTP_REFERER} !^http://search.*\.cometsystems\.com/search.*(www\.)?tomrafteryit\.net [NC]
RewriteCond %{HTTP_REFERER} !^http://.*searchhippo\.com.*(www\.)?tomrafteryit\.net [NC]
RewriteRule \.(png|gif|jpe?g)$ - [NC,F]

And obviously, everywhere you see my domain (tomrafteryit.net) in the code, substitute in your own domain.

Windows XP SP 1 - not very secure!

The Denver Post carries a story which clearly shows just how insecure Windows XP SP1 is compared to other Operating Systems

According to the story, StillSecure, a Louisville-based network security firm, connected six computers - with six operating systems - to the Internet for a week without any virus protection. Over the course of a week, the machines were scanned a total of 46,255 times by computers around the world that crawl the Web looking for vulnerabilities in operating systems.

Once the vulnerabilities were identified, the remote computers launched 4,892 direct attacks with a staggering variety of worms, Trojan Horses, viruses, spyware and other forms of malware.

The test examined only what happens when computers are turned on and connected to the Internet. The test didn’t evaluate additional dangers that computer users face when they use e-mail, surf the Web, click on Internet links or use file-sharing programs.

Here’s what happened:
Windows XP Service Pack 1

Attacks: 4,857

Results: Attacked successfully within 18 minutes by the Blaster and Sasser worms. Within an hour, the computer was taken over and began attacking other Windows machines.
Windows XP Service Pack 2

Attacks: 16

Results: Survived all attacks
Apple Mac OS X Jaguar

Attacks: 3

Results: Survived all attacks
Linux, Suse Professional 9.2

Attacks: 8

Results: Survived all attacks
Linux, Fedora Core 3

Attacks: 8

Results: Survived all attacks
Linux Red Hat 9

Attacks: 0

New Oasys keyboard has Linux built-in

I see on the Korg site where their new Oasys keyboard runs on Linux.

It is retailing for upwards of $8000 - too bad Christmas is just over!!!

Using .htaccess to redirect hotlinkers to another image

In my last post on using .htaccess to block direct linking of images, I advised simply using the RewriteRule to forbid display of images (i.e. RewriteRule .(gif|png|jpg|jpeg?)$ - [NC,F]). This is a nice simple rule which works a treat to block display of your images on remote sites.

However, if you want to take this a step further, you can re-direct requests for images from remote webpages to an image of choice on your website. I have created an image, called stolenimage.jpg, which simply says “This image is stolen”. Anyone trying to link directly to images on my site is, therefore, inadvertantly serving that image on their pages.

The code to put in .htaccess to achieve this is:

RewriteEngine on
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://(www\.)?tomrafteryit.net [NC]
RewriteRule \.(png|gif|jpe?g)$ stolenimage.$1 [NC,L]

This is the same code as is in my previous post except for the RewriteRule.

It is a very good idea not to redirect a browser from one file type to another. The cleanest approach is to make a seperate version of your the stolenimage.jpg file in each format that you use on your site - for example I have one in gif format, one in jpg format, one in jpeg format, and one in png format. Then redirect each hot-linked image to the matching filetype.

In the RewriteRule above, the “$1″ in the last line refers back to the contents of the parenthesis in the same line. That is, a request for a .jpg file will be redirected to http://www.tomrafteryit.net/stolenimage.jpg, and a request for a .gif file will be redirected to http://www.tomrafteryit.net/stolenimage.gif, etc.

The L in the square brackets is the “last rule” - it stops the rewriting process here and tells the .htaccess file not to apply any more rewriting rules. See the Apache mod_rewrite URL Rewriting Engine page for more.

Obviously, if you are feeling a bit mischievous, you can serve other images to people hotlinking your images - “Free shipping worldwide - we ship anywhere for free”, “Order one, get three free” or “This site supports the Taliban’s policy on Feminism” are some possibilities! You are only limited by your imagination.

Many thanks to all the contributers to the WebmasterWorld forums, from where I gleaned most of the information in these posts.

Using .htaccess to stop remote image linking (hotlinking) and bandwidth theft

Hotlinking, remote image linking, direct image linking is when a remote website embeds images from your site on their webpage(s) - this causes the image to be served from your website to anyone browsing their site - thus they are robbing your bandwidth.

How can you stop this? Well, using an .htaccess file in your images folder(s), there are a number of options.

The most straightforward is to simply create an .htaccess file with the following code:

RewriteEngine on
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://(www\.)?tomrafteryit.net [NC]
RewriteRule \.(png|gif|jpe?g)$ - [NC,F]

The first line here turns on mod_rewrite (a rule-based rewriting engine (based on a regular-expression parser) to rewrite requested URLs on the fly) and only needs to be done once per .htaccess file.
The next line is needed to allow your site to be viewed through proxy caches. If you take it out, then anyone without a referer won’t be able to view your site. Many proxy caches, for instance, block referers… and that looks the same as a directly-entered URL.
The third line tells the .htaccess file where to allow image files to be served from - in this case it will allow images be served from http://tomrafteryit.net and http://www.tomrafteryit.net (remember to update this for your own domain!) and
The final line is case insensitive (the NC) and instructs the .htaccess file what file types to restrict the serving of. You could just as easily use this to protect .mp3s, .pdf’s or any other file type by substituting the file type in this line. The F in the square brackets forces the current URL to be forbidden.

For more infomation on this see the Apache mod_rewrite URL Rewriting Engine page.

There are more things you can do via .htaccess to stop people hotlinking to your images that I’ll cover in my next post.

Warning - The .htaccess file is very powerful (it can potentially take your entire site offline) and sensitive to typo’s - always test your site after making changes and be sure you have a plan to revert in the event of a problem arising.




Tom Raftery’s Social Media is Digg proof thanks to caching by WP Super Cache!