Install rpaf module on centos or debian

→ Are you a new visitor? Please visit the page guidance for new visitors ←

Install rpaf module on centos or debian

What exactly is rpaf? This is acronym for “reverse proxy add forward”, meaning it is used together with a reverse proxy server so that the origin server can see correctly the visitors IP address. Now this is not limited to only reverse proxy, I’ve been using this with popular CDN’s like Cloudflare and Incapsula where they are kind enough to send the http header for the real IP address of the visitor. In this article I’m going to show you how you can install the rpaf module on centos or debian operating system and also how you can use it with CDN network.

First and foremost, we need to install the rpaf module, unfortunately there is no repo I know of that we can use for this, but its not that hard to manually compile the module either. In fact is really easy.

Install dependencies for compiling the apache module

You do need to know that for you to be able to compile apache modules, you are require to have installed httpd-devel for CentOS or apache2-dev for debian.

We need these so that we can use apxs to compile the code.

Downloading and compiling the rpaf module

Next we run the following commands to download the module from the original website and extract the tar.gz archive:

And lastly we only need to compile it:

 Configuring the rpaf module

A bit of explanation, although I left comments, the RPAFproxy_ips directive will collect the RPAFheader specified later on from those IP addresses and use that information from the RPAFheader value as the original IP address of the visitor. In this case, the reverse proxy IP addresses are, normally you replace these with your reverse proxy IP address.

That’s it for now, if you have questions or something I forgot, please comment below.

Request an article ←