Skip to content

Simple python script that creates inbound rules for windows firewall blocking income traffic of known advertising servers

Notifications You must be signed in to change notification settings

jerih0n/Addblocker_windows

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 

Repository files navigation

Addblocker windows

Python script for creating host-based addblocker by adding inbound rules for Windows firewall, blocking all the trafic from known advertising servers. The rules block both TCP and UDP protocols and related ports

Information

Current capabilities of the program:

  • download a list of known advertising ip addresses and creates inbound block rules in windows firewall for those IP addresses that are not currently blocked
  • create a firewall settings backup before starting for easter reverting all changes

Installation

Requres python and administrative privileges

Usage

For Windows: Opne CMD with as Administrator! Changes in the firewall requres them, and it won't work with normal or restricted windows account:

cd [Program Directory where main.py is located] 

Then run in that

python main.py

Reverting

In case of service breakdown, or nonavailability, you can revert your firewall setting, to the point of the program FIRST start. Only the first backup will have 0 rules created by this addblocker. To revert the changes you can import the generated firewall file using Windows Defender and Firewall settings. You need to run the Windows Firewall settings as Administrator!

image

In case this does not work, you can try to execute CMD command directly. Open CMD as Administrator and enter:

netsh advfirewall import "{Path}" 

where Path is the full path to the .wfw file. Make sure that the file path is used into ""

About

Simple python script that creates inbound rules for windows firewall blocking income traffic of known advertising servers

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages