This script pushes configuration of ACL20 to a Cisco devices that are listed in an inventory file. Author: Sergei Ondar Dependencies:
-
Push current admin password:
``` admin privilege 15 secret HIDDEN_PASSWORD ```
-
Push current enable password:
``` enable secret HIDDEN_PASSWORD ```
-
Push current password of last resort:
``` line con 0 password HIDDEN_PASSWORD ```
-
Configure rollback command:
``` archive path {{ dir }} cofnigre terminal revert timer idle 5 ```
-
Remove current ACL20 on the device:
``` no access-list 20 no ip access-list standerd 20 ```
-
Configure new ACL20 on the device:
``` ip access-list standard 20 10 permit 139.65.136.0 0.0.3.255 20 permit 139.65.140.0 0.0.3.255 30 deny any log ```
-
Reset SSH connection
-
Confirm change:
``` configure confirm ```
-
Write running-config to startup-config
``` wr ```
If after configuring new ACL20, a new connection fails, then running-config will be automatically rolled back after 5 minutes.