There is a range of IP address that keeps attacking my server. I have configured IIS to deny connection, but I want to deny the connection and don't even let it reach my server.

I tried to configure it through network security group under Inbound security rules but it doesn't seem to be working

rules: Rules

  • Can you show us the Inbound rule in your NSG?
    – joeqwerty
    Aug 23, 2016 at 15:33
  • I edited the question and included a copy of the rules
    – Bruno
    Aug 23, 2016 at 15:43

2 Answers 2


You didn't show the priority for the rules in your NSG but I'm assuming that your http rule was created first and therefore has a lower priority than your DOS rules. Lower priority rules have precedence over higher priority rules and once the inbound traffic matches a rule (your http Any/Any rule) then no further rules are processed. So for all intents and purposes your DOS rules are being ignored. If you want them to be processed before the http rule then you need to configure them with a lower priority than the http rule.


Windows Firewall has the capability to apply rules to IP address ranges.

I'd suggest that the easiest way to do what you want is to create a new Inbound Rule to block all connections and set the scope to the IP range you wish to block. Here's a couple examples of this, using the GUI.

  • just did it, thanks! I thought it would be a good idea to don't even allow the connection to reach the server. But it seems to be working well anyway
    – Bruno
    Aug 23, 2016 at 15:34
  • @bruno Whilst this will work, your best off fixing your NSG so that it's stopped there. If Windows Firewall is having to do the work it will increase the load on the VM's
    – Sam Cogan
    Sep 2, 2016 at 12:14

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .