Mailbag: Questions.. Just.. Questions..

Allaina Abraham from www.enewbiez.com sent me some questions that I thought I would share with everyone. Some of these questions are aimed at “real bloggers” or internet marketers (of which I am neither), but I do generate a substantial income online so my answers/opinions must be worth something.. to someone.. maybe..

Why and when did you get into blogging?
I’m not really much “into” blogging. I tend to only make a blog-post when I come across something that I think may help other new webmasters learn from my mistakes or if I think something may be interesting or helpful. That said, I started blogging in 2006 solely as a way to get some deep-links from Blogger.com to my main website GrownUpGeek.com. After a year or so I moved from Blogger to my own server & domain and actually started treating the blog as a blog.

How did you first start promoting your blog?
I don’t really promote my blog (i’m getting the idea that you don’t actually read my blog much!) However, I did start promoting my website as soon as I had enough content on it to make it valuable to anyone. I did everything from dropping links in forums (with helpful posts, not ‘spamming’), to calling in a national radio-show. More recently, things like tattooing GrownUpGeek.com on people has generated quite a bit of buzz.

Is blogging your full –time job?
Now i’m sure that you don’t read my blog as you would have noticed the lack of advertising and very low volume of posts. But with regards to my website – it is not my full-time job. I have a “day job” and limit most of my website work to the evenings. I have been very tempted to quit the day job though, particularly a year or two ago when the website generated upwards of $90K. Looking back now, I’m glad that I didn’t quit because almost overnight income dropped by over 50% for the following year. Even though earnings are back up, I have learned that the internet is far too volatile (for my taste) to trust as my sole income.

Traveling around the world and experiencing different types of cultures must be great. When do you ever get the time to blog?
Yah.. That would be great, but I wouldn’t know anything about it.

What e books did you read that you think will be beneficial for a newbie to internet marketing?
I don’t think I read any eBooks when I first started, and I certainly would NOT recommend that anyone spend a dime on eBooks! Anyone can learn everything they need by joining/reading webmaster-related forums like DigitalPoint and Webmaster World. There are also a few quality, free eBooks out there!

Finally, what sound advice would you give to anyone wanting to start their own niche blog?
I always recommend that new bloggers stick with a niche that they know and love and not try to chase the high-paying keywords. I’ve seen 100 or more bloggers start up “mesothelioma” blogs, or other blogs they know nothing about only to be disappointed with the results, banned from Adsense, etc. Stick with what you know, and don’t be afraid of failure.

Is The “Smells Like Facebook” Theme Legal?

Mal contacted me with a question about the legality of the Smells Like Facebook WordPress theme that I’m currently using.  It’s an interesting question so I thought I’d post it here in the blog.

Just had a read of your e-book and am most impressed. I found you through your contributions on wordpress.org re: the Smells Like Facebook theme.

I don’t know who to ask about this so am turning to you but how legal is the theme? By that, I mean, is it an infringement of copyright in terms of design, look and feel? I understand that the theme would use none of the Facebook intellectual property that is its source code but could it be argued in a court of law that it is a blatant ripoff and infringes copyright?

Also, the question is whether Facebook would bother hunting down all those who have downloaded it over 20,000 times now?

Would appreciate your thoughts.

Hmm.. Yes Mal, very interesting question.  I’ll be the first to admit that everything I know about the law I have learned by watching re-runs of South Park, but I think you might be on to something.  I suppose that if Facebook were to be inclined to do so, they probably could send their team of highly paid lawyers after the theme author or WordPress.org and request/force them to stop distributing the theme.  Facebook would probably also have legal grounds to track down all users of the theme and send cease and desist letters to every blogger using it.

But the question is, WOULD Facebook do this?  Just imagine all of the negative press that thousand of bloggers could stirr up if Facebook forced them all to stop using the theme – and it’s not like Facebook is losing money by bloggers using the theme.  So I guess my answer is, technically speaking it’s probably not 100% legal, but my guess is that Facebook does not care.  I’ll keep using the theme until either i get a cease & desist notice or I get bored with it.

Yet Another Interview

I just finished a quick interview for Kovich at runningonlinebusiness.com.  It’s a relatively new blog, so go check it out, and read my awesome interview ( dont worry, it’s quick and simple).

I enjoy doing interviews, especially if it helps a new blogger/webmaster.  If you would like to interview me for your site/blog, or would just like to ask me a question, let me know via my contact page.

How We Block Proxies, Bots, Scrapers, Trolls & Assholes

As a website owner, you probably have at least a few good reasons to block bots and scrapers.  Scrapers steal your content and unruly bots can do anything from eating your bandwidth to trying to hack into your site.

As a forum or community owner, you may also have reasons to block proxies.  Proxies are what gives many trolls, fakes, assholes, idiots, jerk-offs, and other pitiful people in general, their false bravado.   For some reason, these “tech experts” that have the elite skills to be able type the words “free proxy” into Google, or figure out how to install a TOR client, grow giant balls when they think you can’t track them down to their real IP address.  Give this kind of anonymity to these socially unbalanced people (that’s a nice way of saying losers in real life, or people that forget to take their meds) and they suddenly become “tough guys” with no fear to wreak havoc in your community.  BUT, take away their proxy, force them to log-in from home or work and they suddenly become able to follow the rules or more likely are too chicken to do or say anything and alas, they go away!  If they DO continue to insist on making themselves feel better (it’s sad, I know) by bullying or causing trouble in your online-community, then one report to their ISP (or, the FBI if they are REALLY going overboard) or employer will usually take care of it.  Imagine what mommy and daddy will do when their internet account gets terminated!  If they are adults (yes, sadly “adults” do pull this kind of shit), then they’ll have to deal with the hassle of getting a new ISP or deal with mommy and daddy if they live with their parents in the basement (a common trait of internet trolls).   If reporting them doesn’t help, you can ban their IP and have no worries that they’ll just come right back via a proxy.   Sure, since you can never block 100% of the proxies out there, they may still find a proxy that works, but as your proxy blocking skills grow, eventually it will become too much hassle for all but the most pitiful of trolls or assholes and they’ll give up and go get their kicks bothering some other community.

So here are a few updated tips for blocking bots, scrapers, and proxies (aka trolls and assholes).  Much of this is Drupal focused, but much can be applied to any website/blog/forum.

Start with the obvious:  The Drupal Troll Module.  The Drupal 5.x version of this module had been abandoned several months ago after a critical security flaw was discovered.  But after popular outcry it has been updated and is supported again.  The Troll module allows you to block IP address and re-direct them to a static HTML page, but it also allows you to search your member database by IP address or email address (very handy in some situations).  It supports wildcard searching (just leave the last octet of an IP address blank for example, and it will return all matches) so even tracking down assholes trolls using DHCP is easy.  The Troll module will also easily show you every IP address that a member has ever signed-in with (User|Troll Track) and the domain name.  A member using a legit IP will show a history from the same address or ISP, whereas someone using a proxy will show as coming from many different locations and domains.  After you’ve looked at a few IP histories, the proxies will stand-out like a sore thumb.  You can then block those IP’s using the Troll module or your IPTables firewall.

Next on the list is BadBehavior.  If you use Drupal, you need to install the Drupal BadBehavior module and the BadBehavior script.  If you use WordPress, you need only the script.   BadBehavior can also be modified to work with virtually any PHP based website/forum.  BadBehavior blocks almost all automated bots, scrapers, and spammers – and if used in combination with something like Akismet or Mollom, spam becomes almost a non-issue.  When put in “strict mode” BadBehavior blocks many (but not all) proxies, and is a great first-line of defense, but you can also use information from Bad Behavior with  CSF/IPTables firewall to locate Proxy/Server farms and block them en-masse.

Now for the big guns: The IPTables Firewall.  IPTables allows you to block individual IP address or CIDRs (entire ranges of IPs) from accessing your website/server but instead of simply re-directing blocked address to a static page at the domain-level like TROLL does, IPTables/CSF “drops” all the packets, leaving the troll/asshole/proxy user nothing but an “unable to connect” error.  IPTables is very powerful, and almost by definition that makes it difficult to use.  Because of that, I recommend using CSF Firewall which is almost a GUI for IPTables and also adds some great additional features.    To use IPTables/CSF you need either a VPS or dedicated server with root access.  If you are on a shared host and have asshole problems, you might have to put your big-boy pants on and move to a dedicated or VPS server.

Once you get CSF up and running (it’s really not that tough), do the obvious things like activating the Real Time Block Lists (RBLs) and use the CC_Deny setting to block entire countries that you don’t need hanging around your site (North Korea, China, Turkey, Russia, India come to mind).

After you’ve blocked all the undesirable countries with CC_Deny, you can move on to the CSF.DENY file which allows you to block IP’s and ranges of IP address in CIDR format.   The first thing you can do is import any IP addresses that you’ve already blocked with the TROLL module – then you can start building your proxy-blocking list.

In building your proxy-block list, you aren’t just blocking proxy servers, you really want to block all servers.  There is really no reason for any server other than Google bots, Yahoo, etc, to access your site so blocking any/all ‘server farms’ will protect you not only from assholes using proxies, but also from compromised servers trying to hack your site.  The best source I have found for building my block list (now blocking hundreds of thousands of IP’s and several million domains) is the Bad Behavior module (mentioned above).  By learning how/why Bad Behavior blocks IP’s you can identify servers and server farms and add them by the thousands to your CSF.DENY file.

What to look for in Bad Behavior:  Each time Bad Behavior blocks an IP it logs the IP address and the reason.  The following reasons often (not always, you have to be careful) mean that the originating IP belongs to a proxy or a server:

  • Header ‘Connection’ contains invalid values
  • Required header ‘Accept’ missing
  • Prohibited header ‘Proxy-Connection’ present
  • Header ‘Referer’ is corrupt

Get the IP address from Bad Behavior identified with one of the reasons above and do a quick WHOIS lookup on it.  I like to use http://whois.domaintools.com, but any WHOIS server will do.  Usually (not always) a server or proxy will show other sites listed, an SSL cert, etc.  For example, look at this WHOIS for 67.159.1.17 .  A WHOIS lookup for a regular home ISP connection, or a business won’t show much info at all, for example, look at this WHOIS for this Comcast home user.

So now you have your IP, in our example above, 67.159.1.17, but you dont want to block just that IP, you want to block every server in that entire IP range.  To do that, you add the CIDR to your CSF.DENY file in CSF.   The example server/proxy above has the following CIDR in it’s WHOIS info:

OrgName:    FDCservers.net
OrgID:      FDCSE
Address:    141 w jackson blvd.
Address:    suite #1135
City:       Chicago
StateProv:  IL
PostalCode: 60098
Country:    US
ReferralServer: rwhois://rwhois.fdcservers.net:4321
NetRange:   67.159.0.0 - 67.159.63.255
CIDR:       67.159.0.0/18   <--------------  This is the CIDR
NetName:    FDCSERVERS
NetHandle:  NET-67-159-0-0-1
Parent:     NET-67-0-0-0-0
NetType:    Direct Allocation
NameServer: NS3.FDCSERVERS.NET
NameServer: NS4.FDCSERVERS.NET

If you aren’t positive this is a server-farm you could visit the domain listed, in this case, FDCservers.net.  Their website clearly shows that they are a server hosting company.  You could also google the company name or even the IP to dig up more info.  Now that you are positive that you want to block this entire range or CIDR of 67.159.0.0/18, simply add it to your CSF.DENY.  Sometimes, usually with foreign servers, a CIDR won’t be listed.  In a case like that you can still block an entire range of IP’s by using a CIDR Calculator and entering the beginning IP address and the mask or range/number of IP’s to block.  I usually block an entire 16-bit range, which for the example above would be 67.159.0.0/16  instead of the CIDR above “/18″ which applies only to FDCServers, using “/16″ blocks everything that starts with 67.159.

When adding your IP’s or CIDR into CSF.DENY be sure to add “# do not delete” after each entry.  Otherwise, once you hit the limit of IP’s specified in your CSF configuration file, older entries will get overwritten with newer entries.

How to block TOR: The Onion Router or TOR is a network of proxies intended to protect the anonymity of internet users.   TOR is great for whistleblowers or government protesters, but not so great for website owners trying to keep assholes out of their community.  TOR is fairly easily blocked by adding the list of “TOR Exit nodes” into CSF.DENY or TROLL.  You can get an updated list of TOR exit nodes here: TOR Exit Node list.  TOR is dynamic and the list changes, so you’ll have to update it every few days or so.

How to block Port Proxies or SOCKS proxies: Port or SOCKS proxies are almost always blocked by Bad Behavior

Sometimes you may end up blocking legitimate users, particularity when blocking entire ranges of IP’s – it’s unavoidable.  When someone complains, confirm their IP address and just remove them from CSF.DENY or your TROLL list – no big deal.  I’ve been using these methods for over a year and I’ve only blocked 10 or so legitimate users (that i know of at least).

If you don’t have/can’t use IPTABLES/CSF, you can also use some of the techniques above to block IP’s and CIDRs in your .HTACCESS file, but I cannot vouch for how well it will perform when the list grows large – and to be effective it needs to be really, really large.

This has turned out to be one of my longest and mostest rambling posts.  If I’ve been unclear or if you have any questions, please post a comment.  And oh – if you’re reading this via a proxy, post a comment and tell me that my techniques don’t work!

Fix “Smells Like Facebook” theme URL Funkyness

I’ve been using this new “Smells Like Facebook” theme for a few days now, and one annoying problem that it has is munging-up the URL as you browse the site.  As you click around the site, the URLs get a “#” stuck in them, and if you ever click the “Home” link, all links you click after that have not only a stray “#”, but they also have your base-URL doubled-up.  For example, my URL looked like this after clicking around a few pages:

http://success.grownupgeek.com/#/index.php/2009/07/page/http://success.grownupgeek.com

The easy fix for this problem is to disable the “java and AJAX effects” in the theme settings.  The trouble with this though, is that it seems to break the ability for anyone to leave any comments!

After tinkering around a bit, I think I’ve fixed it up by adding two simple lines to SCRIPT.JS.  This will disable java/ajax for everything except the comment sections.

WARNING:: I am not a coder.  I do not know what I am doing.  Before you attempt the changes below, back up your files, your WordPress database, your Microsoft Word Documents and all the porn on your C: drive!  If you find that this ‘fix’ of mine breaks something else, please post a comment here.  I’ve been testing this fix for a few hours and as far as I can tell, it’s working – but I make no guarantees.

Find script.js located in wp-content\themes\smells-like-facebook

Find this section:
$(id + " a").not(".nextpost").not(".notajax").each(function() {
site = $("meta[name='home']").attr("content");
dashboard = $("meta[name='url']").attr("content") + "/wp-admin";
wplogin = $("meta[name='url']").attr("content") + "/wp-login.php";
if (
$(this).attr('href') != '#' && //it's not a '#' only link
$(this).attr('href').indexOf(site) == 0 && //it's an internal link
$(this).attr('href').indexOf(dashboard) == -1 && //it's not a link to dashboard
$(this).attr('href').indexOf(wplogin) == -1 //it's not a link to wp-login.php

Immediately AFTER the line that reads:

dashboard = $(“meta[name='url']“).attr(“content”) + “/wp-admin”;

add the following line:

thehome = $(“meta[name='url']“).attr(“content”)

Then, immediately AFTER the line that reads:

$(this).attr(‘href’).indexOf(site) == 0 && //it’s an internal link

Add the following line:

$(this).attr(‘href’).indexOf(thehome) == -1 &&

The new section should look like this:

$(id + " a").not(".nextpost").not(".notajax").each(function() {
site = $("meta[name='home']").attr("content");
dashboard = $("meta[name='url']").attr("content") + "/wp-admin";
thehome = $("meta[name='url']").attr("content");
wplogin = $("meta[name='url']").attr("content") + "/wp-login.php";
if (
$(this).attr('href') != '#' && //it's not a '#' only link
$(this).attr('href').indexOf(site) == 0 && //it's an internal link
$(this).attr('href').indexOf(thehome) == -1 &&
$(this).attr('href').indexOf(dashboard) == -1 && //it's not a link to dashboard
$(this).attr('href').indexOf(wplogin) == -1 //it's not a link to wp-login.php

Save the new script.js file back to your server, load up your blog, hit REFRESH or RELOAD to reload the JS, and see if it works any better.  If it does, or if it breaks something else, please leave a comment and let me know.  I know this isn’t the most elegant fix, but hey, it’ll do the job until the theme author comes up with a ‘real’ fix.

Applies to “Smells Like Facebook” Version 2.4