access-list 150 permit 10.1.1.0 0.0.0.255 any eq telnet
line vty 0 4
access-class 150 in
This will permit only telnet connections from the 10.1.1.0 subnet. I had problems using the actual router address in the destination field in the access list, so used the any keyword.
Another useful command to apply to the vty ports, transport input telnet, this limits what protocols can be used.
If it's applied under line vty 0 4 it applies to telnet. If you want to block those other services then apply the access list under the ethernet and WAN ports.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.