Git Product home page Git Product logo

dtfirewallmonitor's Introduction

Daniele's Tools Firewall Monitor

DTFirewallMonitor
Displays briefly what your firewall is blocking.
Copyright (C) 2022 daniznf

Description

This script can be run when you want to see in realtime what your firewall is blocking. Each time an application gets blocked by firewall it will be displayed briefly by this script. After displaying some recent events, every new event will be displayed (follow).
By editing the included CSV (and passing it via the parameter -Exclusions), unwanted events can be excluded from the monitor.

Requirements

DTTestAdministrator module installed. https://github.com/daniznf/DTTestAdministrator

Install

By setting the firewall to block all Inbound and Outbound connections that do not match a rule, only traffic explicitly permitted by rules will flow, while blocked traffic will be logged into the system's Security log, and at the same time this monitor script will be able to retrieve it.
To have this log available, the "Failure" property in the group policy "Audit Filtering Platform Connection" must be checked.

Run

Right click on this script and choose "Run with Powershell" or launch this script from powershell.

Output example

4/6/2022 4:21:52 PM
Application: (10123) C:\users\daniznf\application\application.exe
Protocol:    UDP OUT
Source:      192.168.100.101 : 10123
Destination: 10.0.0.1        : 80

4/6/2022 4:32:18 PM
Application: (8012) C:\program files\program1\program1.exe
Protocol:    TCP OUT
Source:      192.168.100.101 : 20123
Destination: 10.0.0.2        : 443

4/6/2022 4:33:01 PM
Application: (9045) C:\program files\program2\program2.exe
Protocol:    TCP IN
Source:      10.0.0.3        : 30123
Destination: 192.168.100.101 : 80

Output example in Compact mode

PS C:\> .\DTFirewallMonitor.ps1 -Compact
16:34:51  (9012) application1.exe UDP OUT
192.168.100.1: 40123  -> 10.0.0.4: 80

16:35:11  (8034) application2.exe TCP IN
10.0.0.4: 40123  -> 192.168.100.1 : 443

Exclude events by CSV exclusions

PS C:\> .\DTFirewallMonitor.ps1 -Exclusions $env:USERPROFILE\Exclusions.csv

Help

PS C:\> Get-Help .\DTFirewallMonitor.ps1

dtfirewallmonitor's People

Contributors

daniznf avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.