Monday, 5 March 2012

What ports are open on the computer

One of the most common question is see users asking
How i can find what ports are open on my computer

you can uses NETSTAT command to check what ports
are open on your computer .

netstat -an |find /i "listening"

Listening will show you what ports are open and
if you replace listening with established it will
show you all the ports you have connection established.

netstat -an |find /i "Established"

I still suggest you to use port scanner to
find out what ports are open on your computer.

Friday, 2 March 2012

Recover Cisco Switch Password

Hi Every one , This post mainly focus how to retrieve Cisco switches password, Most of the time you forget the password and some time during creation of Configuration you normally copy spaces next to the password and you end up messing the encryption key and unable to logon.

This post will describes the password recovery procedure for the Cisco 2900XL/3500XL, 2940, 2950/2955, 2960, and, 3560, 3750 Series.

1. Connect your computer with switch using terminal emulation i.e. Hyper Terminal to the console port of the switch.

2. Unplug the power cable and plug it back in.

3. Hold down the mode button located on the left side of the front panel, while you reconnect the power cable to the switch.
You will see the following message

The system has been interrupted prior to initializing the flash file system to finish loading the operating system software:

4. you will be on the prompt

Now issue flash_init

switch: flash_init

This will initialize the flash

5. Issue the load_helper command.

switch: load_helper

Then issue the following command.

Switch: Dir Flash:

you will see the list of files one of the file will like as below


This is the configuration file that holds the configuration and password of your switch
that you might have forgotten.

6. Now we have rename the file by issuing the follwoing command

switch: rename flash:config.text flash:config.old

7. Now issue the boot command to reboot the switch with no config.

switch: boot Loading "flash:c3500xl-c3h2s-mz.120-5.WC7.bin"...#############################

File "flash:c3500xl-c3h2s-mz.120-5.WC7.bin" uncompressed and installed,entry point: 0x3000 executing..

8. As switch have booted without any configuration (we have renamed the config file) switch will go into auto configuration wizard .

enter n for NO

--- System Configuration Dialog ---
At any point you may enter a question mark '?' for help.
Use ctrl-c to abort configuration dialog at any prompt.
Default settings are in square brackets '[]'. Continue with configuration dialog?
[yes/no]: n

9. Hit enter and you will be in EXEC Mode


write enable it will take you to Exec mode without asking any password.


10. now rename the config file again as default.

Switch#rename flash:config.old flash:config.text Destination filename [config.text]

11. Copy the configuration file into memory.

Switch#copy flash:config.text system:running-config Destination filename [running-config]?

your old configuration file will be reloaded into the system now you have to setup password

Switch(config)#enable secret yournewpassword

setup line vty or console password if you forgot them as well .

12. finally you are done , Write mem and save the config .

Switch#write memory