To keep our self save from various kind of attacks we need to close our open ports.
To close open Ports..Here's The Procedure..
- Go To Start And Then Run.
- Type "netsh firewall delete portopening TCP PORTNUMBER" without Quotes and PORTNUMBER is the Number of your port which you want to close. If you want to close PORTNUMBER 8080 Then the command to close PORT 8080 is.
netsh firewall delete portopening TCP 8080. - Now Press enter and Your are done..
If you are interested in coding then you can try using .vbs and .bat files too.
- Vbs Script to close open ports..Just copy and paste below coding to notepad file and save as PortCloser.vbs
set ws = wscript
dim PORT
PORT = InputBox("Enter the port you wish to close:")
ss.run "netsh.exe"
ws.sleep 1000
ss.sendkeys "firewall delete portopening TCP " & PORT
ss.sendkeys "{enter}"
ws.sleep 500
'ss.sendkeys "exit"
'ss.sendkeys "{enter}"
- .BAT Script to close open ports..Just copy and paste below coding to notepad file and save as PortCloser.bat
title Port Closer
echo Port Closer
echo.
set /p port=Type the port number you wish to close here:
netsh firewall delete portopening TCP %port%
msg /w * Port %port% has been closed.
exit
No comments:
Post a Comment