blocking an IP using Windows 10 Firewall

Charles Brauer 61 Reputation points
2021-01-27T22:53:11.677+00:00

Hello,

I'm trying to block access from an IP address. I ran the following elevated PowerShell script:

PS C:\> New-NetFirewallRule -RemoteAddress 192.35.168.128 `  
>>                     -DisplayName "Block Bad IP" `  
>>                     -Direction inbound `  
>>                     -Profile Any `  
>>                     -Action Block  
  
  
Name                  : {4b7d1af9-99b6-4e9c-9ae9-c811b31400ae}  
DisplayName           : Block Bad IP  
Description           :  
DisplayGroup          :  
Group                 :  
Enabled               : True  
Profile               : Any  
Platform              : {}  
Direction             : Inbound  
Action                : Block  
EdgeTraversalPolicy   : Block  
LooseSourceMapping    : False  
LocalOnlyMapping      : False  
Owner                 :  
PrimaryStatus         : OK  
Status                : The rule was parsed successfully from the store. (65536)  
EnforcementStatus     : NotApplicable  
PolicyStoreSource     : PersistentStore  
PolicyStoreSourceType : Local  

When I look at the rule with wf.msc I do not see a green check-mark.

61112-screen.png

The rule is not working. What am I missing?

Charles

Windows for business | Windows Client for IT Pros | Devices and deployment | Configure application groups
0 comments No comments
{count} votes

Answer accepted by question author
  1. Kapil Arya 36,481 Reputation points Volunteer Moderator
    2021-01-28T06:43:31.85+00:00

    Hello,

    As you said the rule was successfully parsed from the store, it should be working fine now.

    If it doesn't works, you can try blocking it via hosts file as an alternative.

    Hope this helps!

    0 comments No comments

1 additional answer

Sort by: Most helpful
  1. Anonymous
    2021-01-28T03:19:59.337+00:00

    Hi ,

    I did not see anything wrong, what's the exact problem?

    61202-image.png

    If you configure a block firewall rule successfully, then you will see a small red icon in form of a stop panel at the left of the entry. This is correct.

    Best Regards,

    Candy

    --------------------------------------------------------------

    If the Answer is helpful, please click "Accept Answer" and upvote it.

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    1 person found this answer helpful.

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.