We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 14557
    • 48 Posts
    Since implementing Jot (to replace UserComments) I’ve started getting nasty spam comments on the site with inappropriate content. They all seem to come from 1 IP address.

    Is there a way of blocking bad IP addresses, or making comments automatically unpublished if from that IP address?

    John
      • 11975
      • 2,542 Posts
      You should give a try to this plugin

      http://modxcms.com/forums/index.php/topic,6945.new.html


      :-)
        Made with MODx : [url=http://www.copadel.com]copadel, fruits et l
        • 28042 ☆ A M B ☆
        • 24,524 Posts
        You can also use your .htaccess file to block given IP addresses. This is a good article, and can be applied to any IP address you don’t want in your site.

        http://diveintomark.org/archives/2003/02/26/how_to_block_spambots_ban_spybots_and_tell_unwanted_robots_to_go_to_hell
          Studying MODX in the desert - http://sottwell.com
          Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
          Join the Slack Community - http://modx.org
          • 14557
          • 48 Posts
          Thanks Guys, I’ll try htaccess tonight as it sounds like there are a lot of things we ought to try to block!

          John
            • 28042 ☆ A M B ☆
            • 24,524 Posts
            That article is very old, so I wouldn’t get overly excited over the stuff he was blocking. I referred to the article because it is one of the clearest explanations I’ve come across of how to block stuff in the .htaccess file.
              Studying MODX in the desert - http://sottwell.com
              Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
              Join the Slack Community - http://modx.org
              • 14557
              • 48 Posts
              Ok, I’ve blocked the IP address using .htaccess, and this morning there is another similar comment, obviously from the same person/agent, but with a completely different IP address!
              Has anyone any experience of this sort of problem? Could the person/agent posting the comments be able to simulate different IP address, so any attempt to block using this method would be in vain? Or should I just continue building up my list of badwords and deleting comments?
              I’m trying to run a charitable, family oriented website so I really can’t have these offensive comments on the site - if I don’t resolve this soon I think we will have to switch to use moderation on all comments. Any help would be most appreciated.

              John
                • 33987 ☆ A M B ☆
                • 197 Posts
                You could add a new var to jot &badIP=`{{badips}}` and edit jot for a bit to just block those using an ip address from the chunk with $_SERVER[’REMOTE_ADDR’] if im correct.
                  Sterc Internet & Marketing | MODX Founding Partner | Chairman of the MODX Advisory Board

                  In need of a MODX consult? Try our MODX Developers Experts!
                  • 7923
                  • 4,213 Posts
                  You can’t use Captcha?


                    "He can have a lollipop any time he wants to. That's what it means to be a programmer."
                    • 14557
                    • 48 Posts
                    Its something to consider, but the site is aimed at supporting families with special needs children, so its really important that its as easy to use and accessible as possible. I’m not sure Captcha works very well for non-technical users or people with accessibility difficulties?

                    Good news is having extended my list of bad words and adding the 2nd IP address to htaccess we haven’t received any spam comments. Thanks for all your help.

                    John
                      • 14557
                      • 48 Posts
                      The offensive spam comments have now stopped. I’m now getting loads of spam from some annoying guy trying to promote xbox links. I guess Captcha it will have to be then...