Skip to content

how to prevent DDoS attacks ?

Solved Vulnerability
34 2 13.5k 1
  • @phenomlab yes, we do have fail2ban set up already, sorry I wrote in the first post, but I did not write the usual way 😄 Fail2Ban

    wrote on last edited by phenomlab
    #10

    @crazycells There is also a way to do this with fail2ban using

    https://blog.reinhard.codes/2023/04/02/restricting-access-to-ssh-using-fail2ban-and-geoip/

    Obviously, you substitute port 22 (SSH) for port 443 (HTTPS)

  • @crazycells There is also a way to do this with fail2ban using

    https://blog.reinhard.codes/2023/04/02/restricting-access-to-ssh-using-fail2ban-and-geoip/

    Obviously, you substitute port 22 (SSH) for port 443 (HTTPS)

    wrote on last edited by
    #11

    @phenomlab can I ask your values of these settings?

    Screen%20Shot%202023-11-15%20at%2018.38.00.jpeg

  • @phenomlab can I ask your values of these settings?

    Screen%20Shot%202023-11-15%20at%2018.38.00.jpeg

    wrote on last edited by
    #12

    @crazycells I’d leave those as they are and handle this much further upstream (at NGINX or OS level)

  • @crazycells I’d leave those as they are and handle this much further upstream (at NGINX or OS level)

    wrote on last edited by
    #13

    @phenomlab we already have those settings changed before, so it might help if I know the default values… 😊 I guess you have them unchanged? Can I learn those default values?

  • @phenomlab we already have those settings changed before, so it might help if I know the default values… 😊 I guess you have them unchanged? Can I learn those default values?

    wrote on last edited by
    #14

    @crazycells Of course - see below

    81935872-9237-4794-8f01-b5c0a32c7c3b-image.png

  • wrote on last edited by
    #15

    maybe we should switch to aws, it has a shield for ddos protection…

    https://aws.amazon.com/shield/ddos-attack-protection/

    which provider do you think is best against ddos attacks?

  • maybe we should switch to aws, it has a shield for ddos protection…

    https://aws.amazon.com/shield/ddos-attack-protection/

    which provider do you think is best against ddos attacks?

    wrote on last edited by phenomlab
    #16

    @crazycells Hetzner also has excellent DDoS protection, a stateful firewall, and I have a referral link meaning you get credits for free… 🙂

    EDIT: Much of this really depends on where you want your server placed. Hetzner are based in Germany, Helsinki, and now the US 🙂

    https://www.hetzner.com/cloud

  • @crazycells Hetzner also has excellent DDoS protection, a stateful firewall, and I have a referral link meaning you get credits for free… 🙂

    EDIT: Much of this really depends on where you want your server placed. Hetzner are based in Germany, Helsinki, and now the US 🙂

    https://www.hetzner.com/cloud

    wrote on last edited by
    #17

    @phenomlab sure, please send me your link. we were considering aws quite some time, but I will send your link to our developer as well, so he can make decision.

    in general, we were trying to stay away from europe or european products due to strict laws and requirements. our user base is either from the US or from Turkey, so we prefer to decrease the amount of work we do 😄

  • @crazycells Hetzner also has excellent DDoS protection, a stateful firewall, and I have a referral link meaning you get credits for free… 🙂

    EDIT: Much of this really depends on where you want your server placed. Hetzner are based in Germany, Helsinki, and now the US 🙂

    https://www.hetzner.com/cloud

    wrote on last edited by
    #18

    @phenomlab oh I see a link there now, but I believe that is not referral link?

  • @phenomlab sure, please send me your link. we were considering aws quite some time, but I will send your link to our developer as well, so he can make decision.

    in general, we were trying to stay away from europe or european products due to strict laws and requirements. our user base is either from the US or from Turkey, so we prefer to decrease the amount of work we do 😄

    wrote on last edited by phenomlab
    #19

    @crazycells You’d be better placed with Hetzner in the US I think. AWS can get VERY expensive very quickly. My referral link for Hetzner is below.

    I personally use Hetzner and also have a “storage box” with 1Tb of storage for backups located in another datacentre for recovery purposes.

    https://hetzner.cloud/?ref=b2bBQLHF3mEV

  • wrote on last edited by
    #20

    This might also be useful…

    image.png

  • This might also be useful…

    image.png

    wrote on last edited by
    #21

    @phenomlab on a side note, is there any easy way to implement a rule… to allow only two geolocation (countries) but block the access from the rest of the countries?

  • @phenomlab on a side note, is there any easy way to implement a rule… to allow only two geolocation (countries) but block the access from the rest of the countries?

    wrote on last edited by
    #22

    @crazycells yes, but without Cloudflare you’d need to perform more checks to determine traffic origin before you have make a decision as to block or permit.

  • @crazycells yes, but without Cloudflare you’d need to perform more checks to determine traffic origin before you have make a decision as to block or permit.

    wrote on last edited by
    #23

    @phenomlab yes, we are planning to install Cloudflare again…

    We will go with “Pro” version and see how it works, I guess this should help not to have any session errors… Previously, we got many connection problems because of Cloudflare…

  • @phenomlab yes, we are planning to install Cloudflare again…

    We will go with “Pro” version and see how it works, I guess this should help not to have any session errors… Previously, we got many connection problems because of Cloudflare…

    wrote on last edited by
    #24

    @crazycells I wouldn’t be so sure. The pro version of Cloudflare is $20 per month but I don’t think that will resolve the connectivity issues.

    There also the harm that CF causes to SEO if you use their bot fight mode as I mention here

    https://sudonix.org/topic/503/cloudflare-bot-fight-mode-and-google-search

  • @crazycells I wouldn’t be so sure. The pro version of Cloudflare is $20 per month but I don’t think that will resolve the connectivity issues.

    There also the harm that CF causes to SEO if you use their bot fight mode as I mention here

    https://sudonix.org/topic/503/cloudflare-bot-fight-mode-and-google-search

    wrote on last edited by
    #25

    @phenomlab I have a good news. We set up CloudFlare Pro, and did not have connection problems yet.

    As you said, it costs $20/month if you subscribe annually, but we did monthly ($25) since we were not sure if this will work for us. So far everything looks OK. We will also check “Google Search” problem you mentioned as well after we secure our forum. Thanks a lot for this warning!

    Unfortunately, we had no choice about Cloudflare since we were getting more than 1 billion connection request from bots and forum was unusable for several hours two consecutive days…

    Screen Shot 2023-11-15 at 16.49.45.png

    Screen Shot 2023-11-18 at 13.22.28.png

    Screen Shot 2023-11-18 at 13.24.55.png

  • @phenomlab I have a good news. We set up CloudFlare Pro, and did not have connection problems yet.

    As you said, it costs $20/month if you subscribe annually, but we did monthly ($25) since we were not sure if this will work for us. So far everything looks OK. We will also check “Google Search” problem you mentioned as well after we secure our forum. Thanks a lot for this warning!

    Unfortunately, we had no choice about Cloudflare since we were getting more than 1 billion connection request from bots and forum was unusable for several hours two consecutive days…

    Screen Shot 2023-11-15 at 16.49.45.png

    Screen Shot 2023-11-18 at 13.22.28.png

    Screen Shot 2023-11-18 at 13.24.55.png

    wrote on last edited by
    #26

    @crazycells well, of course 1 billion+ requests happened after we installed CF, I do not know how many more we had before installing CF…

  • @phenomlab I have a good news. We set up CloudFlare Pro, and did not have connection problems yet.

    As you said, it costs $20/month if you subscribe annually, but we did monthly ($25) since we were not sure if this will work for us. So far everything looks OK. We will also check “Google Search” problem you mentioned as well after we secure our forum. Thanks a lot for this warning!

    Unfortunately, we had no choice about Cloudflare since we were getting more than 1 billion connection request from bots and forum was unusable for several hours two consecutive days…

    Screen Shot 2023-11-15 at 16.49.45.png

    Screen Shot 2023-11-18 at 13.22.28.png

    Screen Shot 2023-11-18 at 13.24.55.png

    wrote on last edited by
    #27

    @crazycells Good news in the short term, but interested to see if this does impact the SEO of your forum. Do you have Bot Fight Mode enabled in CF?

  • @crazycells Good news in the short term, but interested to see if this does impact the SEO of your forum. Do you have Bot Fight Mode enabled in CF?

    wrote on last edited by crazycells
    #28

    @phenomlab I actually do not know yet, because I have not found these settings on the CF yet…

    Can you please show me how I reach those?

    Screen Shot 2023-11-21 at 16.27.14.png

    and this is the bot page:

    Screen Shot 2023-11-21 at 16.29.47.png

  • @phenomlab I actually do not know yet, because I have not found these settings on the CF yet…

    Can you please show me how I reach those?

    Screen Shot 2023-11-21 at 16.27.14.png

    and this is the bot page:

    Screen Shot 2023-11-21 at 16.29.47.png

    wrote on last edited by
    #29

    @crazycells see the link located at the top right of that screenshot 😂


Did this solution help you?
Did you find the suggested solution useful? Support 💗 Sudonix with a coffee ☕
If your organisation needs deeper expertise around infrastructure, security, or technology leadership, learn more about Phenomlab Ltd. Many of the deeper technical guides behind Sudonix are published there.

Related Topics
  • how to hide "moved" badge with CSS?

    Solved Customisation nodebb
    12
    1
    3 Votes
    12 Posts
    4k Views
    phenomlab
    @crazycells ah, I see. That makes sense.
  • SEO and Nodebb

    Performance nodebb seo
    2
    2 Votes
    2 Posts
    2k Views
    phenomlab
    @Panda It’s the best it’s ever been to be honest. I’ve used a myriad of systems in the past - most notably, WordPress, and then Flarum (which for SEO, was absolutely dire - they never even had SEO out of the box, and relied on a third party extension to do it), and NodeBB easily fares the best - see below example https://www.google.com/search?q=site%3Asudonix.org&oq=site%3Asudonix.org&aqs=chrome..69i57j69i60j69i58j69i60l2.9039j0j3&sourceid=chrome&ie=UTF-8#ip=1 However, this was not without significant effort on my part once I’d migrated from COM to ORG - see below posts https://community.nodebb.org/topic/17286/google-crawl-error-after-site-migration/17?_=1688461250365 And also https://support.google.com/webmasters/thread/221027803?hl=en&msgid=221464164 It was painful to say the least - as it turns out, there was an issue in NodeBB core that prevented spiders from getting to content, which as far as I understand, is now fixed. SEO in itself is a dark art - a black box that nobody really fully understands, and it’s essentially going to boil down to one thing - “content”. Google’s algorithm for indexing has also changed dramatically over the years. They only now crawl content that has value, so if it believes that your site has nothing to offer, it will simply skip it.
  • NODEBB: Nginx error performance & High CPU

    Solved Performance performance nodebb nginx
    69
    4
    14 Votes
    69 Posts
    63k Views
    DownPW
    @phenomlab Seems to be better with some scaling fix for redis on redis.conf. I haven’t seen the message yet since the changes I made # I increase it to the value of /proc/sys/net/core/somaxconn tcp-backlog 4096 # I'm uncommenting because it can slow down Redis. Uncommented by default !!!!!!!!!!!!!!!!!!! #save 900 1 #save 300 10 #save 60 10000 If you have other Redis optimizations. I take all your advice https://severalnines.com/blog/performance-tuning-redis/
  • Custom badges

    Solved Customisation nodebb
    103
    2
    49 Votes
    103 Posts
    60k Views
    DownPW
    Perfect
  • NodeBB 1.19.3

    Solved Performance nodebb 1.19.3 performance
    33
    4 Votes
    33 Posts
    16k Views
    DownPW
    @phenomlab I find the problem Mark The error message indicated this path : http://localhost:4567/assets/plugins/nodebb-plugin-emoji/emoji/styles.css?v=6983dobg16u I change the path url on config.json [image: 47bacc80-f141-41e4-a261-3f8d650cc6f6-image.png] And all it’s good Weird, I didn’t have to change that path before 1.19.3 But this does not prevent the problem from a clean install with Emoji Plugin EDIT: After test, that resolv the problem installation for 1.18.x but not for 1.19.x (I have other error message when I run ./nodebb Setup For resume: NodeJS 16_x with 1.18.x is ok
  • [NODEBB] Wallpapers BUG on Firefox Mobile ?

    Solved Customisation nodebb wallpaper firefox mobile
    9
    1
    0 Votes
    9 Posts
    3k Views
    phenomlab
    @downpw I’m inclined to agree with this. There isn’t much else you can do, and provided it works with no odd looking artefacts in other browsers, then ok. The :before and :after are pseudo classes and very well supported across all browsers (except perhaps Internet Exploder, but who uses that these days ?)
  • NodeBB Footer

    Solved Customisation footer nodebb
    10
    1 Votes
    10 Posts
    4k Views
    JAC
    @phenomlab said in NodeBB Footer: @jac and you. Hope all is well and you recover quickly Thanks pal
  • Nodebb Hashtag plugin

    Solved General
    15
    1 Votes
    15 Posts
    6k Views
    phenomlab
    @jac Great ! I’ll close this off.