0

Let's say I want to create a firewall rule for a Universal Windows Platform (UWP) app (Ex: Microsoft News, Netflix, etc.).
How can I do that? (Command prompt / Powershell / Windows Defender Firewall with Advanced Security)

I can create a Firewall rule using the application path. However, I'm not sure whether it's the recommended way to create rules for UWP apps.

0

3 Answers 3

1

UWP apps are local containerized apps that only come from the Windows Store or your internal enterprise store. Which are vetted apps. If you don't want the apps, then institute a DSC policy or App restriction policy to prevent them from being installed/used

How to Use AppLocker to Block Microsoft Store Apps from Running in Windows 10

2
  • I do want the apps. I just don't want some of them to access the Internet. Anyway, today, I learn about the AppLocker. So, thank you.
    – DxTx
    Commented Apr 4, 2020 at 9:00
  • Internet access is required to install and update them. So, you are saying you only want ingress request to be successful, but not egress. So, a user can see, for example, MS News feeds but can't go read them. So, again, why provide the app at all as it's useless if I can't navigate the feed that is shown. So, I'm a but taken aback about this use case.
    – postanote
    Commented Apr 5, 2020 at 8:32
1

From the examination of such rules in the Windows Defender Firewall with Advanced Security, it seems that the rules are defined using the package SID.

Using the Windows Defender app, this requires creating a Custom rule, then next to "Services" pressing the Customize button, then using the option "Apply to app package with this app package sid".

If you are into programming see the post
How to set up a rule for a Store app using the Windows Firewall API?

2
  • Thank you. I'll look into this. BTW, you can get the SID using 'get-StartApps' PowerShell command, right?
    – DxTx
    Commented Apr 4, 2020 at 9:07
  • Yes, that gets you the ID to use in another method, in "Programs and Services", near "Specify the application packages to which this rule applies", using the Settings button. Use whichever method works for your app.
    – harrymc
    Commented Apr 4, 2020 at 9:16
1

I'm sorry guys but looks like that in some cases it's better to we have less knowledge...

Personally I'm a total noob in coding, but I really wanted to block some UWP apps in my PC.

This webpage, is the "END" of road for everyone who google this thing: "How to block UWP apps in Firewall"

With a lot of respects, you guys really make this issue harder than it needs to be...

NO CODING IS NEEDED AT ALL

You can simply block an UWP app in Firewall just like any other traditional Desktop software.

Your problem is that you don't look for the easiest way, you just look for the most advanced solution...

However, as I mentioned above, blocking internet connection for an UWP app is just like a traditional Desktop software.

EASY SOLUTION:

Type "advanced security" in Windows 8/10 search then select "Windows Defender Firewall with Advanced Security". In the newly opened window and in the left panel, go to "Inbound Rules" then in the right panel, select "New Rule..." then tap "Next" when "Program" is selected. Then click on "Browse..." and go to this address:

*C:\Program Files\WindowsApps*

Now find your app's name and enter its folder then select the file with "Application" type. I do agree with anyone who say that finding the right file, is not that easy. But not that hard too... You'll be able to find the right "Application" type file just in a few seconds. As an example, the folder name for the "Google" app is this:

GoogleInc.GoogleSearch_2.1.19.0_x64__yfg5n0ztvskxp

And the name of its app "Application" file type is this:

GoogleSearchUniversal

However, after choosing the correct "Application" file type click on "Open" for it. Then tap "Next" and then choose "Block the connection" then "Next" then marking all types of connections then "Next" then call it and "Finish" and boom! lol...

Just like a traditional Desktop software.

You see? Not a big deal...

As a conclusion, let's don't make it harder than it needs to be. Leave your coding knowledge behind and look for an EASY method instead...

1
  • Hi! Thank you for the response. +1. However, there is a small issue (I think). Don't Windows change the app folder names from time to time? Especially, when updating app, they create a new app folder, right? E.g.: GoogleInc.GoogleSearch_2.1.200_x64__dfg6f0bvvdsxo
    – DxTx
    Commented Oct 6, 2021 at 16:40

You must log in to answer this question.

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