Cloud WAF (formerly Incapsula) is deployed as a reverse proxy in front of your PHP application. This means that all traffic coming to your site through Cloud WAF will be seen as coming from one of Imperva IPs.
In order to make sure that your PHP application gets the correct user IP, we have created this PHP script. By including this script anywhere in your application it will make sure that any reference to the user IP will use the correct IP address.
What about ASP/.NET applications? What can i do in order to see correct user IP? Must i change settings to my IIS Server or exists any sample code for asp/.net webpages?
@coresec, we don’t have an Incapsula extension you can install yet. However, I opened a section with instructions for extracting the original client IP with ASP/.NET http://support.incapsula.com/entries/20375907-asp-net
Any chance of creating a vBulletin plugin for this?
I have briefly enabled and tested Incapsula on my vBulletin-based site, but I'm unable to use it permanently because of this IP issue.
Just to add to my above comment, if you do decide to create a plugin for vBulletin, please do create one for version 3.8.x, not just for the latest v4.
@Marvin, did you try applying our generic PHP solution (attached to the original post)?
Let me know if you need help doing that.
Eldad, the reason I posted my question was because, at the time, I was unable to locate the appropriate PHP file to add your code to. The next day I found out it was the vBulletin's class_core.php file. That did the trick beautifully.
Your readme file states that something needs to be added or edited on line 13, but I didn't edit anything, and it worked. It it necessary to edit there something?
@Marvin, thanks for the update. No need to change anything in “incapsula.php”.
If you can spare a couple of minutes it would be great if you post your solution for vBulletin in our Community Q&A forum ( http://support.incapsula.com/forums/223241-community-questions-answers). Which file needs editing, what line of code to insert and any other details you can share. I am sure other users would appreciate it.
Thanks!
Done! http://support.incapsula.com/entries/20438093-vbulletin-incapsula-easy-ip-solution
Thanks! Much appreciated.
Worked great in OxyClassifieds.
After uploading the incapsula.php file to ../public_html/include/
Edit OxyClassifieds /include/include.php file and in the 'if(!$minimal) {' section,
Add the following line:
require_once($config_abs_path.'/include/incapsula.php');
** incapsula.php** file not found, please reupload
How about my site? http://hy1p.com/
I can't get ip visitor after use incapsula
What about Mediawiki and PHPBB?
Er, sorry for the double-post, but I also need an Elgg plugin as well.
Hello. I'm a new user and I'm very happy with my choice. I have an eCommerce website built on Prestashop (php/mySQL).
And it is true, when I check stats of visitors I see only Incapsula IP's.
I needed just some hint, on where to include this script. Is it good and safe to include it in the header? Or footer? (If it should be included in other files it means that I should do it in hundreds of files).
I wrote a PunBB extension for this:
http://k0nsl.org/blog/punbb-incapsula-extension/
Best wishes,
-k0nsl
Worked great in osCommerce - my site: http://www.meoestore.com
uploading the incapsula.php file to ../public_html/includes/
Modify the application_top.php ( ../public_html/includes/application_top.php)
FIND:
require(DIR_WS_FUNCTIONS . 'compatibility.php');
ADD AFTER:
require_once(DIR_FS_CATALOG . 'includes/incapsula.php');
Did that script will work for PHPBB3?
Yes, if implemented correctly, it'll work.
Regards,
-k0nsl
How can I do? I don't how to integrate it and where.
Yoav1987,
Hold on a couple of minutes and I'll wrap it up for you.
Best wishes,
-k0nsl
Yoav1987,
Okay, done. Can you test this and report back:
https://github.com/k0nsl/phpbb3-incapsula-hook
Best wishes,
-k0nsl
Great! It seems to work fine.
Very good, Yoav1987. Have a good day!
Regards,
-k0nsl
Thank you for the help you give for the other webmasters :-)
I just tried to install the hook for phpbb and it loaded the actual hook info into the web page. So its not working. Is there a fix for this?
k0nsl are you still around? Really hoping to get that hook working.