Cisco router - check for open ports

Hi There,

We currently have a Cisco 1841 router and it only accessible via telnet and we are in the process of upgrading this router and was wanting to know if anyone was able to tell me the entire command line commands to run on this router in order to find all currently open ports?

Thanks in advance
Who is Participating?
Istvan KalmarConnect With a Mentor Head of IT Security Division Commented:
server#sh ip sockets

Proto    Remote      Port      Local       Port  In Out Stat TTY OutputIF
 17     514      53786   0   0 100010   0
 17   --listen--       1975   0   0   11   0
 17             0       2228   0   0  211   0
 17       68         67   0   0 2211   0
 17    61731        161   0   0    1   0
 17   --listen--        162   0   0   11   0
 17   --listen--      57131   0   0    1   0
Ernie BeekExpertCommented:
Well you should be able to see that in the config. So use show run or show start. All ports not explicitly defined in the access lists should be closed.
SuperTacoConnect With a Mentor Commented:
I third party tool is an easier bet for you try using NMAP (ZenMap GUI) it will give you a readout of all open ports on your network.
Firewall Management 201 with Professor Wool

In this whiteboard video, Professor Wool highlights the challenges, benefits and trade-offs of utilizing zero-touch automation for security policy change management. Watch and Learn!

Ernie BeekExpertCommented:
You can always double check by using something like shields up :
Ernie BeekExpertCommented:
@ikalmar: it that just like a netstat -an ?
yes, very similar.  I didn't recommend it, because i usually like using scanning tools.  either way will work though.
Ernie BeekExpertCommented:
Cool, didn't know that one. Had my learning experience for today :)
Adma1Author Commented:
Thanks everyone for your responses,

Ikalmar: when I run the sh ip sockets command I receive the following error

'xxxx'-GW0#sh ip sockets
% Invalid input detected at '^' marker.

is there a series of commands that I need to run prior to the sh ip sockets command?

tirabytesConnect With a Mentor Commented:
Try: sh control-plane host open-ports

Or you can do it by checking both inbound nat and accesslist on your internet facing interface (if there is any).

sh conf | inc ip nat inside
sh ip nat trans


sh access-list

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.