cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
9083
Views
7
Helpful
3
Replies

How to log failed telnet attempts?

fisko
Level 1
Level 1

Hello!

How can i log failed telnet acccess on router (old IOS no enhanced login)

I try

logging trap debugging (informational also)

logging MARS IP

snmp-server enable traps tty syslog

snmp-server host IPOF MARS

and  I add router in MARS

but I just get some SNMP messages like serial link down....

REGARDS

3 Replies 3

chalkspray
Level 1
Level 1

Fisko,

The command you're looking for to log telnet or ssh logins would be one of the following depending on your needs:

login on-failure log
login on-success log

That would cover successful or failed logins regardless of whether it was telnet, ssh, or console. So it wouldn't log failed connection attempts to the telnet or ssh port. To do that you would create an access list to deny telnet or ssh traffic and add "log" to the end of the ACL statement to log those also.

Then you need to have your router send syslog messages to MARS.

logging x.x.x.x

logging trap

All of these commands were examples from one of my routers that is running AAA. I'm almost positive that you don't need to have AAA enabled in order to use the "login on-failure" or "login on-success" features, but if you're running recent code and it still isn't working try turning on AAA.

Well as I said in first post...I have old IOS 12.3 not 12.4 that have those enhanced logging functionality...

THANKS FOR THE RESPONSE!

Not applicable

One solution would be to use an ACLs on the VTY with logging.  This will at least get the source IP addresses of all attempted telnet connections.  You can do this by:

1) Create a standard ACL.  Add applicable permit or deny statements based on which traffic you want to all.  To catch failed telnet attempts, add the "log" option to the end of the deny statements.  Example:

     ip access-list standard TELNET-ACL

          permit 192.168.0.3

          permit 192.168.100.0 0.0.0.255

          deny any log

2) Apply the ACL to the VTY interfaces.  Something like this (acl named TELNET-ACL):

     line vty 0 15

      access-class TELNET-ACL in

      transport input telnet

That will create logs that will be sent to MARS, plus it's a good security practice that should be used when possible.

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: