Skip to content

A small Powershell script that adds Rules to your Windows Firewall to block all facebook ip´s.

Notifications You must be signed in to change notification settings

workingj/block_facebook-microsoft_ps

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 

Repository files navigation

block facebook and/or microsoft

A Powershell script that adds Rules to your Windows Firewall to block all facebook and microsoft ip´s.. All ip's listed here are from:

(downstreams included) and will be added to an Inbound and Outbound firewall rule to be blocked. (IPv4 and IPv6 address ranges included)

Installation

Download the files from github. Start the Commandline as Admin in the folder where the script is and enter this:

for facebook:

powershell -ep Unrestricted -file .\block-facebook-in-out.ps1

for microsoft:

powershell -ep Unrestricted -file .\block-microsoft-in-out.ps1

Take a look (block-facebook-in&out.ps1)

New-NetFirewallRule -Name "110 Block facebook (in)" `
                -Description "Kill all facebook ip ranges" `
                -DisplayName "110 Block facebook (in)" `
                -Enabled True `
                -Profile Any `
                -Direction Inbound `
                -Action Block `
                -RemoteAddress ("102.132.96.0/20",
                                "102.132.96.0/24",
                                "103.4.96.0/22",
                                ...

Take a look (block-microsoft-in&out.ps1)

New-NetFirewallRule -Name "111 Block microsoft (in)" `
                -Description "Kill all microsoft ip ranges" `
                -DisplayName "111 Block microsoft (in)" `
                -Enabled True `
                -Profile Any `
                -Direction Inbound `
                -Action Block `
                -RemoteAddress("104.44.65.0/24",
"104.44.70.0/24",
"104.44.73.0/24",
"13.107.12.0/24",

About

A small Powershell script that adds Rules to your Windows Firewall to block all facebook ip´s.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published