07-27-2012 01:23 PM - edited 03-07-2019 08:01 AM
Hi all,
Since i enabled login failure and success logs on my router i see these messages
Jul 27 06:00:50.084 MST: %SEC_LOGIN-4-LOGIN_FAILED: Login failed [user: root] [S ource: 59.46.193.42] [localport: 22] [Reason: Login Authentication Failed] at 06 :00:50 MST Fri Jul 27 2012
Jul 27 06:00:55.536 MST: %SEC_LOGIN-4-LOGIN_FAILED: Login failed [user: root] [S ource: 59.46.193.42] [localport: 22] [Reason: Login Authentication Failed] at 06 :00:55 MST Fri Jul 27 2012
Jul 27 06:01:00.997 MST: %SEC_LOGIN-4-LOGIN_FAILED: Login failed [user: root] [S ource: 59.46.193.42] [localport: 22] [Reason: Login Authentication Failed] at 06 :01:00 MST Fri Jul 27 2012
Jul 27 06:01:06.445 MST: %SEC_LOGIN-4-LOGIN_FAILED: Login failed [user: root] [S ource: 59.46.193.42] [localport: 22] [Reason: Login Authentication Failed] at 06 :01:06 MST Fri Jul 27 2012
Jul 27 06:01:11.885 MST: %SEC_LOGIN-4-LOGIN_FAILED: Login failed [user: root] [S ource: 59.46.193.42] [localport: 22] [Reason: Login Authentication Failed] at 06 :01:11 MST Fri Jul 27 2012
Seems someone is trying to telnet to my router?
I checked IP it is somewhere in china
Should i apply ACL on router for telnet access?
MAny thanks
MAhesh
Solved! Go to Solution.
07-27-2012 01:35 PM
Mahesh
It is generally accepted as a Best Practice to use an access list to control remote access to your router.
The way you do this is slightly different from the typical access list which is applied to an inteface using the access-group command. To control remote access you use a standard access list applied to the vty lines using the access-class command. The coinfiguration might look something like this.
access-list 22 permit 172.16.2.0 0.0.0.255
line vty 0 4
access-class 22 in
This would only accept remote access requests from 172.16.2, assuming that this was the address space inside your network where you want to permit access. Any attempt from anywhere else would be rejected.
If you want to know about the invalid attempts you could re-write the access list like this
access-list 22 permit 172.16.2.0 0.0.0.255
access-list 22 deny any log
HTH
Rick
07-28-2012 02:14 AM
Hi,
Jul 27 06:01:06.445 MST: %SEC_LOGIN-4-LOGIN_FAILED: Login failed [user: root] [Source: 59.46.193.42] [localport: 22] [Reason: Login Authentication Failed] at 06
This is already ssh.
Regards.
Alain
Don't forget to rate helpful posts.
07-28-2012 04:53 AM
Hi Mahesh,
Yes you can deny the telnet/ssh access towards the router from unauthorized network. Its advised to have only ssh to your router. That might be an attacker who is trying to access your network.
Just you need to allow the specific legacy networks of yours to access the router from outside or you can block entire telnet/ssh access from outside if you want to control only from LAN network.
Its up to you how you want to make your network secured.
Please do rate if the given information helps.
By
Karthik
07-27-2012 01:35 PM
Mahesh
It is generally accepted as a Best Practice to use an access list to control remote access to your router.
The way you do this is slightly different from the typical access list which is applied to an inteface using the access-group command. To control remote access you use a standard access list applied to the vty lines using the access-class command. The coinfiguration might look something like this.
access-list 22 permit 172.16.2.0 0.0.0.255
line vty 0 4
access-class 22 in
This would only accept remote access requests from 172.16.2, assuming that this was the address space inside your network where you want to permit access. Any attempt from anywhere else would be rejected.
If you want to know about the invalid attempts you could re-write the access list like this
access-list 22 permit 172.16.2.0 0.0.0.255
access-list 22 deny any log
HTH
Rick
07-28-2012 07:46 AM
Hi Everyone,
I had ssh enabled already.
Now i have allowed telnet/ssh only from inside of the network.
Thanks Rick for again detailed explanation.
But i was surprised how these days people try to access others network !
Thanks
MAhesh
07-27-2012 11:54 PM
Hi,
Adding to Rick's post, I would strongly suggest using SSH since it's way more secure than Telnet.
Sent from Cisco Technical Support iPhone App
07-28-2012 02:14 AM
Hi,
Jul 27 06:01:06.445 MST: %SEC_LOGIN-4-LOGIN_FAILED: Login failed [user: root] [Source: 59.46.193.42] [localport: 22] [Reason: Login Authentication Failed] at 06
This is already ssh.
Regards.
Alain
Don't forget to rate helpful posts.
07-28-2012 04:04 AM
Hi Alain,
Are you referring that poster already had SSH enabled?
Note that SSH isn't a requirement for IOS enhanced login to work. The syslog only showed a failed SSH attempt was made by a malicious attacker.
Sent from Cisco Technical Support iPhone App
07-28-2012 07:43 AM
Hi johnlloyd,
I have ssh already enabled.
Thanks
MAhesh
07-28-2012 04:53 AM
Hi Mahesh,
Yes you can deny the telnet/ssh access towards the router from unauthorized network. Its advised to have only ssh to your router. That might be an attacker who is trying to access your network.
Just you need to allow the specific legacy networks of yours to access the router from outside or you can block entire telnet/ssh access from outside if you want to control only from LAN network.
Its up to you how you want to make your network secured.
Please do rate if the given information helps.
By
Karthik
07-28-2012 08:19 AM
You've already received some great answers to this. Just a note: Depending on your system you'll probably see a few thousand (or more) of these per month. If you put a sniffer on your external interface you'll see all sorts of "fun" traffic, from explicit attempts to exploit known vulnerabilities to leisurely port scans from multiple sources.
I am not a believer in "security through obscurity", but I did find that moving my ssh port from port 22 to a different port cut the brute force login attempts by 99%+. Evidentally most of the attempts simply focus on the plentiful systems available on port 22. For me the move was less of a security measure than an easy way to log and review brute force attempts on my ssh port.
I strongly recommend taking a day (or more) as an audit session to review your ACL / other filtering capabilities on your Internet-connected interfaces to make sure they are restricted to the extent that is feasible for your network. I also prefer to use key-based ssh login instead of user/pass login just as an additional measure. Of course this does not preclude the need for monitoring and occasional code updates.
Best of luck!
07-28-2012 08:54 AM
Hi Edwin,
Thanks for reply.
Need to know how you changed ssh from port 22 to some other?
Mahesh
07-28-2012 09:03 AM
My mistake - I should have noted that I was not enabling ssh directly to the edge device (Cisco router). Instead I had another machine in a DMZ specifically for ssh access, and was port-forwarding. I just changed the port that I was forwarding.
I did a (very) quick search and did not have success in finding a way to change the port that IOS binds to ssh. It may not be an option, unfortunately.
Best regards, -Ed
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide