Skip to content

how to prevent DDoS attacks ?

Solved Vulnerability
34 2 13.5k 1
  • @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

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


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
  • 2 Votes
    94 Posts
    25k Views
    julian@community.nodebb.org
    @willi@social.tchncs.de a VPS can be had from DigitalOcean or Vultr quite economically (although I know that isn’t always the case in some countries) You can also use our referral link for an account credit too!
  • navigation menu panel on mobile

    Solved Customisation nodebb css
    8
    1
    7 Votes
    8 Posts
    3k Views
    phenomlab
    @crazycells hmm. That’s odd. I haven’t made any changes from recollection but I could be wrong. I’ll need to check. EDIT - very strange. I honestly don’t recall adding the below CSS block to alter the bottom bar, but you’re right… .bottombar-nav { padding: 0px !important; } I’ve removed this so it reflects stock Harmony.
  • 0 Votes
    4 Posts
    2k Views
    phenomlab
    @DownPW most of this really depends on your desired security model. In all cases with firewalls, less is always more, although it’s never as clear cut as that, and there are always bespoke ports you’ll need to open periodically. Heztner’s DDoS protection is superior, and I know they have invested a lot of time, effort, and money into making it extremely effective. However, if you consider that the largest ever DDoS attack hit Cloudflare at 71m rps (and they were able to deflect it), and each attack can last anywhere between 8-24 hours which really depends on how determined the attacker(s) is/are, you can never be fully prepared - nor can you trace it’s true origin. DDoS attacks by their nature (Distributed Denial of Service) are conducted by large numbers of devices whom have become part of a “bot army” - and in most cases, the owners of these devices are blissfully unaware that they have been attacked and are under command and control from a nefarious resource. Given that the attacks originate from multiple sources, this allows the real attacker to observe from a distance whilst concealing their own identity and origin in the process. If you consider the desired effect of DDoS, it is not an attempt to access ports that are typically closed, but to flood (and eventually overwhelm) the target (such as a website) with millions of requests per second in an attempt to force it offline. Victims of DDoS attacks are often financial services for example, with either extortion or financial gain being the primary objective - in other words, pay for the originator to stop the attack. It’s even possible to get DDoS as a service these days - with a credit card, a few clicks of a mouse and a target IP, you can have your own proxy campaign running in minutes which typically involves “booters” or “stressers” - see below for more https://heimdalsecurity.com/blog/ddos-as-a-service-attacks-what-are-they-and-how-do-they-work @DownPW said in Setting for high load and prevent DDoS (sysctl, iptables, crowdsec or other): in short if you have any advice to give to secure the best. It’s not just about DDos or firewalls. There are a number of vulnerabilities on all systems that if not patched, will expose that same system to exploit. One of my favourite online testers which does a lot more than most basic ones is below https://www.immuniweb.com/websec/ I’d start with the findings reported here and use that to branch outwards.
  • Podcast Share NodeBB

    Solved Configure podcast nodebb
    15
    4 Votes
    15 Posts
    5k Views
    phenomlab
    @cagatay You could experiment with nodebb-plugin-ns-embed but I expect the x-origin tag on the remote site to prevent playback.
  • NodeBB v3

    Announcements nodebb v3 nodebb
    2
    3 Votes
    2 Posts
    1k Views
    phenomlab
    @cagatay JS will work fine - no changes there, and there are no plans to drop support for jQuery. More of an issue is the CSS - for which there are quite a few breaking changes. Keep an eye on sudonix.dev (my development site) where you can see progress in relation to how I am tackling the compatibility issues.
  • Fontawesome 5

    Unsolved Customisation fonts css nodebb
    14
    1 Votes
    14 Posts
    6k Views
    phenomlab
    @pwsincd hi. Just following up on this thread (I know it’s old) but was curious to understand if it’s still an issue or not ?
  • NodeBB slow after DB recovery

    Solved Performance performance nodebb
    1
    5 Votes
    1 Posts
    967 Views
    No one has replied
  • creating topic specific widgets

    Solved Customisation nodebb
    16
    10 Votes
    16 Posts
    7k Views
    phenomlab
    @crazycells said in creating topic specific widgets: Additionally if hide class exists, why are we re-defining it? We’re not 🤭 I misspelled it - it should be hidden