Sunday, 28 October 2012

How to Close Open Ports

Trojans are backdoor programs that create a connection with the help of open ports many of us are suffering from Trojans.they are one of the dangerous weapon for hackers.

If a hacker install a Trojan on your computer then he can do anything with your computer while sitting to thousands of km far away from your computer.After a successful installation of Trojan hacker can use your computer as a Zombie computer and can do any kind of illegal work with your IP address Or even can able to delete your valuable data.









Today i will show you how to be keep yourself safe by closing open ports.

Ports are the Application specific End points which provide connections in a operating system.
when you are connected to internet each network process use a different port.
for yahoo messenger uses a different port,your browser uses a different port to establish a connection with network.

As we discussed about Trojans earlier,when a hacker installs a Trojan on your computer..he need a open port to create a connection from your computer to his computer.To keep our self save from this kind of attacks we need to close our open ports.
To close open Ports..Here's The Procedure..
  1. Go To Start And Then Run.
  2. 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.
  3. Now Press enter and Your are done..


I also try to created VB Script and .bat file for both commands.

Vbs Script to close open ports..Just copy and paste below coding to notepad file and save as PortCloser.vbs

set ss = createobject("wscript.shell")
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

@echo off
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

0 comments:

Post a Comment