Archive for the ‘Windows’ Category

Windows Firewall GUI will not allow you to open a range of ports easily. By issuing the following command we can easily open port range.

FOR /L %I IN (3400,10,6700) DO netsh firewall add portopening TCP %I “Passive FTP”%I

Details of the above rule is as follows.

FOR /L %I IN (Minimum_Port,increment,Maximum_Port) DO netsh firewall add portopening PROTOCOL %I “Name Of Rule”%I

Here are the values::

Minimum_Port = The lowest port # in the range that you would like to open.

Maximum_Port = The Highest port # in the range that you would like to open.

Increment = This should always be 1, unless you need to open every other port….which does not make sense

PROTOCOL = Either TCP or UDP

Name Of Rule = Name the rule whatever you like

To check tcp/ip number of connection

netstat -ano | find /i /c “:80″
netstat -ano | find /i “80”

C:\Users\Administrator>netstat -ano | find /i /c “:80″
14126

C:\Users\Administrator>netstat -ano | find /i “80”
TCP [::]:49154 [::]:0 LISTENING 980
UDP 0.0.0.0:500 *:* 980
UDP 0.0.0.0:4500 *:* 980
UDP [::]:500 *:* 980

To find on which IP the ddos is targeted.

netstat -ano | find /i /c “192.168.1.1”

C:\Users\Administrator>netstat -ano | find /i /c “192.168.1.1”
15000