Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Windows Server 2016 Modern Apps per user firewall rules #135

Open
BrianRiegels-Morgan opened this issue Sep 12, 2019 · 6 comments
Open

Windows Server 2016 Modern Apps per user firewall rules #135

BrianRiegels-Morgan opened this issue Sep 12, 2019 · 6 comments
Assignees

Comments

@BrianRiegels-Morgan
Copy link

This is a feature request for the BIS-F image sealing script in relation to the modern apps firewall rules that are created on Windows Server 2016 when a user logs in to the server. If the script can be updated to remove the user based rules that accumulate on Citrix servers it would be really appreciated. I've included details of the issue in a blog written by Insentra in Aus. https://www.insentra.com.au/windows-firewall-behaviour-in-windows-10-vdi-and-windows-server-2016-w-citrix-xenapp/
If you need more information please reach out to me on email brian.riegels-morgan@insentragroup.com

@matthias-schlimm
Copy link
Collaborator

matthias-schlimm commented Sep 12, 2019 via email

@martinzugec-ctx
Copy link

@BrianRiegels-Morgan Can you please report this also using https://bit.ly/CitrixOptimizerFeedback? I would like to track this internally, thanks!

@BrianRiegels-Morgan
Copy link
Author

BrianRiegels-Morgan commented Sep 12, 2019 via email

@BrianRiegels-Morgan
Copy link
Author

BrianRiegels-Morgan commented Sep 12, 2019 via email

@martinzugec
Copy link

I had a look at this behavior and this is what I see (Windows 10 build 1903).

Some UWP apps will create per-user rules, on default system it means that 9 firewall rules are being created for each new profile.

After Citrix Optimizer is used to remove UWP apps, no new rules are created for applications that have been removed - this however includes only 2 apps, 'Mail and Calendar' and "Microsoft Photos". When you delete profiles of these users, FW policies will stay in place.

I don't see how there is anything we can do in Optimizer, as this is a default (and expected) behavior, however I think there is an opportunity here for BIS-F to automatically delete all firewall rules that are created per-user. I would suggest to look for any policies where "Local User Owner" is not "Any" and delete it ('Get-NetFirewallRule' and attribute 'Owner').

@EUCweb
Copy link
Owner

EUCweb commented Aug 16, 2023

Source: https://koetzingit.de/index.php/en/blog-en/194-common-logon-issues-and-how-to-solve-them
scroll down to the entry The firewall rules bug

Description
With Windows server 2016/2019, a bug adds firewall rules each time a user logs on. The growing firewall rules will slow down the Logon (minutes to seconds) and decrease the total server performance.

Solve

Microsoft has released an update in March 2019 (KB4490481), but you must set a registry key to activate the fix!

HKLM\SYSTEM\CurrentControlSet\Services\SharedAccess\Parameters\FirewallPolicy
DeleteUserAppContainersOnLogoff REG_DWORD = 0x00000001

Even with the Hotfix, you might already have thousands of unwanted firewall rules that still slow everything down. For that, use the attached PoSh script to clean up the unwanted rules.

References

March 26, 2019—KB4490481 (OS Build 17763.402)
https://support.microsoft.com/en-us/help/4490481/windows-10-update-kb4490481
ClearFWRules.zip

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

No branches or pull requests

5 participants