0

In the predetermined snippet:

netsh advfirewall firewall add rule name="ICMP Allow incoming V4 echo request" 
protocol=icmpv4:8,any dir=in action=allow

What would I change exactly to allow incoming ICMP only from a specific IP:

# assuming I want incoming pings from 192.168.1.5 and I use: 
remoteip=192.168.1.5

What exactly should my new command be?

1 Answer 1

0

For allow rule from specific ip(s) or subnet you can add this argument : remoteip

For your situation :

netsh advfirewall firewall add rule name="ICMP Allow incoming V4 echo request from X.Y.A.B" protocol=icmpv4:8,any dir=in action=allow remoteip=X.Y.A.B

X.Y.A.B is the ip address where you wish to authorize ICMP use to your machine

you can have more information with :

PS C:\Users\iamuser>netsh advfirewall firewall add rule ?

...
      [remoteip=any|localsubnet|dns|dhcp|wins|defaultgateway|
         <IPv4 address>|<IPv6 address>|<subnet>|<range>|<list>]
...

You must log in to answer this question.

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