Configuring Shared Gateway with Palo Alto Networks Multi-VSYS Implementation

Palo Alto Networks Next-Generation Firewalls (NGFWs) offer powerful virtualization capabilities through Multiple Virtual Systems (multi-VSYS). This feature allows a single physical firewall to be partitioned into multiple independent, logical firewalls, each with its own discrete administrative domain, security policies, interfaces, and routing instances. A common and highly practical use case within a multi-VSYS environment is the configuration of a **Shared Gateway**. This allows multiple tenant VSYS instances to share common resources, most notably an internet connection, managed by a dedicated Shared Gateway VSYS. This guide provides a comprehensive walkthrough of the concepts, design considerations, and configuration steps (both GUI and CLI) for implementing a Shared Gateway on a Palo Alto Networks firewall.
PCNSE/PCNSA Exam Note (Palo Alto Networks): Understanding multi-VSYS and Shared Gateway configurations is critical for the PCNSE exam. Expect questions on VSYS creation, inter-VSYS routing, traffic flow, NAT implementation in shared environments, and troubleshooting. Familiarity with both GUI and CLI configurations is beneficial.

1. Understanding VSYS and Shared Gateway in Palo Alto Networks

1.1. Virtual Systems (VSYS)

On Palo Alto Networks firewalls, a Virtual System (VSYS) is a logical firewall instance that operates independently within a single physical firewall. Each VSYS maintains its own:

VSYS is primarily used for network segmentation, enabling multi-tenancy where different departments, customers, or security zones can be isolated with distinct security postures, all while leveraging a shared hardware platform.

CRITICAL (Palo Alto Networks): Enabling multi-VSYS mode on a Palo Alto Networks firewall requires a system reboot. Plan this during a maintenance window as it will interrupt traffic processing.

1.2. Shared Gateway Concept

A Shared Gateway configuration in a Palo Alto Networks multi-VSYS environment designates one VSYS (often referred to as the "Shared VSYS" or "Gateway VSYS," e.g., vsys1 by default or a custom-named one like vsys-shared ) to provide access to common resources for other "tenant" VSYS instances. The most common shared resource is internet access. Instead of each tenant VSYS having its own dedicated external interface and public IP address, they route their internet-bound traffic through the Shared Gateway VSYS.

Benefits of using a Shared Gateway:

Figure 1: High-level architecture of a Palo Alto Networks Multi-VSYS environment with a Shared Gateway. The Shared Gateway VSYS handles external connectivity, while tenant VSYSs connect to it via inter-VSYS links.

Figure 1: High-level architecture of a Palo Alto Networks Multi-VSYS environment with a Shared Gateway. The Shared Gateway VSYS handles external connectivity, while tenant VSYSs connect to it via inter-VSYS links.

2. Prerequisites and Design Considerations

Gotcha! (Palo Alto Networks): A common pitfall is forgetting to configure return routes in the Shared Gateway VSYS's virtual router pointing back to the internal networks of the tenant VSYSs. Without these, reply traffic will not reach the originating clients in the tenant VSYSs.

3. Configuration Steps: Enabling Multi-VSYS Mode

Before configuring a Shared Gateway, the firewall must be in multi-VSYS mode.

3.1. GUI Steps: Enable Multi-VSYS Mode

  1. Navigate to Device > Setup > Management .
  2. Click the gear icon next to General Settings to edit.
  3. In the General Settings dialog, check the Multiple Virtual Systems Capability box.
  4. Click OK .
  5. A warning will appear stating that a reboot is required. Click OK or Yes .
  6. Commit the changes. The firewall will prompt for a reboot. Proceed with the reboot.

3.2. CLI Steps: Enable Multi-VSYS Mode

configure
set system setting multi-vsys on
commit
request restart system

After the reboot, the firewall will operate in multi-VSYS mode. You can then proceed to create and configure VSYS instances.

4. Configuring the Shared Gateway and Tenant VSYSs

Let's assume:
PCNSE/PCNSA Exam Note (Palo Alto Networks): For the exam, be clear on which VSYS owns which interfaces and how inter-VSYS routing is established. The concept of using subinterfaces on a common physical link for inter-VSYS communication is a typical scenario.

4.1. Create Tenant VSYS (e.g., vsys2) - GUI

  1. Navigate to Device > Virtual Systems .
  2. Click Add at the bottom.
  3. Name: vsys2 (or a descriptive name like Finance-VSYS ).
  4. Display Name: A user-friendly name.
  5. Interfaces: Initially, you might not assign interfaces here if you plan to do it from the Network tab later. Or, you can pre-assign interfaces that will exclusively belong to this VSYS. For our example, we will assign ethernet1/3 and the subinterface ethernet1/2.20 later.
  6. Configure other VSYS-specific settings (DNS, permitted protocols, etc.) as needed.
  7. Click OK .

4.2. Create Tenant VSYS (e.g., vsys2) - CLI

configure
set vsys vsys2 display-name Finance-VSYS
# Add other vsys specific settings as needed
# Example: set vsys vsys2 setting dns-proxy primary-dns 8.8.8.8
exit

4.3. Configure Network Interfaces - GUI

Interfaces must be assigned to their respective VSYS before they can be configured within that VSYS context.

4.3.1. Assign Interfaces to VSYS (Global Context)

  1. Navigate to Network > Interfaces > Ethernet .
  2. Select ethernet1/1 . In the configuration window, set Virtual System to vsys1 . Click OK .
  3. Select ethernet1/2 . This physical interface will host subinterfaces for inter-VSYS links. It does not need to be assigned to a VSYS at the parent level if only its subinterfaces are used.
  4. Select ethernet1/3 . Set Virtual System to vsys2 . Click OK .

4.3.2. Configure Interfaces in vsys1 (Shared Gateway VSYS)

Switch context to vsys1 using the Virtual System dropdown at the top right of the WebUI.

  1. External Interface (ethernet1/1):
    • Navigate to Network > Interfaces > Ethernet . Select ethernet1/1 .
    • Interface Type: Layer3.
    • Config Tab: Assign to Virtual Router (e.g., default or a dedicated VR-SHARED ). Assign to Security Zone (e.g., UNTRUST ).
    • IPv4 Tab: Assign IP address (e.g., DHCP client or static IP from ISP).
    • Click OK .
  2. Inter-VSYS Subinterface (ethernet1/2.10):
    • Navigate to Network > Interfaces > Ethernet . Select ethernet1/2 . Click Add Subinterface .
    • Interface Name / Tag: 10 (becomes ethernet1/2.10 ).
    • Interface Type: Layer3.
    • Config Tab: Assign to Virtual Router (e.g., default or VR-SHARED ). Assign to Security Zone (e.g., INTERNAL-SHARED ).
    • IPv4 Tab: IP Address: 10.254.254.1 , Netmask: 255.255.255.252 (or /30 ).
    • Click OK .

4.3.3. Configure Interfaces in vsys2 (Tenant VSYS)

Switch context to vsys2 using the Virtual System dropdown.

  1. Inter-VSYS Subinterface (ethernet1/2.20):
    • Navigate to Network > Interfaces > Ethernet . Select ethernet1/2 (it should be available if not assigned to a VSYS at parent level, or if subinterface assignment is allowed across VSYS from parent).
      Gotcha! (Palo Alto Networks): For subinterfaces on the same physical port to be in different VSYS, the parent physical interface ( ethernet1/2 in this case) should typically remain unassigned to any specific VSYS at its top-level configuration or be configured in a way that allows subinterface distribution. Alternatively, use separate physical interfaces or an Aggregate Ethernet (AE) interface whose members are distributed or subinterfaced per VSYS. The most common method is that the parent interface is not assigned to any VSYS if its subinterfaces are to be distributed.
    • Click Add Subinterface .
    • Interface Name / Tag: 20 (becomes ethernet1/2.20 ).
    • Interface Type: Layer3.
    • Config Tab: Assign to Virtual Router (e.g., default or VR-FINANCE ). Assign to Security Zone (e.g., TO-SHAREDGW ).
    • IPv4 Tab: IP Address: 10.254.254.2 , Netmask: 255.255.255.252 (or /30 ).
    • Click OK .
  2. Internal LAN Interface (ethernet1/3):
    • Navigate to Network > Interfaces > Ethernet . Select ethernet1/3 .
    • Interface Type: Layer3.
    • Config Tab: Assign to Virtual Router (e.g., default or VR-FINANCE ). Assign to Security Zone (e.g., FINANCE-LAN ).
    • IPv4 Tab: IP Address: 192.168.20.1/24 .
    • Click OK .

4.4. Configure Network Interfaces - CLI

First, ensure you are in the correct VSYS context or specify VSYS for interface assignment. Interface assignment to a VSYS is a global configuration, not per-VSYS context.

configure
// Global: Assign physical interfaces to VSYS
set network interface ethernet ethernet1/1 vsys vsys1
set network interface ethernet ethernet1/3 vsys vsys2
// Note: ethernet1/2 (parent for subinterfaces) is not directly assigned to a VSYS

// Switch to vsys1 context for its interface configurations
set system setting session-TARGET vsys1

// Configure vsys1 interfaces
set network interface ethernet ethernet1/1 layer3 ip 
set network interface ethernet ethernet1/1 layer3 interface-management-profile 
set network virtual-router default interface ethernet1/1
set zone UNTRUST network layer3 ethernet1/1

set network interface ethernet ethernet1/2.10 layer3 ip 10.254.254.1/30
set network interface ethernet ethernet1/2.10 layer3 interface-management-profile 
set network virtual-router default interface ethernet1/2.10  // Assuming 'default' VR in vsys1
set zone INTERNAL-SHARED network layer3 ethernet1/2.10

// Switch to vsys2 context for its interface configurations
set system setting session-TARGET vsys2

// Configure vsys2 interfaces
set network interface ethernet ethernet1/2.20 layer3 ip 10.254.254.2/30
set network interface ethernet ethernet1/2.20 layer3 interface-management-profile 
set network virtual-router default interface ethernet1/2.20 // Assuming 'default' VR in vsys2
set zone TO-SHAREDGW network layer3 ethernet1/2.20

set network interface ethernet ethernet1/3 layer3 ip 192.168.20.1/24
set network interface ethernet ethernet1/3 layer3 interface-management-profile 
set network virtual-router default interface ethernet1/3
set zone FINANCE-LAN network layer3 ethernet1/3

// Return to global or default vsys context if needed
set system setting session-TARGET none
exit
Figure 2: Logical inter-VSYS connectivity showing interfaces, zones, and virtual routers. Traffic from FINANCE-LAN routes via VR-FINANCE to eth1/2.20, then to eth1/2.10 in VR-SHARED, and finally out via eth1/1.

Figure 2: Logical inter-VSYS connectivity showing interfaces, zones, and virtual routers. Traffic from FINANCE-LAN routes via VR-FINANCE to eth1/2.20, then to eth1/2.10 in VR-SHARED, and finally out via eth1/1.

4.5. Configure Virtual Routers and Static Routes - GUI

4.5.1. In vsys1 (Shared Gateway VSYS)

Switch context to vsys1 .

  1. Navigate to Network > Virtual Routers . Select your VR (e.g., default or VR-SHARED ).
  2. Go to Static Routes > IPv4 . Click Add .
    • Name: Default-Route-INET
    • Destination: 0.0.0.0/0
    • Interface: ethernet1/1 (your external interface)
    • Next Hop: IP Address ( ) or select None if interface handles gateway (like PPPoE).
    • Click OK .
  3. Add a static route back to vsys2 's internal network:
    • Name: Route-To-FINANCE-LAN
    • Destination: 192.168.20.0/24 ( vsys2 's internal network)
    • Interface: ethernet1/2.10 ( vsys1 's interface connecting to vsys2 )
    • Next Hop: IP Address ( 10.254.254.2 - IP of ethernet1/2.20 in vsys2 )
    • Click OK .

4.5.2. In vsys2 (Tenant VSYS)

Switch context to vsys2 .

  1. Navigate to Network > Virtual Routers . Select your VR (e.g., default or VR-FINANCE ).
  2. Go to Static Routes > IPv4 . Click Add .
    • Name: Default-Route-To-SharedGW
    • Destination: 0.0.0.0/0
    • Interface: ethernet1/2.20 ( vsys2 's interface connecting to vsys1 )
    • Next Hop: IP Address ( 10.254.254.1 - IP of ethernet1/2.10 in vsys1 )
    • Click OK .

4.6. Configure Virtual Routers and Static Routes - CLI

configure

// Switch to vsys1 context
set system setting session-TARGET vsys1
set network virtual-router default routing-table ip static-route Default-Route-INET destination 0.0.0.0/0 nexthop ip-address  interface ethernet1/1
set network virtual-router default routing-table ip static-route Route-To-FINANCE-LAN destination 192.168.20.0/24 nexthop ip-address 10.254.254.2 interface ethernet1/2.10

// Switch to vsys2 context
set system setting session-TARGET vsys2
set network virtual-router default routing-table ip static-route Default-Route-To-SharedGW destination 0.0.0.0/0 nexthop ip-address 10.254.254.1 interface ethernet1/2.20

// Return to global context
set system setting session-TARGET none
exit

4.7. Configure Security Policies - GUI

4.7.1. In vsys2 (Tenant VSYS)

Switch context to vsys2 .

  1. Navigate to Policies > Security . Click Add .
  2. Name: Allow-Finance-To-Internet
  3. Source Tab:
    • Source Zone: Add FINANCE-LAN .
    • Source Address: any (or specific subnets within FINANCE-LAN ).
  4. Destination Tab:
    • Destination Zone: Add TO-SHAREDGW .
    • Destination Address: any .
  5. Application Tab: any (or specific applications like ssl , web-browsing ).
  6. Service/URL Category Tab: application-default .
  7. Actions Tab:
    • Action: Allow .
    • Optionally, assign Security Profiles (Antivirus, Anti-Spyware, etc.). For a Shared Gateway setup, these profiles are often more effectively applied in the Shared Gateway VSYS for centralized control over internet traffic.
  8. Click OK .

4.7.2. In vsys1 (Shared Gateway VSYS)

Switch context to vsys1 .

  1. Navigate to Policies > Security . Click Add .
  2. Name: Allow-Tenants-To-Internet
  3. Source Tab:
    • Source Zone: Add INTERNAL-SHARED .
    • Source Address: any (or specifically 192.168.20.0/24 if you want to be granular about which tenant networks are allowed).
  4. Destination Tab:
    • Destination Zone: Add UNTRUST .
    • Destination Address: any .
  5. Application Tab: any (or be more specific).
  6. Service/URL Category Tab: application-default .
  7. Actions Tab:
    • Action: Allow .
    • Profile Setting: Assign relevant Security Profiles (Antivirus, Anti-Spyware, URL Filtering, WildFire Analysis, etc.) to inspect traffic to/from the internet.
  8. Click OK .
CRITICAL (Palo Alto Networks): Security policies in both the tenant VSYS (allowing traffic towards the Shared Gateway) and the Shared Gateway VSYS (allowing traffic from tenants to the internet, and applying internet-facing security) are essential. Missing either will block traffic.

4.8. Configure Security Policies - CLI

configure

// Switch to vsys2 context
set system setting session-TARGET vsys2
set vsys vsys2 rulebase security rules Allow-Finance-To-Internet from FINANCE-LAN to TO-SHAREDGW source any destination any application any service application-default action allow

// Switch to vsys1 context
set system setting session-TARGET vsys1
set vsys vsys1 rulebase security rules Allow-Tenants-To-Internet from INTERNAL-SHARED to UNTRUST source any destination any application any service application-default action allow profile-setting group  // Example

// Return to global context
set system setting session-TARGET none
exit

4.9. Configure NAT Policy (Source NAT) in vsys1 - GUI

Typically, outbound Source NAT is performed in the Shared Gateway VSYS ( vsys1 ) to translate private IP addresses from tenant networks to the public IP address of the Shared Gateway's external interface.

Switch context to vsys1 .

  1. Navigate to Policies > NAT . Click Add .
  2. General Tab:
    • Name: SNAT-Tenants-To-Internet
  3. Original Packet Tab:
    • Source Zone: Add INTERNAL-SHARED .
    • Destination Zone: Add UNTRUST .
    • Destination Interface: Any (or specifically ethernet1/1 ).
    • Source Address: any (or list all tenant internal subnets, e.g., 192.168.20.0/24 ). This is important for matching correctly.
    • Destination Address: any .
  4. Translated Packet Tab:
    • Source Address Translation:
      • Translation Type: Dynamic IP And Port .
      • Address Type: Interface Address .
      • Interface: ethernet1/1 (the external interface).
      • IP Address: Select the specific IP if the interface has multiple, or leave as is if single.
  5. Click OK .
Gotcha! (Palo Alto Networks): Ensure the NAT policy in the Shared Gateway VSYS correctly identifies the source addresses as they appear *after* any NAT performed in the tenant VSYS (though typically, tenant VSYSs would not NAT traffic destined for the Shared Gateway). The source address in the NAT rule should match the traffic arriving on the Shared Gateway's internal-facing interface from the tenants.

4.10. Configure NAT Policy (Source NAT) in vsys1 - CLI

configure

// Switch to vsys1 context
set system setting session-TARGET vsys1
set vsys vsys1 rulebase nat rules SNAT-Tenants-To-Internet from INTERNAL-SHARED to UNTRUST source [ 192.168.20.0/24 ] destination any service any source-translation dynamic-ip-and-port interface-address interface ethernet1/1

// Return to global context
set system setting session-TARGET none
exit

Note: In the CLI `source` field for NAT, list the actual original source IPs/subnets from the tenant networks.

4.11. Commit Changes

After all configurations, commit the changes to the firewall.

GUI: Click Commit at the top right, then Commit again.

CLI:

commit

Figure 3: Simplified packet flow from a client in a tenant VSYS (vsys2) to the Internet via the Shared Gateway VSYS (vsys1). This illustrates routing hops and zone transitions.

Figure 3: Simplified packet flow from a client in a tenant VSYS (vsys2) to the Internet via the Shared Gateway VSYS (vsys1). This illustrates routing hops and zone transitions.

5. Verification and Troubleshooting

5.1. GUI Verification

5.2. CLI Verification and Troubleshooting

Use these commands after setting the correct VSYS context with `set system setting session-TARGET ` or by specifying VSYS in the command if supported globally.

PCNSE/PCNSA Exam Note (Palo Alto Networks): For the PCNSE, knowing how to interpret `show session all` and `show session id ` output is crucial for troubleshooting NAT and policy issues in multi-VSYS environments. Understanding how to verify routing (`show routing route`, `test routing fib-lookup`) in the correct VSYS context is also key.

6. Palo Alto Networks Best Practices for Shared Gateway

Figure 4: Palo Alto Networks Shared Gateway Configuration Workflow. This outlines the general sequence of steps for setting up the environment.

Figure 4: Palo Alto Networks Shared Gateway Configuration Workflow. This outlines the general sequence of steps for setting up the environment.

By following these guidelines and steps, you can effectively implement a Shared Gateway solution using Palo Alto Networks multi-VSYS capabilities, providing secure and efficient shared internet access for multiple logical firewall instances.

PCNSE Knowledge Check: Palo Alto Networks Shared Gateway with Multi-VSYS

1. Which Palo Alto Networks firewall mode is a prerequisite for configuring a Shared Gateway that serves multiple tenant virtual systems?





2. In a typical Palo Alto Networks Shared Gateway configuration, where is the Source NAT (SNAT) policy for outbound internet traffic from tenant VSYSs primarily configured?





3. What is the primary purpose of configuring static routes in a tenant VSYS when using a Shared Gateway for internet access on a Palo Alto Networks firewall?





4. When configuring inter-VSYS communication for a Shared Gateway on a Palo Alto Networks firewall, how are tenant VSYSs typically connected to the Shared Gateway VSYS?





5. Which of the following CLI commands is used on a Palo Alto Networks firewall to switch the command-line context to a specific virtual system?





6. A Palo Alto Networks firewall is configured with `vsys1` as a Shared Gateway and `vsys2` as a tenant. `vsys2` has an internal network 10.10.10.0/24. The inter-VSYS link between `vsys1` and `vsys2` uses IPs 172.16.0.1/30 (vsys1 side) and 172.16.0.2/30 (vsys2 side). What static route configuration is essential in `vsys1` for return traffic to reach clients in `vsys2`?





7. What is a potential consequence of enabling "Multiple Virtual Systems Capability" on a Palo Alto Networks firewall?





8. In a Palo Alto Networks Shared Gateway setup, security policies are required in which VSYS instances to allow traffic from a tenant's LAN to the internet?





9. Which Palo Alto Networks management platform is highly recommended for managing complex multi-VSYS environments, including Shared Gateway configurations?





10. When assigning a physical interface or subinterface to a specific VSYS on a Palo Alto Networks firewall, where is this assignment typically made?





11. What is the primary benefit of using subinterfaces on a single physical port for inter-VSYS links in a Palo Alto Networks Shared Gateway setup?





12. If users in a tenant VSYS cannot access the internet through a Shared Gateway, but internal routing within the tenant VSYS is working, what is a common area to check first in the Shared Gateway VSYS?





13. In Palo Alto Networks terminology, which of these elements are distinctly maintained per VSYS?





14. You are troubleshooting a Palo Alto Networks Shared Gateway. Traffic from a tenant VSYS reaches the Shared Gateway VSYS but does not get NATed to the external interface IP. What CLI command within the Shared Gateway VSYS context would be most helpful to verify if the session is being processed for NAT?





15. When configuring a Layer 3 subinterface for an inter-VSYS link on a Palo Alto Networks firewall, what other network object must it be associated with within its VSYS to participate in routing?





16. What is the purpose of defining a Security Zone for an inter-VSYS link interface (e.g., `INTERNAL-SHARED` in the Shared Gateway VSYS or `TO-SHAREDGW` in the tenant VSYS)?





17. A tenant VSYS needs to access a shared service (e.g., a DNS server 172.16.100.10) hosted directly within the Shared Gateway VSYS's network. What configuration is needed in the tenant VSYS, assuming its default route already points to the Shared Gateway?





18. When configuring a Source NAT policy in the Shared Gateway VSYS using "Dynamic IP and Port" with an "Interface Address", what PAN-OS feature is primarily being leveraged for address translation?





19. What is a key consideration regarding subscription licenses (e.g., Threat Prevention, URL Filtering) in a multi-VSYS Shared Gateway environment on Palo Alto Networks firewalls?





20. If you assign a physical interface, say `ethernet1/5`, directly to `vsys1`, can `vsys2` then use a subinterface like `ethernet1/5.10`?