How to prevent a DDoS attack (or a Brute-force attack)

Поділитися
Вставка
  • Опубліковано 11 гру 2024

КОМЕНТАРІ • 56

  • @DTUSEM
    @DTUSEM 2 роки тому +4

    Suggestion - Sir make your channel a single point for nodejs backend content. Your explanation is easy to understand and simple.

  • @ramiworkstation
    @ramiworkstation 4 місяці тому

    Your lessons are as sweet as sugar. I learned a lot from you. Thank you 🌹

  • @Rovinux
    @Rovinux 10 місяців тому

    Great content king! Also worth mentioning the limit is per-ip-address

  • @shahreazneeloy2119
    @shahreazneeloy2119 Рік тому

    Thank you for this type of awesome content. Please make a detail video on rate-limit-flexible

  • @pranavwani
    @pranavwani Рік тому +1

    Thanks Man!

  • @sandeep.s9598
    @sandeep.s9598 2 місяці тому

    I failed my interview today because of this, thanks for a explanation

  • @ArtOfFun
    @ArtOfFun 3 роки тому +3

    Useful. Thank you!

  • @san2sansan
    @san2sansan 2 роки тому +1

    Great Tutorial. Waiting for more videos

  • @NilooGang
    @NilooGang Рік тому +1

    Great info

  • @brunodepaula5293
    @brunodepaula5293 8 місяців тому

    Nice content...just a very important point. This express rare limit library by default uses an in memory store to save the requests and control it.
    A very common use case is to put the api in aws lambdas or any other type of cloud function. This infrastructure is stateless..so the in memory store will not work.
    The nice thing is that the lib is already prepared to work with many external stores like mongo, redis....
    So the infrastructure would be a little bit more complex in real life.. that would be great to have a video after 3 years showing how to implemeny this part!! 😂
    Thanks

  • @markbarlescu1853
    @markbarlescu1853 2 роки тому

    Great content!

  • @ericf.3334
    @ericf.3334 3 роки тому +1

    Too great 👍👍👍

  • @hitmusic6978
    @hitmusic6978 2 роки тому

    Thank You

  • @webdeveloper2795
    @webdeveloper2795 2 роки тому +1

    Good video but Server is replying for each time even after 5 request within 5 sec.
    So resources of Server is utilised lot.
    Is there any way, we can just block the attack without Server resource Utilised like WAF or Firewalls.
    Any way good video

  • @technoinfoworldwide2329
    @technoinfoworldwide2329 2 роки тому

    for 10 req in login, i have applied 60*60*1000 ms, but the user can login after 4-5 minute why?

  • @rishijain2386
    @rishijain2386 3 роки тому +1

    Great Tutorial. This restriction is based on per IP. Any suggestions to block requests from particular geographic location?

    • @mafiacodes
      @mafiacodes  3 роки тому +3

      Use nginx plugin to black by geolocation

  • @itechinnovations2200
    @itechinnovations2200 10 місяців тому

    Hello brother i am an engineering students and undergoing a internship and my role is full stack developer my problem statement is as follows
    DESCRIPTION
    The Distributed Denial of Service (DDoS) attack is an attack poses a server threat
    to the internet. It is difficult to find the exact sign of attacking. Moreover, it occurs
    when a huge number of users occasionally access the target at the same time.
    Using the entropy computing you should find the accuracy of an attack.
    TASK
    Write a program using entropy computing to detect DDOS attack.
    Steps:
    1.Create a algorithm for sending data packets to the server.
    2.Find Accuracy.
    plz help me what processes should i follow plz help 🙏🙏

  • @showbikshowmma3520
    @showbikshowmma3520 3 роки тому

    can we use this for a dynamic website?? as professional we we need to change something to prevent DDOS attack

  • @arunaditya2655
    @arunaditya2655 4 роки тому +2

    sir, I have a confusion
    I think this time limiter can limit the actual user
    for example, if I set 5 requests in 5 seconds then if attacker requested 5 times then all the 5 requests will end and then when actual user request then they will get
    request limit over
    sir is there a way to limit the specific user request ???
    for example, one user can only request 2 times in 5 second
    I think it will solve the problem
    if that method exists then please make a video on that

    • @mafiacodes
      @mafiacodes  4 роки тому +1

      Bro it is per client, everyone has their kitty of 5 requests

    • @DeepakJangra-up8ek
      @DeepakJangra-up8ek 4 роки тому +1

      @@mafiacodes Same doubt! You should pin this comment. Also how does it identify the client to restrict that specific client, like cookies or something like that in request headers?

    • @mafiacodes
      @mafiacodes  4 роки тому

      Using the clients IP

  • @c.mohanrajcs396
    @c.mohanrajcs396 4 роки тому +1

    Hi completely enjoyed it and I have one doubt. Prevent from brute force we can lock the user for 3 invalid password attempts right?

    • @mafiacodes
      @mafiacodes  4 роки тому +1

      Yes u can specify the route also - like 3 attempts and then block for n number of hours

  • @ythigaurav
    @ythigaurav 3 місяці тому

    buddy recently i explore your channel , you have uploaded quality content please resume video uploading , I have seen it's been 1 year nothing new uploaded. till then I'll be watching your old videos.

  • @nawzhinit2744
    @nawzhinit2744 2 роки тому

    thank you for your video ... but i have a question this limit request for each user that request or for all users that request to the server ?

    • @mafiacodes
      @mafiacodes  2 роки тому

      Per user based on IP address

  • @DafleSantos
    @DafleSantos 3 роки тому

    What is your vs code theme and font?

    • @mafiacodes
      @mafiacodes  3 роки тому +1

      Snazzy operator and font operator mono

  • @drexler6013
    @drexler6013 2 роки тому

    Sir I m getting error when I use fork

  • @damiangilz
    @damiangilz 4 роки тому +1

    There are so many ways to rate limit an app... one can do it also by configuring it in nginx at a lower level. But now that you touch this subject, and as it seems you know a lot, maybe a good idea would be to develop a gateway.

    • @damiangilz
      @damiangilz 4 роки тому

      Also in your start script is enough to just write"nodemon", and node will fill in the blank with the "main" property.

  • @prabhavrajeev9682
    @prabhavrajeev9682 3 роки тому

    Can u share what zsh theme Ur using

    • @mafiacodes
      @mafiacodes  3 роки тому +1

      Oh my zsh Robby Russel with space ship prompt

  • @raza-abbas37
    @raza-abbas37 8 місяців тому

    How to prevent ddos attack? Because the IP will be different

  • @jivanmainali1742
    @jivanmainali1742 4 роки тому +1

    So it's only for dos attack

  • @developer_hadi
    @developer_hadi Рік тому

    The hacker maybe using bots, thousands of bots, how are we going to avoid that?

  • @farhansadiqmahi1397
    @farhansadiqmahi1397 3 роки тому

    3:55

  • @jivanmainali1742
    @jivanmainali1742 4 роки тому

    So how this method will prevent a brute force attack

    • @mafiacodes
      @mafiacodes  4 роки тому +1

      Explained in video itself

    • @jivanmainali1742
      @jivanmainali1742 4 роки тому

      @@mafiacodesuser could still make request after some time. So doesn't work much unless you restrict for long hours

  • @gledianlalushllari9577
    @gledianlalushllari9577 3 роки тому

    This seems to be useless. What if the attacker sends requests using a loop?

  • @dennisgonzales9521
    @dennisgonzales9521 4 роки тому +1

    Cool

  • @kaganakgul9484
    @kaganakgul9484 3 роки тому

    Doksandört 94 . Yüzyirmibir 121 yüzaltmısdokuz 169 Yüzseksendört 184 ızmırdeyım vurda görek

  • @aviwhitewolf
    @aviwhitewolf 4 роки тому

    Is there any way, to use the rate limiter in socket.io ?

    • @mafiacodes
      @mafiacodes  4 роки тому

      U have to implement ur own logic

    • @aviwhitewolf
      @aviwhitewolf 4 роки тому

      @@mafiacodes any suggestions?

  • @SultanKhan-wu8nu
    @SultanKhan-wu8nu 2 місяці тому

    This is not a free course you stole this and now you are using it in your channel. @andrew

  • @EhSUN37
    @EhSUN37 2 роки тому

    lol I guess sending back a json response for each request saying that "you are doing too much" is less expensive. what a useless video

  • @abhishekbhavsar1950
    @abhishekbhavsar1950 2 роки тому

    showing me this error
    /node_modules/express-rate-limit/dist/index.cjs:51
    const totalHits = (this.hits[key] ?? 0) + 1;
    ^
    SyntaxError: Unexpected token ?
    at Module._compile (internal/modules/cjs/loader.js:723:23)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
    at Module.load (internal/modules/cjs/loader.js:653:32)
    can anyone help me with this problem