Change order of Junos security policies
Lets say I have the following security policies
set security policies from-zone CAMERAS to-zone INTERNET policy CAMERAS-to-INTERNET match source-address any set security policies from-zone CAMERAS to-zone INTERNET policy CAMERAS-to-INTERNET match destination-address any set security policies from-zone CAMERAS to-zone INTERNET policy CAMERAS-to-INTERNET match application any set security policies from-zone CAMERAS to-zone INTERNET policy CAMERAS-to-INTERNET then deny set security policies from-zone CAMERAS to-zone INTERNET policy CAMERAS-to-NTP match source-address any set security policies from-zone CAMERAS to-zone INTERNET policy CAMERAS-to-NTP match destination-address any set security policies from-zone CAMERAS to-zone INTERNET policy CAMERAS-to-NTP match application junos-ntp set security policies from-zone CAMERAS to-zone INTERNET policy CAMERAS-to-NTP match application junos-dns-udp set security policies from-zone CAMERAS to-zone INTERNET policy CAMERAS-to-NTP then permit
Now, I want the CAMERAS-to-NTP policy to be executed before the CAMERAS-to-INTERNET policy.
So I need to do the following:
insert security policies from-zone CAMERAS to-zone INTERNET policy CAMERAS-to-NTP before policy CAMERAS-to-INTERNET
And boom! we are done!