tech.agilitynerd.com

scratching that itch... 
Filed under

sys admin

 

Image Theft Ranting And Blocking

I was really disappointed yesterday when I checked my blog's statistics and found that someone from a Hungarian Agility discussion board had directly linked course images from my website. Direct linking of an image is placing the URL of the image directly in a webpage hosted on another server. Each time a browser loads that page the direct link causes the other server to send the image to the client's browser. So each time the forum is viewed my server has to send the images to the forum's viewer.

I purposely try to make my image sizes small to make it possible for dial up visitors to view my site without too much delay. So direct linking doesn't impact my bandwidth costs too much; so far it is about 1Mb a day. The additional burden it puts on the webserver should be small too, but since I don't own the shared server I don't really know.

Ranting

The aspect of this that most irritates me is that someone would copy my work without attribution. That is the only thing I ask of visitors to my site who wish to reuse my content. The license link at the bottom of each page should make this clear. I really don't think this is it too much to ask.

I take copyright infringement very seriously. To me it isn't just the legal requirements of using other's material in accordance with their wishes that is important, taking credit, explicitly or implicitly, for another's work is just wrong. This is one of those All I Really Need To Know I Learned In Kindergarten concepts: Don't take things that aren't yours. As a friend of Nancy's says "Some people don't have good home training".

Lastly, the Agility community is still a small community and the online Agility community even more so. I guess I am naive, but I hoped that the members of our community wouldn't do things like this.

Blocking

My first step was emailing the webmaster of the site. The site was entirely in Hungarian so it is possible the webmaster may not have understood my English request. In any event, after 24 hours they hadn't removed the links.

So I went to look for a technical solution. There are a few well known technical solutions for this problem. A search of Google for blocking direct linking or blocking hotlinking will turn them all up. The most useful solutions include:

  • Rename the direct linked images
    This mean updating all posts one your site to match the new name. But if you only have a few images and/or posts to them you can do this on a per direct link basis.
  • Randomly generate image file names that change over time
    This is usually used for photo galleries where there is no text referring to each image.
  • Serve images through a script
    This script would reject requests for images based on information in the request. This can be a compute intensive approach since it causes requests even from your own site to go through the script. For sites where you don't have control over the webserver this may be required.
  • Use a Rewrite rule to serve a different image to non-local referers
    This is the technique I used.

 

Based on this altlab.com article I originally added these rules to my .htaccess file on my server:

RewriteEngine on
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://(www\.)?agilitynerd\.com/.*$ [NC]
RewriteRule .*\.(jpg|jpeg|gif|png|bmp)$ /images/nodirectlink.g [L,NC]

I then created an image called nodirectlink.g shown below.

 

Redirected Image

Don't use the same filename suffix as one of the real image filenames you use or you'll loop the rewrite engine.

I had forgotten about images direct linked by [[RSS]] feed readers that access the root. Rather than rewrite those requests I moved my Rewrite rules into the .htaccess file in the images directory. I also decided to not send the image after all, I'll just fail the request. There is no sense in even wasting the bandwidth, the clients will now get the broken image icon from their browser. The official Apache URL Rewriting Guide describes this in the Blocked Inline-Images section. So here is my final solution:

RewriteEngine on
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://(www\.)?agilitynerd\.com/.*$ [NC]
RewriteRule .*\.(jpg|jpeg|gif|png|bmp)$ - [F]

I took this opportunity to modify some of my very first articles and move their images into the /images directory. Those images were being served by the [[Blosxom]] binary plugin back when I thought it was a good idea. Now I won't pay any extra processing cost for those images.

 

Conclusion

So now I have a technical solution to a human problem. There is a chance that this change may cause some viewers of this site to not see images on this site. But hopefully that should be a very, very small number of people. But if you think you are getting my blocking image incorrectly Please email me: steve at agilitynerd.com.

I'm still disappointed I was forced to resort to this change.

 

Filed under  //   apache   sys admin  

Comments [0]

Changes to the AgilityNerd Website

Even though you haven't seen much activity in the past couple weeks on my blog there has been a lot of activity "behind the scenes". I'm looking to make some changes this year and am curious how my readers might feel about them. It is kind of a long story but I hope you'll bear with me because I like to be open about my reasoning.

Performance

I launched this blog in August of 2004 with my current web hosting service HostMagix because it was a low cost choice (still only $40 US per year). The servers are located in Asia so the responsiveness to my predominantly U.S. readers isn't too fast. But when I only had a few dozen readers it was acceptable.

As I've added more content to my blog my reader ship has grown to a respectable 20,000 page views a month ([[wbcaptcha now that comment spammers are gone]]). But with growth has come problems. I've heard occasional complaints about slow web page loads and web page time outs. HostMagix also hosts my email for this and other domains and I've had problems with email bounces and not receiving email. However, when ever I've needed help they have been pretty responsive (email only).

Monitoring

So I have been monitoring the response time of my server through a 30 day trial period at pingdom.com and here is the total page load time for a test page (without images) for 8 worldwide located servers since the beginning of the year:

The over two second load times and occasional outages (not shown above) are troublesome. So this confirms my fears that I'm getting what I pay for; a low cost shared hosting service. My contract with HostMagix expires in a couple months so these results have convinced me to look for a U.S server with higher performance specifications.

 

Web Content

There are hints that the recent purchase of YouTube by Google may mean adding commercials to personal videos or to the player that embeds in the html page. So I'm envisioning moving my video files either to a new service or, more likely, back to my server and using a third party player. So that will increase my bandwidth needs.

I'm also writing a plug-in for my blog software to add links to articles related to each article to make it easier to locate other items of interest and that will require additional computation when pages are delivered.

Operating Costs

By going to a more performant server with higher bandwidth and disk space allowances I'll be able to serve pages much faster, host a lot more video, and offer more features. Of course you don't get something for nothing so my website operating costs will probably be between $120 and $250 a year.

I started this blog as a way to share what I know about dog training and help disseminate the ideas of some of the smart trainers I am fortunate enough to know and train with. So this website has never been about making money. Like so many other agility enthusiasts I like to dream about ways to have my hobby pay for itself; but this blog will never be that. With that in mind I am looking for ways that I can supplement some of the costs of running the site rather than "make money".

As far as I have been able to figure out there are really five models for making some money ethically through a website:

  • Donations
  • Subscription Services
  • Affiliate Programs
  • Sponsorship
  • Ads

Donations are one model I could use; appeal directly to my readers to contribute occasionally to help offset my hosting costs. But it is a little too much like begging for me.

 

A number of readers have commented that I could offer a subscription service where I release articles to subscribers sometime before they are published to the website. But for me to be happy with that model I'd have to be posting high quality content on a regular basis and my taking of an occasional hiatus wouldn't be right in my mind.

The affiliate model came to mind when I wrote my Clean Run Magazine Search. It turns out Clean Run has an affiliate program where referrers get a percentage of any sales directed to the Clean Run store. I realized when a magazine search resulted in someone wanting to buy a back issue I could get a percentage of their purchase. I contacted Monica at Clean Run and this might come to fruition when they launch their new web site. I'll have to learn how the mechanics of their program works.

My concern with affiliate programs is that they might be viewed by my readers as biasing my viewpoint on products sold through the store(s) I would be affiliated with. I don't even want a hint of such a bias. So, if it works out, the Clean Run affiliate program would be limited only to magazine purchases (I love the magazine) and any other Clean Run products that I actually have used and would recommend.

Sponsorship is another possibility but would have an even larger issue with perceived bias than an affiliate program. I would also have to actually find a sponsor and a significant size image ad would probably be required.

The last funding approach is to host ads and raise money through click through ads and ad referrals. The most straight forward and visually unobtrusive source for adds is Google AdSense. These are the simple text link adds that adorn more and more blogs and websites. While I don't like the idea of ads on my blog I think I could position them so that they would be unobtrusive but still be useful to raise the couple cents each click would generate.

Right now I'm leaning toward the Clean Run affiliate program and Google Ads to raise a little income to offset the new hosting fees. The search is still on for a new hosting service that meets my needs.

So in any event a better and faster AgilityNerd website will be coming your way later this year. I look forward to your comments and emails on one or more of these ideas.

Filed under  //   sys admin  

Comments [0]

Backup Your Data Lately?

A few weeks ago I bought a Ximeta NetDisk 120 GB external hard drive to back up the data on my home computers. There are a number of vendors making hard drives that support USB connections; this model is unique in that it also supports direct ethernet connections. Unlike more expensive Network Attached Storage devices (more than $ 1000) this unit only cost a little more than the hard drive itself; about $ 150. The only downside is that it uses it's own proprietary network protocol which requires installation of a driver on any computers using the drive.

My goal was to put this drive on my network switch and back up data from my XP, WinME, RedHat 8.0, and Win95 machines. It turns out this was a little trickier than I expected. So I spent the better part of the morning on a cool, grey Chicago day making this all work.

The disk comes formatted for NTFS but in order for it to be shared on the older Windows platforms and my Linux machine it needs to be reformatted to use a FAT32 file system. Windows XP doesn't support formatting drives for FAT32 so I had to install the Ximeta driver software on my WinME machine and install the NetDisk on my network.

Running fdisk and reformatting the hard drive is the only "scary" aspect of the installation. Choosing the wrong drive or partition would be a bad thing. This document gives a good step by step description.

I was skeptical that running fdisk over the network would work correctly, but it did. At this point I was able to view the drive on both my WinME and XP systems and copy data to the drive as if it was locally connected.

I was pretty sure making the drive work for Linux would be difficult. Unfortunately, the PDF documents from the Ximeta website are unreadable as they require installing the Korean Acrobat extensions... thankfully Google has its "View has HTML" facility which let me read the RedHat instructions. The docs on the install CDROM are viewable (but don't include the RedHat docs).

I'll spare you all the trial and error but after downloading the driver RPM from the website and installing it I couldn't configure and connect to the drive on the network. It could be that ports required for their protocol aren't opened on my Linux machine, but Ximeta doesn't give any information on what ports are used by their driver. The admin tool gives some cryptic error messages that Googling and the docs didn't explain (the docs recommend reinstalling the drivers for any errors...). I ended up connecting the drive directly via USB and was able to mount the drive and backup my user and system accounts to the disk.

So it looks like my goal of leaving the drive on the network and copying to it from any computer will only work for Windows machines. But at least I have a mechanism for backing up all my machines, that is easy enough that I'll use it all the time. My next step is looking into configuring rsync or a similar mechanism to only backup the changed files to the NetDisk.

In summary, I'd recommend this drive for anyone who is using Windows XP; it is plug and play for that operating system. If you are computer savvy you can make this hard drive play with other systems too.

However you do it, backup your computer!

Filed under  //   sys admin  

Comments [0]