Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


problem with Akismet and cloudflare
New on LowEndTalk? Please Register and read our Community Rules.

All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.

problem with Akismet and cloudflare

I have been testing my wordpress site with cloudflare, everything is working fine, except Akismet gives me all spammers's IP = 127.0.0.1 :( i guess its because of cloudflare. Is there anyway to make Akismet give me real spammers's IP while using cloudflare?

Comments

  • cool thanks @INIZ i didn't know about cloudflare plugin for wordpress, Im using w3 total cache, there is an option for cloudflare but i could not enable it (connection problem since i have iptables and i dont know what port it uses).

    Anyway, just installed the cloudflare plugin, it seems does not have anything to config right? just install and let it be?

  • never mind, i found plugins.php?page=cloudflare the setting page for cloudflare plugin

  • update: as of today after installed cloudflare plugin for wordpress configed w/ api and email address, i still got spams with 127.0.0.1 ips :( and legit comments with 127.0.0.1 ips :( any help?

  • HC_RoHC_Ro Member
    edited February 2014

    Are you sure you have the plugin active?

    https://support.cloudflare.com/hc/en-us/articles/200170846-Does-CloudFlare-have-a-WordPress-plugin-

    I think you should be seeing CloudFlare IPs not local as the source though.

    Are you using any other setup than Apache, such as nginx/varnish?

  • I believe it's the same right ? http://wordpress.org/plugins/cloudflare/

  • bdtechbdtech Member
    edited February 2014

    Install the anti spam plugin then clear W3 cache. Probably coming in through xmlrpc

    http://wordpress.org/plugins/anti-spam/

  • You're probably forgetting about a local caching/proxy tool like nginx, varnish, etc

  • I would want to use Akismet instead of others spam plugins

  • I have varnish but I flush its cache all the time

  • tchentchen Member
    edited February 2014

    @namhuy said:
    I have varnish but I flush its cache all the time

    http://brandonwamboldt.ca/nginx-varnish-and-optional-cloudflare-real-ips-1417/

    edit: better article for getting nginx to use cf-connecting-ip
    http://www.danielmiessler.com/blog/getting-real-ip-addresses-using-cloudflare-nginx-and-varnish

  • i have apache with varnish, i can't find any article how to config varnish w/ apache to show real ip while with cloudflare. i stopped varnish service for now and only running apache w/ cloudflare, let see if i can see real ip or not

  • after running apache by itself w/ cloudflare, it shows real ip now. is there any benefit running varnish and using cloudflare at the same time?

  • cloudflare won't cache the actual webpage response (unless the backend is unreachable), just the static files. That said, out-of-the-box varnish doesn't cache wordpress pages either unless you drop the cookies.

    If you want to stick varnish back in, you'll have to edit the cloudflare plugin. Where you see

    $cf_ip_ranges = array("204.93.240.0/24", "204.93.177.0/24" ....

    Add in "127.0.0.1/32"

    That'll let it copy the HTTP_CF_CONNECTING_IP back into REMOTE_ADDR as it normally does when coming in direct from cloudflare servers.

  • alright, thanks alot @tchen, i will try to add "127.0.0.1/32" to cloudflare plugin. btw, before with varnish + cloudflare, while doing load test, respond time was about 1-3 seconds, now only with cloudflare, respond time was about 4-5 seconds.

    But! if its only apache + varnish, if i do load test my vps will crash (super high cpu) and no mysql connection. while i found this result is quite different from what i have experience http://www.synaxisworks.com/blog/technology/site-performance-comparison-apache-varnish-cloudflare

    what is the best setup then?

  • I personally run CF -> apache -> varnish -> apache (worker or event) -> php-fpm. CF isn't that important in the stack in the grand scheme of things if you have apache tuned properly. Sub nginx if you want.

  • I'm suck @ nginx, I found nginx is hard to config compare to apache, I believe I only played with nginx a few times then gave up. I have been tuning my setup lately, trying to find out which fits best for me and better load. My web site crashed a few time under heavy load, when I use cloudflare there is virtually no CPU or ram increase, which I like, but somehow I feel my website load faster without it.

  • bdtechbdtech Member
    edited February 2014

    @namhuy said:
    I would want to use Akismet instead of others spam plugins

    The WP anti-spam plugin mentioned will eliminate the need for and false positives of Askimet

  • tchentchen Member
    edited February 2014

    @namhuy said:
    when I use cloudflare there is virtually no CPU or ram increase, which I like, but somehow I feel my website load faster without it.

    It typically does. That first trip to the http goes through CF, then proxies back to your server. There's no getting around the fact that for that core page request, it's going to add additional latency. Hitting refresh will always seem slower since you've already cached all static files locally at the browser - the only thing it needs is that page (again).

    When you benchmark without Cloudflare, you're asking Apache to also serve the static files in addition to the page request. Without proper tuning, Apache prefork will buckle under an aggressive benchmark test.

    edit: fixing lack of proofreading

Sign In or Register to comment.