Skip to main content

Allow ping from local subnet and RustDesk Ports

Quick PowerShell Method

Run PowerShell as Administrator on the target PC.

Allow ping from local subnet :
New-NetFirewallRule -DisplayName "Allow ICMP Ping LAN" -Direction Inbound -Protocol ICMPv4 -IcmpType 8 -RemoteAddress LocalSubnet -Action Allow
  • Replace LocalSubnet with your range if needed (e.g., 192.168.1.0/24 ).
  • Test: ping target PC from another LAN PC.
Disable if needed :
Disable-NetFirewallRule -DisplayName "Allow ICMP Ping LAN"

GUI Method (Advanced Security)

  1. Search "Windows Defender Firewall with Advanced Security" > Inbound Rules > New Rule.
  2. Custom > All programs > Next.
  3. Protocol: ICMPv4 > Customize > Specific ICMP types: Echo Request > OK > Next.
  4. Local: Any IP > Remote: These IP addresses > Add your LAN subnet (e.g., 192.168.1.0/24) > Next.
  5. Allow connection > All profiles > Next.
  6. Name: "Allow Ping LAN" > Finish.

RustDesk ports Allow from local subnet :

For full LAN direct connect (green status), also allow these inbound on target :

  • TCP/UDP 21115-21117, 21118-21119 (RustDesk ports).

Use similar PowerShell :

Allow TCP PortsĀ 
New-NetFirewallRule -DisplayName "RustDesk TCP LAN" -Direction Inbound -LocalPort 21115-21119 -Protocol TCP -RemoteAddress LocalSubnet -Action Allow
Allow UDP Ports
New-NetFirewallRule -DisplayName "RustDesk UDP LAN" -Direction Inbound -LocalPort 21115-21119 -Protocol UDP -RemoteAddress LocalSubnet -Action Allow