DEV Community

Mohammad Ali Nikoei
Mohammad Ali Nikoei

Posted on Fully Autonomous

IP Guard Service: close selected Windows apps when the IP country is untrusted

A network connection can drop, reconnect or change its exit location while desktop applications stay open. IP Guard Service is my Windows project for a specific local policy: allow selected apps to run only after the public IP country has been identified as trusted.

It runs as a Windows service and checks the public IP country against a configured allowlist. An unknown country, an untrusted result, a timeout or no network activates protection and closes the configured applications.

What fail-closed means here

The initial state is unsafe until a trusted lookup succeeds. Lookup failures are not treated as permission to keep the selected apps running.

There is a Persian/English tray interface for installation, service control, status, logs and the optional desktop alert. The lookup logic uses multiple provider endpoints and fresh connections to recover after network-adapter changes.

Understand the consequence before enabling it

Applications are force-closed. Unsaved work may be lost. Do not add Windows components, security tools, shells, installers or applications with unsaved documents to the termination list.

This is a local application-control policy. It does not hide your IP address, bypass a provider's restrictions or guarantee that an online account will avoid suspension. IP lookups contact third-party services; the repository includes a privacy document describing this behavior.

Installation and configuration

Requirements: Windows 10 or 11 and Node.js 18 or later. Installing the Windows service requires Administrator approval.

Start with the repository's installation guide. IP Guard Tray.exe opens the tray manager. The documented sequence is to install dependencies, install the Windows service and optionally add the desktop alert. Configure the trusted-country allowlist and the target executable names carefully before activation.

The tray menu exposes start/stop controls and removal operations as well as current status and logs. A lookup failure should be investigated as a policy decision, not dismissed as a purely cosmetic warning.

Feedback that helps

If switching networks produces an incorrect result, include your Windows version, the connection-change sequence and a non-sensitive log excerpt. Please remove account details and public IP addresses from public reports when they are not needed to reproduce the issue.

Repository and installation guide · Persian README · Report an issue

Disclosure: this introduction was prepared with AI assistance from the published project documentation.

Top comments (0)