Cisco IOS Security Template
Cisco IOS Security Template
If you have enable password, instead of an enable secret, the secret takes precedence over the
password.
Each individual user should have their own secret – avoid group access to have more
accountability of who accessed the system.
1. Configure the console interface with local database authentication and a timeout of 5 minutes
The transport input none command is the default for later IOS releases and in those cases no
longer be configured.
Generate the router key with the command: crypto key generate rsa Note that the command
is NOT performed in configuration mode. A longer key will be less subject to a brute-force
attack so a minimum key length of 1024 bits is recommended
3. Configure a filter to allow only the trusted hosts to have SSH access. Note that all tries are
logged to have an audit trail of all access to the router.
4. Configure the VTY ports with local database authentication, timeout of 5 minutes and to only
allow SSH from specific IP addresses.
In the above example, note the tricky way to completely disable login. First you enable local
login, but do not assign a password, which will disallow anyone from logging in. If you do 'no
login', it will allow access to everyone without a password.
Configuring Logging
2. Configure fallback local logging as backup to syslog server and do not log anything to console
to save CPU cycles
4. Configure the loopback0 interface as the source of our log messages. This is often used for
routing protocols as well. Select an IP address that uniquely identifies this router. One trick is to
allocate a private address space subnet for use to provide addresses for loopback interfaces.
5. Configure the syslog logging host and capture all of the logging output with FACILITY LOCAL5.
Test logging by trying to connect to the router. Check the local buffer logging information by
using the command: show buffer
6. Synchronize the clocks with a local (trusted and authenticated) NTP server. When
authenticating between an NTP client (the router) and server, the configured key must be the
same on both the router and the NTP server.
1. Configure the filter which only allows SNMP access to specific hosts
2. Configure SNMP to have READ-ONLY access and treat the COMMUNITY string as a password -
keep it difficult to guess.
router (config)# snmp-server community <COMMUNITY-string> RO 20
2. Disable services which can be used for reconnaissance attempts or other attacks:
3.Disable services on an interface level which can be used for malicious behavior:
1.Login banner
2. Information to users
The main one to watch out for is that certain debugging will not work
for packets that are fast switched. I have spent many unhappy hours
struggling unsuccessfully to get the information that I wanted before
I realised what the problem was.
ip ssh version 2
line vty 0 4 (Enabling SSH in Virtual terminal)
transport input ssh
Next of all we need to enable SSH on the appropriate interface(s) and address(es)
-----------------------------------------------
Using SSH Secure Shell 3.2.9
Connection tab
Host name: 10.16.0.254
User name: admin
Port number: 22
<default> on all the rest
Profile Properties (Edit Profile)
Cipher list tab
Make sure DES is checked
Authentication tab
Make sure Password method is moved to the top
At the bottom, check enable for SSH2 and SSH1, but not agent forwarding
I have this setup working just fine on PIX w/ 6.35, PIX with 7.0(6), ASA with 7.22 and
ASA with 8.0