Skip to main content

Firewall

Open inbound or outbound exceptions in Windows Firewall for your application.

Applies to: MSI and MSIX.


firewallExceptions – add firewall exceptions​

Properties​

PropertyTypeRequiredDefaultDescription
namestringyes–Display name in wf.msc.
pathstringyes–Full path to the file. Can be inside or outside the package.
boundstring[]yes–Subset of ["in", "out"].
profilestring[]yes–Subset of ["private", "public", "domain", "any"].
protocolenumyes–One of "tcp", "udp", "any". (Single string, not an array.)

Examples​

Outbound TCP for the updater on private/domain networks​

"firewallExceptions": [
{
"name": "My Application Updater - Outbound",
"path": "$.installDir\\My Application.Service.exe",
"bound": ["out"],
"profile": ["private", "domain"],
"protocol": "tcp"
}
]

Inbound and outbound, UDP, all profiles​

{
"name": "My Application Discovery",
"path": "$.installDir\\MyApp.exe",
"bound": ["in", "out"],
"profile": ["any"],
"protocol": "udp"
}

MSI vs MSIX behavior​

Both formats register Windows Firewall rules at install. The rules are removed on uninstall.


Validation rules​

ValidatorCatch
requiredname, path, bound, profile, protocol are mandatory.
valid pathfirewallExceptions.path is syntactically valid.
valid valueEnum-based fields must use a valid value.