09-14-2017 07:27 AM - edited 03-08-2019 12:02 PM
We have a ACL applied to the edge port to the internet to block malicous IPs. We also have login-block attempt configs. I will see logs on the router for let's say when I fail to login via ssh, but I was alerted by security they are seeing failed attempts and I confirmed they are via port 443. My question is basically the best way to block stuff like this. Should the ACL be applied to line vty lines? Is this why they are still making it to the router to try and enter creds?
Solved! Go to Solution.
09-26-2017 01:00 AM
I took a look at one of my edge facing devices and pulled some syntax that may help you definitly wont hurt to have it on your devices
the AAA i handcy of you ever go tacacs its the most secure in terms of router , then theres some config backups and source all mgmt traffic off 1 port where you can , and debugging seemed to get me what you were looking for try it out
service tcp-keepalives-in
service timestamps debug datetime msec show-timezone
service timestamps log datetime msec show-timezone
service password-encryption
no service dhcp
service sequence-numbers
security authentication failure rate 10 log
logging console critical
no ip http server
no ip http secure-server
no ip ftp username
no ip ftp password
ip ssh time-out 60
ip ssh authentication-retries 2
ip ssh source-interface x
ip ssh version 2
logging trap debugging
logging source-interface x
logging host x.x.x.x
ntp source x
kron occurrence SaveRunningConfigToStartupSched at 12:00 recurring
policy-list SaveMe
!
kron policy-list SaveMe
cli write
cli write
aaa group server tacacs+ ACSGROUP
server-private x.x.x.x key 7 151F4E36366F237D2A64637F404632483002187F7D
server-private x.x.x.x key 7 1214402D204E045D287C7275607406583642422678
ip vrf forwarding Mgmt-vrf
ip tacacs source-interface x
!
aaa authentication login default group ACSGROUP local enable
aaa authentication enable default group ACSGROUP enable
aaa authorization exec default group ACSGROUP local
aaa accounting exec default start-stop group ACSGROUP
aaa accounting commands 0 default start-stop group ACSGROUP
aaa accounting commands 1 default start-stop group ACSGROUP
aaa accounting commands 15 default start-stop group ACSGROUP
aaa accounting network default start-stop group ACSGROUP
aaa accounting connection default start-stop group ACSGROUP
aaa accounting system default start-stop group ACSGROUP
no ip bootp server
login block-for 300 attempts 10 within 60
login quiet-mode access-class X
archive
log config
hidekeys
path flash:Archive.cfg
maximum 2
write-memory
time-period 1440
!
When i set the logging to debugging and its applied to the wan facing internet i can tcp and udp outside requests being blocked by my acl in logs
Sep 26 06:36:32.105 UTC: %FMANFP-6-IPACCESSLOGP: SIP1: fman_fp_image: list 101 denied tcp 60.251.177.242(45014) -> 195.10.18.250(23), 1 packet
09-26-2017 08:26 AM
09-25-2017 05:39 AM
09-14-2017 07:51 AM
Your VTY and your Edge port should be both locked down with ACLs , unfortunately as its edge facing the internet stopping the attempts is futile , most are automated attacks , the login block though you can prevent same ip over and over again from attempting it by blocking it for a max of 18 hours at a time before it can make anopther attempt
the failed attempts is a good thing as your acl is working and preventing them accessing it or are you saying there actulally getting access through the acl ?
09-14-2017 07:55 AM
No they are not making it in, but a security guyed showed my attempts to login the router via 443. They are able to try as many as they like so the login block-attempts was not preventing them, and also when I do "show log" on the router we only see ACL hits, but no "failed login" by anyone - I only see that if I fail to login via SSH/putty. Is this because our ACL is only applied to the edge port and not line vty lines?
09-14-2017 08:08 AM
09-14-2017 08:17 AM
Ok sounds good. What about how attempts to access the Edge router via 443 ar not limited to login block-for config and are not shown in show log or show login failures? Is this because the ACL is not applied to line vty 0 15?
09-14-2017 08:33 AM
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