That setup would basically make squid listen for connections on certain ips and will create outgoing connections ( for fetching the requested page ) from the same ip that received the connection. The setup, as described in my previous post involves creating one acl and specifying one tcp_outgoing_address for each ip you want to use. Now that's ok if you have just a few ips or even a full class (because you can create one acl to match the whole class ) , but what do you do if you have multiple classes and in each class non consecutive ips? And I'm talking about many such ips not just 10, but 100 or more...
The shell Magic
Well if you have already defined the ips on your interface(s) and you want to use all those ips in squid then you can use this simple shell script that will parse the output of ifconfig and output the acls and tcp_outgoing_address directives for each ip.
for i in $(ifconfig -a|grep "inet addr"|cut -f2 -d:|cut -f1 -d' '|grep -v 127.0.0.1) ; do
an=$(echo$i | tr . _) ;
echo"acl in_$an myip $i" ;
echo"tcp_outgoing_address $i in_$an" ;
Run this script on the server where you want to install squid and it will output the acls and directives needed for using all the ips ( except 127.0.0.1 ) . then just copy and paste them into squid.conf.
Now shell magic is nice but if you want to get your hands dirty you might want to look into patching squid to do the same thing. With the squid outoing ip patch you will not have to write any acl or tcp_ougoing_address for it, but of course you'll have to do the "get source - patch - compile" stuff .. which some may find harder and others more fun 🙂
There is a new version of this plugin. Please download it from the plugin page
After the first release of the Hidden affiliate Links plugin some bloggers wanted to know if this plugin would be able to automatically replace some keywords in posts and turn them into affiliate links.
John Chow bought a plugin for wordpress that does something like that from DealDotCom (yes it's an afiliate link and it was created automatically ) but I know it wouldn't be that hard to add such a functionality to my plugin. So here's the real deal they should put on DealDotCom:
Now my plugin will let you define keywords and it will replace those keywords (when you save/update a post) with a new link you can specify. And it will still work for adding such links manually as the first version does (just don't put anything into keywords or Link fields ) .
The keywords field is actually a field where you can specify a regular expression ( so make sure you escape special characters like - or . (dot ) by placing a \ ( backslash ) in front of them.
Let's say you write a post and you want this plugin to replace both the keywords/phrases DealDotCom and "Deal Dot Com" then the content of the keywords column should look like DealDotCom|Deal Dot Com . The "Match slug" field can be go/dealdotcom and the "New link" should be something like "/go/dealdotcom" or "http://patchlog.com/go/dealdotcom" ( without the quotes ) - this is what it looks like on your blog.
If you have already installed version 0.1 you will have to deactivate from wp-admin -> Plugins and delete the table wp_hal_links then just install the new plugin like any other plugin.
Because the plugin allows you to specify regular expression for the " Match Slug" field you will have to escape some special characters like . (dot ) , _ , - and / by placing a backslash in front of them . I could make the plugin so that this will not be necessary but that would make it lose the great flexibility that regular expression matching can offer.
make it configurable so that the user can chose to match case sensitive or insensitive keywords and link slugs. At the moment the match is case sensitive but some users may not like that. It would also be nice to be able to specify this for each link.
give the user the option to replace the keywords at runtime (every time the post is rendered). This has the advantage that the keywords on all posts will be replaced ( not just the ones you update after you install the plugin ) but has the disadvantage that it can slow down your blog
Anything else you would like ? feed free to let me know in the comments...
I just went to check my blogRush account and after login I was presented with a nice looking dashboard showing the number credits I have earned, the number of members I have referred, and how many credits I got from them. It shows how many of those credits were consumed and they even have a nice graph with those numbers.
It's good to see they finally got their statistics working. The reports section still looks looks like under construction.
It would be good if they would also show the number of visitors you got from the widget.
At first I thought I should post some screen shots but you would get a better idea by just logging in to your account.
Oh what is that ? you don't have an account ? Get one now! and drive some traffic to your blog.
Update: They do show the number of visitors you gor from the widget. I just missed it when I look the first time.
There is a new version of this plugin. Please download it from the plugin page
This post is about a wordpress plugin that will help you to manage your hidden affiliate links a lot easier then what others have suggested.
If you don't know why you should hide the affiliate links then continue reading, but if you already know this then skip to the plugin part of the post.
One of the best monetization methods for blogs is using affiliate programs.Money making blogs don't get their income from a single source like adsense, they also use affiliate links for a lot of services like Text Link Ads and other products.
Why hide your affiliate links?
Many bloggers think it's good to hide the affiliate links, not because they don't want their visitors to know they are affiliated but because of other reasons like:
Changing your affiliate links is a lot less work because you have to change in just one place then on hundreds of pages where you use those links
It hides the ugly part of affiliate codes. People tend to not trust long links with a lot of characters and unknown codes. A nicely formated and clean link is more likely to be clicked then one that contains an affiliate code in it.
It kind of forces them to click the link instead of just typing the link (without your affiliate code ) in the browser.
better SEO, the links don't look like affiliate links, the redirect is done from a html page that has noindex on it so search engines shouldn't look at it.
Methods to hide Affiliate links
There are a lot of methods to do this like:
writing a .htaccess rule
doing a http redirect from a script. Setting the HTTP location header to the destination url.
doing a redirect from the meta of a html page
Those methods are not hard to use but they do involve write a small piece of code and require this for each affiliate link. I will not show you in details any of those methods because there's a better, easier way to do this.
My Method to hide affiliate links
I wrote a plugin for wordpress that will let you define such redirects from a nice (AJAXy ) web interface inside your wordpress admin.
The plugin installs just like any other wordpress plugin and once installed you can start defining your affiliate link without having to write any code.
The script was tested on wordpress 2.2.3, so it you use any other version and it doesn't work let me know about and problems and I'll try to write a fix. If you use a previous version you should really upgrade to the latest version of wordpress. Copy hidden-affiliate-links.zip and unzip or copy hidden-affiliate-links folder in wp-content/plugins then go to wp-admin -> Plugins and activate the Hidden Affiliate Links plugin
Using the plugin
After you activate the plugin you can go to wp-admin -> Manage -> Hidden Affiliate Links and add/edit/delete hidden affiliate links. For each link you have to define a slug, a destination link/code and a description.
The "slug" is what the link looks like on your blog, the link/code is the part where the visitor will be redirected and the description is something to remind you what's this link about, but it's also used in the title of the page that's doing the redirect ( in case the redirect does not succeed ).
For example if the slug is go/tla and the link/code is my affiliate link for Text Link Ads http://tinyurl.com/2kasce then if you write a post on your blog and you use a link like http://patchlog.com/go/tla in your post, anyone that clicks that link will be redirected to http://tinyurl.com/2kasce
In case the redirect does no succeed for some reason then you will see a page with the affiliate link in it and the title of the page will be the one specified in the description for the link. You can also customize that page by modifying: redirect_link.php
The script is very easy to use but if you want some power and you have some knowledge of writing regular expressions then here's how you can use it. The slug part can be any regex, and anything that will match that regular expression will be redirected to the real affiliate link.
I got an email early in the morning ( 8:28 GMT+2 ) from John Reese, founder of BlogRush . The message was sent to all blogrush members and it explains some of the problems with the system and it also tries to explain other things like why there are no reports yet ( under development ) , why filters don't work and some other stuff.
I am sending you this urgent message to give you a special news
"update" about several things happening with BlogRush.
Firstly, I want to sincerely thank you for joining BlogRush and for
your interest in our service. Please know that our primary focus is
to continually improve the service to help you generate more targeted
The first 60 hours since we launched the BlogRush public beta has been
nothing short of EXPLOSIVE. We knew that we were developing an
exciting tool that many bloggers could benefit from, but we had no
idea how fast the 'word' would spread across the Web.
With this explosive growth has come some challenges, and our entire
team is working very hard to solve any potential bug and issue that
we've been alerted to. We're improving things at a very rapid pace
and we hope to have the entire network completely stabilized very
I would like to ask that you are patient with us during this time and
know that we are doing our best to help YOU drive more traffic to your
blog and we will soon have things running smoothly.
I would like to address some of the questions and concerns that we
1. "When Will My Dashboard Statistics Be Available?"
We encountered some minor issues with the batch processing of our
first cycle of member statistics (it's a lot of data to crunch) and we
just about have it fixed. We hope to have your statistics up and
running very soon as we know they are very important to you. We just
need a little bit more time. Please know that we're working as fast
as we can and the moment we can start displaying them you will see
them. (Thanks in advance for your patience.)
2. "I Don't Understand The Syndication Credit System Formula"
In our video we mentioned that you earn a 1:1 ratio of syndication
credits on your own traffic, and any direct referral's traffic (such
as "Bob" in the example video) and any direct referral's referral
traffic (yes, that sounds confusing!) such as "Jen" in our example.
We also mentioned that you'd also earn credits based on activity
through 10 generation levels. Here's the breakdown of our formula:
Your Traffic = 1:1
1st Generation Of Referrals (Directly From You) = 1:1
2nd Generation Of Referrals (i.e. Jen in the video) = 1:1
3rd - 6th Generation Of Referrals = 1:4
7th - 10th Generation Of Referrals = 1:8
1:1 means you earn 1 syndication credit for every 1 impression of the
widget by your own traffic or by any users located on the 1st (direct)
or 2nd generations.
1:4 means you earn 1 syndication credit for every 4 impressions of the
widget by any user located on the 3rd to 6th generations.
1:8 means you earn 1 syndication credit for every 8 impressions of the
widget by any user located on the 7th to 10th generations.
When all of this math is added up, it leaves 1 headline space
available out of every 10 that are served. This means that BlogRush
uses 10% of the headline spots (5 headlines in each widget load) to
monetize the service. We currently have plans to sell these extra
credits to any user that would like to purchase additional credits --
this is one of the ways we will pay for the service.
3. "What happened To The FAQ?"
We were trying to wait until we received more feedback from our users
(actual questions). We'll be posting the FAQ very soon - many of the
biggest concerns are being addressed in this message.
4. "I Didn't See Any Help Section Tutorials"
It took us longer than expected to have the tutorials ready. You can
view them now and see step-by-step how to install the BlogRush code on
the following: WordPress, MovableType, TypePad, Blogger. They are
available in the "Help" section that is accessible from the "Help"
link at the bottom of our web site when not logged in, or the "Help"
tab when you're logged in.
5. "I Keep Seeing The Same Blogs Appear In The Widget"
While we've been busy optimizing our network, we were using some
public RSS feeds to balance out activity so no widget would have any
empty space. This will soon be completely replaced with our member
feeds full-time; our member feeds were only being distributed part of
the time as we were optimizing things.
6. "Some Of The Blog Titles I've Seen In The Widget Don't Appear Relevant"
This will continue to improve as we work to optimize the network.
7. "I Noticed A Blog Was Using Two Widgets On The Same Page, Is This Allowed?"
No. You can only have ONE widget per page. If you made a blog post
about BlogRush and used the widget inside that post as an example, you
will need to immediately remove it and replace it with a static
screenshot of the widget. If it is not removed, we will have no
choice but to terminate any account that fails to do so.
8. "How Will BlogRush Stop People From Abusing The Network?"
We are putting many things in place (in addition to what we already
have.) We are also in the process of activating a full "Review"
process for all member blogs; using some automation and HUMAN REVIEW.
Please know that BlogRush will do everything necessary to stop all
fraud and abuse of our system. We have no choice but to protect the
integrity of our network.
BONUS CREDITS ON THE WAY!
We have decided to take our entire surplus of syndication credits and
give them to YOU the user. We will be randomly distributing all extra
credits amongst our entire network for awhile to reward our early
Many of you have asked for a copy of our video to post on your own
blog. We are working on this and hope to have it for you -- it will
be a version without the "click on the button below" ending since it
will be on your blog.
A sincere THANK YOU for your support of BlogRush and for your patience
and understanding. Please know that we are in this for the LONG-TERM
and this isn't just some FAD for generating a short burst of traffic.
We will be continuously improving BlogRush for a very long time to
It seems they underestimated the buzz generated and they were hoping they would have time to fix them. It's good to know they are aware of the problems and are working to fix them. I see the system has a great potential if those problems get fixed and some other features will be added.
Immediate problems that need to be fixed:
I think it is very important that the widget would contain only highly targeted/relevant posts. The filter system didn't seem to be working when I first installed the widget on my blog and the posts seemed like spam mostly but today they seem to look more like blog posts.
The filter section in your blogrush account doesn't let you add a single keyword, you have to add a coma or a space after it.
It would be nice if the filter system would also allow you to specify which keywords to allow instead of just keywords to block. For example on my blog I would like to show only posts about Linux, Unix, web development and other related to open source software . It's hard to do this if I can only block keywords.
Another one would be to create something like communities ( like mybloglog ) or a way for you to add friends and have the option to display only feeds from your friends or community.
Dosh dosh can't recommend it for lack of more data ( no stats about the traffic yet ) but says it deserves experimentation and he installed it on the blog, he also says that because of the referral system the early adopters will benefit more from this, so why be amoung the early adopters and sign up for it.
John Reese also promised to give bonus credits to early adopters ( see his email message above ) so there will be a lot more traffic for those that sign up now.
Darren Rowse of problogger thinks it has potential to help bloggers find new traffic and wrote a post with some tips using blogRush to generate more traffic. What's interesting is that Darren has not installed it on his blog but he has a widget somehow similar to this with links ( and small snapshots ) of other blogs in the b5media network ( see my suggested feature about communities and friends ).
There's a new service out there that aims to get bloggers more traffic. The service is BlogRush and the concept is that you get traffic by displaying your posts in a widget on other blogs in your category.
Basically you just install a widget on your site where you display feeds from other blogs in your category and for each page view you get a credits for displaying your own posts in the widget on other similar blogs.
Exponential traffic growth from referrals
Now here's the nice part, you also get credits for the members you refer to BlogRush and for the members they refer and so on. There are 10 levels of referrals so you can see how this could make your traffic explode.
Watch this video for more details: Are you convinced ?
Everything looks so good, in the video... so I went to sign up and I posted the widget in my sidebar. The signup process is really easy, but then when I looked at the widget I see a lot of content that is unrelated to my blog content. A lot of apple, iphone, ringtones and other stuff that have nothing to do with what I write about. So I remembered that you can add filters, great ... only that they don't work or maybe I just don't know how to use them. It should be as simple as adding the keywords you want to bock and I did but they just don't work.
Another problem is that the help section on the site doesn't really explain how to add filters or anything else. It just contains a few videos about how to set this up on wordpress and some other blogging platforms.
No reports, yeah they are under development.
The idea is great but I think they rushed to release it 🙂 . I'll leave this up in my sidebar for a few days to see if I get other feeds in there or if I get some traffic from this and maybe they'll solve some of those problems.
The first thing I did when I started this blog was to look for plugins to give wordpress more functionality and then I started writing posts.
I'm still looking for cool plugins and sometimes write my owns and from time to time I still write on the blog ( not as much as I would like to because I don't have the time ).
Since January when I started the blog I have written 73 posts ( this one included ), an average of about 2 posts per week. Many of this blog's visitors (more then 50% ) come from search engines, looking for a solution to some problem they have, others come from blogs that have linked to me or where I have commented . The blog gets about 100 visits/day. That's not much comparing to other blogs that get thousands but I thought some of those visitors might want to know who I am so I thought I should write something about that on my "About page"
I didn't put anything on that page when I started the blog , I just left the default text that came with wordpress. Many high profile bloggers say it is important for people to know you ( this is a blog after all, and the blog should have something to do with it's author ) and an "about page" is a good way to start.
I didn't think that it was that important because at the beginning I didn't think the blog will have many visitors and I'm not even sure it's purpose was to get visitors or that they would want to know who writes the blog.
Anyway, now it's there so you can take a look if you are interested, there's not much about me, but I will be updating it with more details when I (or you the reader ) think it is necessary.
What do you think about it ? Do you have an "about me" page ?
This post describes the configuration of Sendmail to use SMTP-AUTH when connecting to a remote MTA to send messages. Such a configuration would be needed in case you have a dynamic ip and your ISP relays the messages for you, but they require authentication. This is not a post about how to set your mta to authenticate users and to relay for them. This will show you how to set it to authenticate itself to other mta that will relay messages for you.
Sendmail comes installed by default on a clean FreeBSD 6.2 system, but is has no support for SMTP authentication using SASL by default, so it needs to be recompiled.
Install Cyrus SASL
You can compile cyrus-sasl2 lib from ports (if you need to set some special options ) or install it as a package:
Or just install it from packages with:
pkg_add -r cyrus-sasl2
First you need to make sure you set the compile flags so that Sendmail uses cyrus-sasl2:
" >> /etc/make.conf
and then just recompile it and install:
Make sure you have the right mc files. Go to /etc/mail and type: make all install . This will create a .mc file named [your_hostname].mc . Edit that file, look for a line like “define(`SMART_HOST', `your.isp.....” and replace your.isp with the host that will relay messages for you. After that line add the following lines:
Note: In case your ISP's MTA does not accept connections on port 25, but another port you can tell sendmail to connect on that port by using something like the following line:
define(`RELAY_MAILER_ARGS', `IPC $h 587')dnl
where 587 is the port where your ips accepts connections for smtp relay.
Now you have to regenerate the .cf file. Type make all install in /etc/mail and you should have everything set in sendmail.cf . All that's left to do is to create the file that will hold the information about the username and password to use when authenticating to your ISP's MTA : /etc/mail/auth/client-info :
This document describes the steps required to install squid proxy server from http://squid-cache.org and webmin from http://webmin.com on a debian 4.0 system as well as basic steps required to configure squid to listen on multiple ip addresses and use them as outgoing source address for connections. This will also show you how to configure squid from webmin to accept connections only from predefined clients based on the client's ip address.
For the steps presented below root access over ssh on the server or physical ( console ) access will be required.
Installing squid on a debian system is straight forward. The administrator must be logged in as root and just type: apt-get install squid. This will install squid along with all required dependencies (it may ask for the user permission to install, in that case just approve ).
download the webmin .deb package from http://webmin.com/download.html and upload it on your server, then type: dpkg -i webmin_1.xyz.deb where xyz is the current webmin version. This will look for required dependencies and will let you know if something is missing. In case anything is missing you can just install it using apt-get install command simiar to how you installed squid.
If wedmin and squid were both installed from the standard debian package then webmin should already know where squid configuration files are and be able to modify it and stop/start squid. If this is not the case then you can set the paths in the module's configuration section.
Squid Anonymous configuration
Set http_port to specify the port and ips where squid will listen for incoming connections. If you want squid to listen on any of the available ips just set it like this: http_port 3128
Make squid anonymous by specifying which headers it should allow/deny. For highly anonymous proxies here is the suggested configuration: header_access Allow allow all header_access Authorization allow all header_access WWW-Authenticate allow all header_access Proxy-Authorization allow all header_access Proxy-Authenticate allow all header_access Cache-Control allow all header_access Content-Encoding allow all header_access Content-Length allow all header_access Content-Type allow all header_access Date allow all header_access Expires allow all header_access Host allow all header_access If-Modified-Since allow all header_access Last-Modified allow all header_access Location allow all header_access Pragma allow all header_access Accept allow all header_access Accept-Charset allow all header_access Accept-Encoding allow all header_access Accept-Language allow all header_access Content-Language allow all header_access Mime-Version allow all header_access Retry-After allow all header_access Title allow all header_access Connection allow all header_access Proxy-Connection allow all header_access Cookie allow all header_access Set-Cookie allow all header_access All deny all
Some may want to remove the lines that contain Cookie and Set-Cookie headers but if you do that most sites will not work anymore cause most require cookie / session support.
Squid multiple ip configuration
We want connections that come from one ip to go out on the same ip. First set acls to identify the ips where squid listens for incoming connections. Let's say we have 3 ips : 10.0.0.1 , 10.0.1.1 and 10.0.2.1 . The acls would look like this: acl in_10_0_0_1 myip 10.0.0.1/32 acl in_10_0_1_1 myip 10.0.1.1/32 acl in_10_0_2_1 myip 10.0.2.1/32
Now you can set up tcp_outgoing address using the above acls:
You will have to set up acls similar to the above but they identify the client's ip ( not proxy server's ip). The the acls will be used in the http_access directive. This can be done directly from the configuration file.
Here is a sample that shows how to allow access for a client with the ip 10.0.0.10 : acl cli_10_0_0_10 src 10.0.0.0.10 http_access allow cli_10_0_0_10 Just put those two lines in squid.conf before the “http_access deny All” line.
You can also add an ACL from webmin -> Servers -> Squid Proxy Server -> Access Control ->> Edit Acl . The acl type has to be “Client address” . You just have to set a name and a “From address” ( the address you want to allow access to squid ) for it and then save it. After you set the ACL you have to go to "Add proxy restriction" , set the Action on “Allow” , select your acl from the "Match ACLs" box and click save. After the save you should be redirected on the main acls page where you should see your acl in the “Proxy restrictions” list, right at the bottom. You will have to make sure your acl goes before the “Deny all” entry or else it will have no effect. You can put it one row up by clicking the “Up” arrow.
Now you can Start/Restart squid from command line /etc/init.d/squid start/restart or from webmin -> squid proxy server You can test your squid configuration by setting any of the available ips as a HTTP proxy in your browser ( port 3128 ) and then go to http://spotip.com . That site should show you the exact ip you have set up as proxy in your browser.