How to Find and Block Unauthorized Network Connections on Windows
Security
5 min readOctober 30, 2026

How to Find and Block Unauthorized Network Connections on Windows

Unknown programs phoning home can drain your bandwidth and expose your data. Learn how to spot and block unauthorized network connections on Windows 10 and 11.

Share

Why Unauthorized Network Connections Are a Security Risk

Every time your PC connects to the internet, dozens of processes may be sending or receiving data in the background. Most are legitimate — Windows Update, your browser, cloud sync tools. But some connections are not. Malware, adware, and poorly written software can quietly phone home, exfiltrate data, or open backdoors without any visible sign.

Knowing how to audit your active network connections is one of the most practical security skills a Windows user can develop. This guide walks you through the built-in tools and step-by-step checks you need to find and block anything suspicious.

Free AI Diagnosis

Having this problem on your own PC?

Describe what's happening and get a real AI diagnosis in seconds — no account needed.

Step 1: Use Netstat to List Active Connections

The fastest way to see what your PC is talking to is the netstat command. Open an elevated Command Prompt (right-click Start → Run as administrator) and run:

netstat -ano

This lists every active TCP and UDP connection with:

Local Address — your PC's IP and port

Foreign Address — the remote server your PC is connected to

State — ESTABLISHED, LISTENING, TIME_WAIT, etc.

PID — the Process ID of the program that owns the connection

For a cleaner view that resolves hostnames automatically, use:

netstat -b 5

This refreshes every 5 seconds and shows the executable name above each connection. Look for anything in ESTABLISHED state connecting to an unfamiliar IP or domain.

Step 2: Map PIDs to Processes in Task Manager

Once you spot a suspicious PID from netstat -ano, open Task Manager (Ctrl + Shift + Esc), click Details, and sort by the PID column. Match the number to find the owning process.

Right-click the process and choose Open file location to see exactly which executable is making the connection. A legitimate Windows process will live in C:\Windows\System32 or a well-known program folder. Be suspicious of:

Executables in %AppData%, %Temp%, or random subfolders

Names that mimic system processes (e.g., svch0st.exe instead of svchost.exe)

Unsigned or recently created files

Step 3: Use Resource Monitor for a Visual Overview

For a real-time graphical view, open Resource Monitor (search for it in Start or run resmon in the Run dialog). Click the Network tab and expand Network Activity.

This panel shows every process with active network traffic, the bytes sent and received per second, and the remote addresses. You can sort by Send (B/sec) or Receive (B/sec) to immediately spot any process consuming unusual bandwidth.

Step 4: Check Listening Ports for Backdoors

A process in LISTENING state has opened a port waiting for incoming connections — a classic sign of a backdoor or remote access tool. Run:

netstat -ano | findstr LISTENING

Note the port numbers and PIDs. Common legitimate listeners include:

Port 135, 445 — Windows RPC and file sharing

Port 3389 — Remote Desktop (only expected if you use RDP)

Port 80, 443 — Web servers (only expected if you run one)

Any unfamiliar port in LISTENING state deserves investigation. Cross-reference the PID in Task Manager as described above.

Step 5: Block Suspicious Connections With Windows Firewall

Once you identify a process or IP you want to block, Windows Firewall gives you precise control.

To block an outbound program:

1

Open Windows Defender Firewall with Advanced Security (search in Start)

2

Click Outbound Rules → New Rule

3

Choose Program, browse to the executable, and select Block the connection

4

Apply to all profiles (Domain, Private, Public) and give the rule a descriptive name

To block a specific remote IP address:

1

Create a new Outbound Rule → choose Custom

2

Set Program to All programs (or a specific one)

3

Under Scope, add the remote IP to the Remote IP address list

4

Select Block the connection and finish

You can verify your rules are active by running netstat -ano again — the connection should no longer appear as ESTABLISHED.

Step 6: Automate Ongoing Monitoring

One-time checks are useful, but ongoing monitoring catches threats that appear later. A few lightweight approaches:

TCPView (free from Microsoft Sysinternals): a GUI tool that shows live connections with process names, and lets you close connections or kill processes with a right-click

Windows Firewall logging: enable logging in Firewall Advanced Settings → Properties → Logging to record all dropped packets and successful connections to %SystemRoot%\System32\LogFiles\Firewall\pfirewall.log

PowerShell scheduled task: run Get-NetTCPConnection | Where-Object State -eq 'Established' | Select-Object LocalPort,RemoteAddress,OwningProcess on a schedule and export results for review

When to Escalate: Signs of Serious Compromise

Some findings warrant more than a firewall rule. Escalate your response if you see:

Connections to known malicious IPs — check any suspicious IP against VirusTotal or AbuseIPDB

Processes injected into legitimate hosts — e.g., svchost.exe connecting to an unusual foreign IP on a non-standard port

Connections that reappear after you block them — a sign of persistence mechanisms like scheduled tasks or registry run keys

Encrypted traffic on unexpected ports — malware often uses HTTPS on non-443 ports to blend in

In these cases, run a full offline scan with Windows Defender (boot into Windows Recovery Environment) and consider resetting the affected user profile.

Let DiagnoseMyPc Help You Spot the Problem Faster

Manually auditing network connections takes time and expertise. DiagnoseMyPc simplifies the process: describe what you're seeing, paste the output of netstat -ano, or upload a screenshot of Resource Monitor, and the guided analysis will help you interpret the results and identify the next step.

The free plan gives you 5 analyses per month — more than enough to investigate a suspicious connection, verify a fix, and confirm your PC is clean. If you prefer a deeper automated scan, the optional Windows scan tool collects system data locally and sends it for analysis without you having to copy-paste anything manually.

Don't let unknown connections go uninvestigated. Head to DiagnoseMyPc, describe what you found, and get a clear, actionable answer in minutes.

Found this helpful?

Share it with someone who could use it.

Share

DiagnoseMyPC Team

Expert PC diagnostics and troubleshooting guides to help you keep your Windows system running smoothly.

Get the free Windows Troubleshooting Checklist

Subscribe and instantly download our 50-point Windows troubleshooting checklist — plus practical fixes, performance tips, and security alerts from the DiagnoseMyPC team.

No spam. Unsubscribe anytime.

Frequently Asked Questions

How do I know if my PC has malware?

Common signs include sudden slowdowns, pop-ups, unfamiliar programs, high network or CPU usage when idle, and browser changes you didn't make. An AI diagnosis can flag suspicious activity in your system data — run a free scan at diagnosemypc.com to check.

Is Windows Defender enough to protect my PC?

For most home users, Windows Defender plus safe browsing habits and regular updates is solid protection. The bigger risks are outdated software, weak passwords, and clicking malicious links — good habits matter more than any single tool.

What should I do first if I think I've been hacked?

Disconnect from the internet, change important passwords from a different device, run a full security scan, and check for unfamiliar programs or startup entries. A diagnosis helps confirm what changed on your system so you know exactly what to clean up.

Does this tool make changes to my PC without asking?

No. The analyzer only reads the diagnostic data you choose to share and shows you any recommended fixes first. You stay in complete control of what actually runs on your computer.

Free Diagnostic Tool

Having PC Issues? Let AI Diagnose Them

Get an AI-powered analysis of your Windows PC in under 5 minutes — no technical knowledge required, no account to get started.