Palo Alto Networks Next-Generation Firewalls (NGFWs) not only inspect and control transit traffic passing through them but also generate their own traffic for various operational and security services. This firewall-generated (or firewall-sourced) traffic includes:
By default, the firewall uses its management (MGT) interface for many of these services. However, for services that need to egress through a data plane interface, or when more granular control is required, Service Routes come into play.
There are two main types of service routes in PAN-OS:
This guide focuses in-depth on Destination-Based Service Routes , exploring their purpose, configuration, use cases, and implications within the Palo Alto Networks ecosystem.
Destination-based service routes in Palo Alto Networks firewalls allow administrators to explicitly define the source interface and source IP address that the firewall will use when initiating traffic to a specific external destination IP address. This capability is crucial for scenarios where the firewall's default routing behavior for its own traffic (often via the MGT interface or a data plane default route) is not suitable or needs to be overridden for particular external services.
Key characteristics:
ethernet1/1
,
ae1
) or the MGT interface, and a source IP address associated with that interface.
Device > Setup > Services > Service Route Configuration > Destination
. These settings are global to the firewall device and apply to all Virtual Systems (VSYS) if configured. They cannot be configured on a per-VSYS basis.
Destination-based service routes address several specific routing challenges for firewall-generated traffic:
203.0.113.75
to egress via
ethernet1/4
using IP
10.10.40.5
.
198.51.100.100
) must use ISP-B connected via
ethernet1/2
(associated with VR-ISP-B), a destination service route can enforce this.
Configuring destination-based service routes involves specifying the target destination IP and the desired source interface and IP address on the firewall.
198.51.100.10/32
or simply
198.51.100.10
). Network addresses with masks other than /32 (IPv4) or /128 (IPv6) are not typically used here as it's for specific destinations.
Device > Setup > Services > Service Route Configuration > Destination
. Know the parameters required: Destination IP, Source Interface, and Source Address.
You can also configure destination-based service routes using PAN-OS CLI commands.
configure set deviceconfig system service route destination <destination_ip_address> interface <source_interface_name> source-address <source_ip_address> # Example for IPv4: set deviceconfig system service route destination 198.51.100.50 interface ethernet1/1 source-address 10.1.1.254 # Example for IPv6: set deviceconfig system service route destination 2001:db8::100 interface ethernet1/2 source-address 2001:db8:0:2::1 # To view configured destination service routes: show deviceconfig system service route destination # To remove a destination service route: delete deviceconfig system service route destination <destination_ip_address> # After configuration, commit the changes: commit
Replace
<destination_ip_address>
,
<source_interface_name>
(e.g.,
ethernet1/1
,
mgt
), and
<source_ip_address>
with your specific values. The
source-address
should be an IP configured on the chosen
source-interface
.
Understanding how PAN-OS selects an egress path for its own traffic is critical when implementing any type of service route. For traffic generated by the firewall to an external destination, PAN-OS evaluates routing options in a specific order:
Simplified decision flow for routing firewall-generated traffic in PAN-OS. This illustrates the precedence of MGT interface routing, destination-based service routes, standard service routes, and finally, the data plane FIB.
X.X.X.X
will override a standard service route (e.g., for "DNS") if the DNS server's IP is
X.X.X.X
. The most specific match (destination IP) wins. If multiple service routes (standard or destination-based) could potentially apply, the most specific one for the *destination IP* takes precedence if it's a destination-based route.
Monitor > Logs > Traffic
) to verify the source IP and egress interface for firewall-generated traffic. Filter by the firewall's IP addresses as source or destination.
Monitor > Logs > System
).
test routing fib-lookup ip <destination_ip> virtual-router <vr_of_the_source_interface>
to see how the firewall would route to the destination from the perspective of the VR that owns the service route's source interface. Note: this command checks the data plane FIB, service routes are a pre-FIB decision for firewall's own traffic. A better test for firewall-sourced traffic is often to generate the traffic (e.g.,
ping source <service_route_source_ip> host <destination_ip>
) and check session details.
Monitor > Packet Capture
).
Example scenario: Firewall uses a destination-based service route to send syslog traffic to `203.0.113.50` via `ethernet1/3` (ISP-B), while standard service routes direct Palo Alto Networks updates via `ethernet1/2` (ISP-A). This overrides the default route in VR-UNTRUST for the specific syslog destination.
Several CLI commands are invaluable for verifying and troubleshooting service route configurations and their effects on firewall-generated traffic.
Command | Purpose and Usage |
---|---|
show deviceconfig system service route destination
|
Displays all configured destination-based service routes. Shows destination IP, source interface, and source IP. |
show deviceconfig system service route service all
|
Displays all configured standard service routes (for predefined services). Useful to see the complete picture of service routing. |
show session all filter source <firewall_service_route_source_ip> destination <external_destination_ip>
|
Checks active sessions originating from the firewall using the specified service route source IP to the target destination. Verifies if traffic is indeed using the configured path. |
show session id <session_id>
|
Provides detailed information about a specific session, including ingress/egress interface and source/destination IPs. Useful after identifying a relevant session ID. |
test routing fib-lookup ip <destination_ip> virtual-router <vr_name>
|
Shows how the specified Virtual Router would route traffic to the destination IP. While service routes override this for firewall-generated traffic, it's useful for understanding the underlying data plane routing. The
<vr_name>
should be the VR associated with the service route's source interface.
|
ping source <service_route_source_ip> host <destination_ip>
|
Tests connectivity from the firewall using the specific source IP defined in the service route. This is a direct way to test if the service route is functioning for ICMP. |
show counter global filter delta yes aspect mgmt_plane_routing_decision
(May vary by PAN-OS version or require debug)
|
Can show counters related to routing decisions made by the management plane. More advanced and might require TAC assistance for interpretation. |
debug routing pbf basic yes
debug routing pbf detail yes
(Followed by traffic generation and then
undebug all
)
|
While PBF is for transit traffic, some routing debugs can provide insights into how the firewall is processing path selection. Use with caution in production. Service route decisions are usually made before PBF evaluation for firewall-originated traffic. More specific debugs for the management plane routing (
debug management-server process general routing detail
or similar, depending on PAN-OS version and process) might be needed for deep dives, often guided by Palo Alto Networks TAC.
|
show deviceconfig system service route destination
and how to interpret its output. Understanding how to use
ping source
for verification is also valuable.
A simplified troubleshooting flowchart for destination-based service routes on Palo Alto Networks firewalls.
For the Palo Alto Networks Certified Network Security Engineer (PCNSE) exam, a solid understanding of destination-based service routes is essential. Key points to focus on include:
Device > Setup > Services
). Not per-VSYS.
set deviceconfig system service route destination...
.
show deviceconfig system service route destination
and
ping source
.