event manager applet EDGE_NAT_ROLE event syslog pattern "HSRP-5-STATECHANGE: GigabitEthernet1 Grp *4 state" action 01.0 cli command "enable" action 02.0 cli command "show standby GigabitEthernet1 4" action 03.0 regexp "State is Active" "$_cli_result" action 04.0 cli command "configure terminal" action 05.0 cli command "ip access-list standard INSIDE_NAT" action 06.0 if $_regexp_result eq "1" action 07.0 cli command "no 5" action 08.0 cli command "end" action 08.5 syslog msg "EDGE_NAT_ROLE permits PAT for own active VIP" action 09.0 else action 10.0 cli command "5 deny any" action 11.0 cli command "end" action 12.0 cli command "clear ip nat translation *" action 12.5 syslog msg "EDGE_NAT_ROLE blocks PAT and clears stale aliases" action 13.0 end exit end