Friday, October 22, 2010

How to Close Port on a Windows Machine!

I happened to find this bat file on my personal HDD. I do not remember where did I find it.
This is a very simple way to close a port on a Windows machine if you happen to use the Windows Firewall. We have two versions of the script.This is a .bat.

@echo off
title Port Closer
echo Port Closer
echo ============
echo.
set /p port=Type the port number you wish to close here:
netsh firewall delete portopening TCP %port%
exit


Filed Under :

1 comment for "How to Close Port on a Windows Machine!"

background