To add or modify a rule in Windows Firewall using the Graphical User Interface (GUI) and specifying the "Remote IP address" under the "Scope" tab, you can follow these steps:
-
Open the Windows Defender Firewall with Advanced Security.
- Press
Win + Xand selectWindows Defender Firewall with Advanced Security. - Alternatively, type
Advanced Firewallin the Start menu search bar and select the app.
- Press
-
In the left pane, click on
Inbound Rules. -
Click on
New Ruleto create a new rule orRight-click > Modifyon an existing rule to modify it. -
Choose the rule type according to your needs. For this example, let's choose
Custom. -
Select the protocol and port for the rule. Then, click on
Next. -
Now, navigate to the "Scope" tab. Here, you can specify the "Remote IP address".
- To use predefined values, select the appropriate option under "Remote IP address". For example, choose
Localsubnetto allow connections from devices on the same network.
- To use predefined values, select the appropriate option under "Remote IP address". For example, choose
-
Configure other options as needed, such as the action to take when the rule matches, exceptions, and profiling.
-
Finally, give the rule a name and description, then click on
Finish.
Here's a sample code block demonstrating how to create a new rule with the "Remote IP address" set to "Localsubnet":
<code>
// Example for creating a new rule with Remote IP address set to Localsubnet
// Replace "Protocol" and "Port" with the appropriate values
1. Open Windows Defender Firewall with Advanced Security
2. In the left pane, click on Inbound Rules
3. Click on New Rule
4. Choose Custom
5. Select the protocol (e.g., TCP) and port (e.g., 80)
6. Navigate to the Scope tab
7. Under Remote IP address, select Localsubnet
8. Configure other options as needed
9. Give the rule a name and description
10. Click on Finish
</code>