17

Is it possible to "whitelist" an IP Address in the Windows Firewall and allow all connections from that specific address?

Aidan Knight
  • 650
  • 3
  • 11
  • 19

3 Answers3

19

Assuming the IP address you want to whitelist is 192.0.2.55:

netsh advfirewall firewall add rule name="Allow from 192.0.2.55" dir=in action=allow protocol=ANY remoteip=192.0.2.55
Mark Henderson
  • 68,823
  • 31
  • 180
  • 259
  • Also, don't forget to disable all of the other allow rules or connections will still make it through from them. – Jay R. Oct 06 '15 at 18:50
8

Here is how to do it from Powershell

New-NetFirewallRule -Name Allow192.0.2.55 -DisplayName 'Allow from 192.0.2.55' -Enabled True -Direction Inbound -Protocol ANY -Action Allow -Profile ANY -RemoteAddress 192.0.2.55
ausip
  • 416
  • 1
  • 5
  • 8
1

this should work like charm

netsh advfirewall firewall set rule name="my rule" new remoteip=157.60.0.67
suraj jain
  • 119
  • 4