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:
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.
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.
vsys1
will be our Shared Gateway VSYS.
vsys2
will be a tenant VSYS (e.g., "Finance").
ethernet1/1
(assigned to
vsys1
).
ethernet1/2
. We will use subinterfaces on
ethernet1/2
for inter-VSYS communication.
ethernet1/2.10
: Assigned to
vsys1
, IP:
10.254.254.1/30
, Zone:
INTERNAL-SHARED
.
ethernet1/2.20
: Assigned to
vsys2
, IP:
10.254.254.2/30
, Zone:
TO-SHAREDGW
.
vsys2
internal network:
192.168.20.0/24
on interface
ethernet1/3
(assigned to
vsys2
), Zone:
FINANCE-LAN
.
vsys2
(or a descriptive name like
Finance-VSYS
).
ethernet1/3
and the subinterface
ethernet1/2.20
later.
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
Interfaces must be assigned to their respective VSYS before they can be configured within that VSYS context.
ethernet1/1
. In the configuration window, set
Virtual System
to
vsys1
. Click
OK
.
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.
ethernet1/3
. Set
Virtual System
to
vsys2
. Click
OK
.
vsys1
(Shared Gateway VSYS)
Switch context to
vsys1
using the Virtual System dropdown at the top right of the WebUI.
ethernet1/1
.
default
or a dedicated
VR-SHARED
). Assign to Security Zone (e.g.,
UNTRUST
).
ethernet1/2
. Click
Add Subinterface
.
10
(becomes
ethernet1/2.10
).
default
or
VR-SHARED
). Assign to Security Zone (e.g.,
INTERNAL-SHARED
).
10.254.254.1
, Netmask:
255.255.255.252
(or
/30
).
vsys2
(Tenant VSYS)
Switch context to
vsys2
using the Virtual System dropdown.
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).
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.
20
(becomes
ethernet1/2.20
).
default
or
VR-FINANCE
). Assign to Security Zone (e.g.,
TO-SHAREDGW
).
10.254.254.2
, Netmask:
255.255.255.252
(or
/30
).
ethernet1/3
.
default
or
VR-FINANCE
). Assign to Security Zone (e.g.,
FINANCE-LAN
).
192.168.20.1/24
.
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 ipset 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.
vsys1
(Shared Gateway VSYS)
Switch context to
vsys1
.
default
or
VR-SHARED
).
Default-Route-INET
0.0.0.0/0
ethernet1/1
(your external interface)
) or select
None
if interface handles gateway (like PPPoE).
vsys2
's internal network:
Route-To-FINANCE-LAN
192.168.20.0/24
(
vsys2
's internal network)
ethernet1/2.10
(
vsys1
's interface connecting to
vsys2
)
10.254.254.2
- IP of
ethernet1/2.20
in
vsys2
)
vsys2
(Tenant VSYS)
Switch context to
vsys2
.
default
or
VR-FINANCE
).
Default-Route-To-SharedGW
0.0.0.0/0
ethernet1/2.20
(
vsys2
's interface connecting to
vsys1
)
10.254.254.1
- IP of
ethernet1/2.10
in
vsys1
)
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-addressinterface 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
vsys2
(Tenant VSYS)
Switch context to
vsys2
.
Allow-Finance-To-Internet
FINANCE-LAN
.
any
(or specific subnets within
FINANCE-LAN
).
TO-SHAREDGW
.
any
.
any
(or specific applications like
ssl
,
web-browsing
).
application-default
.
Allow
.
vsys1
(Shared Gateway VSYS)
Switch context to
vsys1
.
Allow-Tenants-To-Internet
INTERNAL-SHARED
.
any
(or specifically
192.168.20.0/24
if you want to be granular about which tenant networks are allowed).
UNTRUST
.
any
.
any
(or be more specific).
application-default
.
Allow
.
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
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
.
SNAT-Tenants-To-Internet
INTERNAL-SHARED
.
UNTRUST
.
Any
(or specifically
ethernet1/1
).
any
(or list all tenant internal subnets, e.g.,
192.168.20.0/24
). This is important for matching correctly.
any
.
Dynamic IP And Port
.
Interface Address
.
ethernet1/1
(the external interface).
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.
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.
Use these commands after setting the correct VSYS context with `set system setting session-TARGET
show system info
: Verify multi-VSYS mode is active.
show vsys all
: List all configured VSYSs and their IDs.
show interface all
: (Per VSYS) Displays status of all interfaces in the current VSYS.
show routing route
: (Per VSYS) Displays the routing table for the default VR or specified VR.
show session all filter source <ip> destination <ip>
: Check for active sessions.
show session id <session_id>
: For detailed session information, including NAT translation.
test routing fib-lookup virtual-router <vr_name> ip <destination_ip>
: (Per VSYS) Simulates a FIB lookup to see which interface traffic would egress.
show counter global filter packet-filter yes delta yes source <ip> destination <ip>
: (Use with caution, can be verbose) Advanced packet diagnostics.
debug dataplane packet-diag set filter match source <source_ip> destination <destination_ip>
debug dataplane packet-diag set filter on
show counter global filter aspect flow packet-filter yes debug yes delta yes
(to view filtered packets). Remember to turn off debug after use: `debug dataplane packet-diag set filter off`.
VR-SHARED
in
vsys1
,
VR-FINANCE
in
vsys2
) rather than the default VR for better isolation and clarity, especially in complex setups.
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.