Skip to content

how to prevent DDoS attacks ?

Solved Vulnerability
34 2 13.5k 1
  • wrote on last edited by
    #1

    hi @phenomlab , recently we are getting a lot of DDoS attacks.

    We have nginx rate limits and fail2ban set up as security tools…

    https://www.nginx.com/blog/rate-limiting-nginx/

    Since cloudflare is not working properly with NodeBB due to connection problems, we are looking for other solutions to help with these attacks…

    During all these attacks for several hours forum gives “503 excessive load” error page…

  • hi @phenomlab , recently we are getting a lot of DDoS attacks.

    We have nginx rate limits and fail2ban set up as security tools…

    https://www.nginx.com/blog/rate-limiting-nginx/

    Since cloudflare is not working properly with NodeBB due to connection problems, we are looking for other solutions to help with these attacks…

    During all these attacks for several hours forum gives “503 excessive load” error page…

    wrote on last edited by
    #2

    @crazycells have you approached your ISP (the VPS provider) to ask them if they have any mechanisms in place? There are a variety of methods you can deploy to prevent, or at the very least, slow down the attack such as blocking the country of origin.

  • @crazycells have you approached your ISP (the VPS provider) to ask them if they have any mechanisms in place? There are a variety of methods you can deploy to prevent, or at the very least, slow down the attack such as blocking the country of origin.

    wrote on last edited by
    #3

    @phenomlab we use digital ocean, and I have checked their website before, they do not have this service, and they recommend cloudflare for this purpose.

  • @phenomlab we use digital ocean, and I have checked their website before, they do not have this service, and they recommend cloudflare for this purpose.

    wrote on last edited by
    #4

    @crazycells Ok, but do they have a firewall that you can leverage? Depending on if this exists, and how advanced it is, we can use this to drop most of the unwanted traffic at the root.

  • @crazycells Ok, but do they have a firewall that you can leverage? Depending on if this exists, and how advanced it is, we can use this to drop most of the unwanted traffic at the root.

    wrote on last edited by
    #5

    @phenomlab they have firewall but we have to input individual rules, there is no country block.

    Additionally, we use UFW and we only allow https.

  • @phenomlab they have firewall but we have to input individual rules, there is no country block.

    Additionally, we use UFW and we only allow https.

    wrote on last edited by phenomlab
    #6
  • wrote on last edited by
    #7

    @phenomlab yes, we were checking here yesterday, but we have seen comments about disabled ufw after doing this… so, we have skipped it…

    additionally, we see 4-5 countries on the list… and I think the attackers are stubborn people, so the list might become longer after these settings.

  • @phenomlab they have firewall but we have to input individual rules, there is no country block.

    Additionally, we use UFW and we only allow https.

    wrote on last edited by
    #8

    @crazycells In addition, if you are using Virtualmin, you can leverage Fail2Ban which is a lot more powerful.

  • @crazycells In addition, if you are using Virtualmin, you can leverage Fail2Ban which is a lot more powerful.

    wrote on last edited by
    #9

    @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

  • @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


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
  • Please help me, I can't install nodebb

    Locked Solved Customisation nodebb
    7
    5 Votes
    7 Posts
    2k Views
    phenomlab
    Installation completed, verified, and tested. Correct installation methodology is below https://docs.nodebb.org/installing/os/ubuntu/
  • TNG + Nodebb

    General tng genealogy nodebb plugin
    4
    0 Votes
    4 Posts
    2k Views
    phenomlab
    @Madchatthew said in TNG + Nodebb: you have to try and use duck tape and super glue to change something to make it do what you want it to do I couldn’t have put that better myself.
  • Composer options on nodebb

    Solved Configure nodebb
    8
    1
    3 Votes
    8 Posts
    3k Views
    phenomlab
    @Panda You should be able to expose the CSS for these using F12 to get into console [image: 3591518c-e3a3-4ada-a43c-6b32a5e0359c-image.png] [image: a2b8ed46-4157-4ff2-85f0-576543380107-image.png] That should then expose the element once selected [image: 89d9c545-a47a-40d1-98f4-80cf3b958e8f-image.png] Here’s the below CSS you need based on the screenshot provided. .composer .formatting-bar .formatting-group li[data-format="picture-o"], .composer .formatting-bar .formatting-group li[data-format="spoiler"] { display: none; }
  • Want to use Sudonix themes ?

    Chitchat themes nodebb
    80
    1
    34 Votes
    80 Posts
    30k Views
    cagatay
    omg thank you Mark.
  • NodeBB: Favicon upload issue

    Solved Configure nodebb favicon
    12
    1
    3 Votes
    12 Posts
    4k Views
    mventures
    @phenomlab I am on a Mac, so I used the “Option + Command + I”, and then performed the steps. It loaded my favicon! I checked on Firefox which I haven’t used before, and it showed my favicon also! That’s fantastic and thank you for the help!
  • [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 - Created pages not found?

    General
    20
    3 Votes
    20 Posts
    6k Views
    phenomlab
    @jac Exactly. Hard point to argue.
  • unable to upvote on forum

    Solved Performance
    10
    1
    3 Votes
    10 Posts
    4k Views
    Hari
    @phenomlab yes, i can understand. it is working now