Windows Defender Firewall is good at keeping unwanted incoming connections out, but it doesn't make it easy to see which apps on your PC are talking to the internet, or to stop them. Portmaster, from Austrian developer Safing, is a free, open-source application firewall built for exactly that. This guide is based on Safing's official website, documentation and GitHub repository. Because it hooks deep into the network stack, we'd recommend making a restore point before you install it.
What is Portmaster?
Safing describes Portmaster as "a free and open-source application firewall". In its own words, it lets you "Monitor every network connection on your computer and set per-application rules for what to block."
Key points from the official pages:
It's open source, released under the GPL-3.0 licence on GitHub.
It's available for Windows, plus Debian/Ubuntu and Fedora (with other Linux options listed on the download page). The current release is version 2.
It blocks ads, trackers and malware hosts system-wide by default, using filter lists, so protection isn't limited to your web browser.
It routes DNS queries over DNS-over-TLS to a provider of your choice.
You can cut an app off from the internet completely, block specific connection types or restrict connections to certain countries, either per app or globally.
The GitHub readme says everything runs "100% local on your device", with the exception of SPN, Safing's optional privacy network.
The core features are free. The GitHub readme marks network history, per-app bandwidth usage and SPN as paid features, and the pricing page lists Plus and Pro plans.
On Windows, Portmaster works through a kernel driver that uses the Windows Filtering Platform (WFP), so it sees every network packet and can stop it.
Portmaster isn't an antivirus
Safing is clear on this point. Its FAQ calls Portmaster "a privacy tool" and says antivirus systems are security tools focused on things like malware detection, "which Portmaster simply does not have". Safing doesn't recommend switching off your antivirus. Keep Microsoft Defender (or whatever you use) running alongside it. If you're still choosing between apps, our round-up of the best free firewall software for Windows and our guide to the best free privacy tools for Windows 11 compare the options.
Step 1: Make a restore point
Portmaster changes how network traffic and DNS are handled on your PC, so it's worth having a way back. Create a System Restore point before you start.
Step 2: Download and install Portmaster
Go to the download page on safing.io and choose the Windows (.exe) installer. Download Portmaster from the official site only.
Run the installer and follow the on-screen steps.
Alternatively, Safing's Windows install documentation lists a Windows Package Manager option: winget install -i portmaster. Our guide to installing apps with winget explains the basics.
Safing's documentation says only 64-bit systems are supported. Once installed, the Portmaster Core Service runs as a system service that starts at boot, before you sign in, while the app and tray notifier run in your user account. Safing's FAQ also lists what it changes. It doesn't add or change network interfaces, routing entries or DNS server settings. Instead, it redirects packets on the fly, and that integration is removed when Portmaster shuts down or is uninstalled.
If you ever need the older release, the download page still offers Portmaster v1, but Safing recommends it only if you run into problems with v2.
Step 3: Watch what your apps are doing
Open the Portmaster app and it starts in the Network Monitor. This lists your applications and the connections each one makes in real time, so you can spot unexpected or unwanted connections. Safing's FAQ explains how to read it: an app with a grey section in its bar has at least one blocked connection, and blocked connections inside an app are marked with a red dot.
Click a connection to open its details. The "Applied Setting" field in the bottom left tells you which setting allowed or blocked it. This is the quickest way to understand why something isn't working.
Step 4: Block an app or tighten the rules
Most settings can be set for a single app or globally. Useful options from the Settings Handbook include:
Default Network Action: what happens when no other rule applies. The options are Allow (the default), Block or Prompt. Prompt asks you about each new connection in the app and through desktop notifications, which gives you lots of control but can mean plenty of pop-ups at first.
Force Block Internet Access: stops an app reaching the internet.
Force Block LAN: blocks an app from talking to devices on your local network.
Force Block P2P/Direct Connections: blocks connections made straight to an IP address or peer without a DNS lookup first.
Force Block Incoming Connections: stops an app accepting incoming connections.
Outgoing Rules and Incoming Rules: rules are checked from top to bottom, stopping at the first match. They can match an IP address or network, a domain (with wildcards), a country, a continent, an AS number or a filter list. For example, example.com matches that exact domain, while .example.com also matches its subdomains.
Filter Lists: choose which block lists Portmaster uses for ads, trackers and malware. The documentation says updates are checked for every hour.
If you only want to stop one program going online, the built-in alternative is covered in our guide to blocking an app with Windows Firewall.
Step 5: Allow something that's been blocked
Sooner or later a filter list or rule will block something you want. Safing's FAQ gives two options once you've found the blocked connection and checked its Applied Setting:
Add an exception for that connection (recommended): use the Allow Domain or Allow IP button in the connection details. This adds a new rule to that app's settings.
Change the setting responsible: either for that app only (recommended) or globally. Safing notes that most settings give more protection when they're on, so turning one off usually allows the connection.
If an app needs to accept incoming connections, for example a game server or a file-sharing tool, the FAQ says to disable Force Block Incoming Connections in that app's settings. You can then limit where connections can come from with Force Block LAN, Force Block Internet Access or Incoming Rules.
Using Portmaster with a VPN
Safing's VPN compatibility page says Portmaster is generally compatible with VPNs. Problems arise when both Portmaster and the VPN client hook into DNS. If your VPN stops working, the FAQ suggests first finding the VPN app in the Network Monitor and making sure its connections are allowed. If that doesn't help, look for an option in your VPN app to turn off DNS redirection, and check Safing's list of known compatible VPNs. If you use the built-in Windows VPN client instead, see our guide to connecting to a VPN in Windows 11.
How to uninstall Portmaster
Open Windows' Add or Remove Programs (Settings > Apps > Installed apps in Windows 11), find Portmaster and select Uninstall. Alternatively, run the uninstaller at C:\ProgramData\Safing\Portmaster\portmaster-uninstaller.exe. Safing's Windows install documentation says a reboot is needed afterwards.
If you lose internet access after uninstalling, the FAQ explains that while Portmaster is running it quietly corrects a broken DNS configuration by redirecting DNS queries to itself, so removing it can expose a problem that was already there. Check your DNS settings, and if in doubt set them to automatic (DHCP). Our guides to changing DNS in Windows 11 and flushing the DNS cache can help.