Now it's time to run some Ansible Playbooks and Reduce the Attack Surface of the IOS XE box!
The SSH server on IOS XE supports several cryptographic primitives for compatibility reasons. As security-minded network engineers, we must recognize that some are less secure than others. In this task, we will run a playbook that will modify the SSH server to only use highly secure cryptographic primitives. Modern versions of the popular SSH clients (e.g., OpenSSH, putty, SecureCRT) support these primitives.
- View the Cat9K SSH Status. Observe the large number of cryptographic primitives that are options for each algorithm.
- View the SSH Hardening Playbook using cat. Note the following things in the Playbook
- Call to the encrypted vault for authentication credentials
- Usage of cisco.ios.ios_config: and lines:
- IOS XE commands to force SSH to use strong primers
- Now run the playbook. This playbook will ensure that each algorithm uses highly secure primitives. You will be prompted for the vault password, the password is abcd9876.
- View the Cat9K SSH Status After Hardening. Note that the number of enabled cryptographic primitives for each algorithm has significantly decreased compared to the previous configuration. This change has been made on the Cat9K device to ensure that only the strong algorithms are enabled.
- View the Cat9K HTTPS Status. Notice that there are a large number of cipher suites enabled. Please note that the enabled cipher suites have of various categories: 'Recommended', 'Secure', and 'Weak'.
- View the HTTPS Hardening Playbook using cat.
- Run the Harden HTTPs playbook.
- View the Cat9K HTTPS Status After Hardening. Notice that the number of CipherSuites is much less than when we started. Now the ciphersuites we have enabled are 'Recommended' or 'Secure'.
show ip ssh
cat playbooks/01a-config-hard-ssh.yaml
ansible-playbook -i inventories/devnet-switches.yaml playbooks/01a-config-hard-ssh.yaml --ask-vault-pass
show ip ssh
sh ip http server status | sec secure
cat playbooks/01b-config-hard-https.yaml
ansible-playbook -i inventories/devnet-switches.yaml playbooks/01b-config-hard-https.yaml --ask-vault-pass
sh ip http server status | sec secure
Click here to move on to the next section. Optimizing Local Authentication.