PAN-OS: Overriding Template Values in a Template Stack

Introduction: Handling Configuration Conflicts

Panorama Template Stacks provide a powerful way to apply layered configurations to groups of firewalls. However, this layering often leads to situations where the same configuration setting (e.g., a specific DNS server, an interface MTU, an NTP server address) is defined in multiple Templates within the same Stack .

PAN-OS uses a clear precedence rule to resolve these conflicts: the value defined in the template placed later (higher up) in the stack order takes precedence and effectively overrides the value(s) defined in template(s) placed earlier (lower down) in the stack.

Understanding and utilizing this override mechanism is key to building modular and maintainable configurations.

You can have a maximum of 8 templates in a stack

The Override Mechanism: Last Setting Wins

How Precedence Works:

    graph TD
        subgraph Panorama
            Stack[Template Stack]
            T1[Template 1 - Base DNS: 8.8.8.8 NTP: pool.ntp.org]
            T2[Template 2 - Override DNS: 10.1.1.1 Syslog: log.internal]
            T3[Template 3 - Specific NTP: ntp.internal Interface: eth1/3 Config]

            Stack -- Contains (Order: 1st) --> T1
            Stack -- Contains (Order: 2nd) --> T2
            Stack -- Contains (Order: 3rd) --> T3

            Stack -- Applied To --> DG[Device Group]
        end

        subgraph ResultingFirewallConfig [Effective Configuration on Firewall]
            DNS_FW[DNS Primary: 10.1.1.1 T2 overrides T1]
            NTP_FW[NTP Server: ntp.internal T3 overrides T1]
            Syslog_FW[Syslog Profile: log.internal From T2]
            Intf_FW[Interface eth1/3 Config From T3]
        end

         DG --> ResultingFirewallConfig

        style Stack fill:#eaf2f8,stroke:#aed6f1,stroke-width:2px
        style T1 fill:#fdebd0,stroke:#f5b041,stroke-width:1px
        style T2 fill:#fdebd0,stroke:#f5b041,stroke-width:1px
        style T3 fill:#fdebd0,stroke:#f5b041,stroke-width:1px
        style DNS_FW fill:#d5f5e3,stroke:#58d68d
        style NTP_FW fill:#d5f5e3,stroke:#58d68d
        style Syslog_FW fill:#d5f5e3,stroke:#58d68d
        style Intf_FW fill:#d5f5e3,stroke:#58d68d

     
Diagram illustrating how later templates (T2, T3) override settings from earlier templates (T1).

Purpose of Overrides:

Configuration Considerations

Managing Overrides

Best Practices for Using Overrides

PCNSE Exam Focus

For the PCNSE exam, regarding template overrides: