Thursday, 31 July 2025

swap mem 100% used on palo 400 series 450, 455

https://knowledgebase.paloaltonetworks.com/KCSArticleDetail?id=kA14u000000sYzBCAU&lang=en_US%E2%80%A9


Palo on gave 400 series 1mb swap which is full when the device is on.

Swap (and other memory) can be cached/buffered for the kernel. Its not really used but ready to be used, it can be reclaimed by the system when needed.

Monitor physical memory instead (available memory is what you want to look at)


show system resources


Thursday, 17 July 2025

hardening anyconnect ssl on cisco secure firewall 7.7

Hardening anyconnect connections.

https://www.cisco.com/c/en/us/support/docs/security/secure-client/221880-implement-hardening-measures-for-secure.html


Service access object (geo block anyconnect):

https://www.cisco.com/c/en/us/support/docs/security/secure-firewall-threat-defense/222810-configure-geolocation-based-policies-for.html


Auto shun (flex config)

https://www.cisco.com/c/en/us/support/docs/security/secure-firewall-threat-defense/222383-configure-threat-detection-for-remote-ac.html#toc-hId--1375473333

  • show shun [ip_address]

Shows shunned hosts, including those shunned automatically by threat detection for VPN services, or manually using the shun command. You can optionally limit the view to a specified IP address.

  • no shun ip_address [interface if_name]

Removes a shun applied to the specified IP address.

If an IP address is shunned on multiple interfaces and no specific interface is mentioned, the command removes the shun from only one interface. The selection of this interface is based on a route lookup for the shunned IP address. To remove the shun from additional interfaces, you must explicitly specify the interface.

  • clear shun
Removes the shun from all IP addresses and all interfaces.

Keepout (disable web interface) - users won't be able to download client from the firewall. It will need to be deployed by OSD tool.

https://youtu.be/mNmI34oWOys?si=-Jk_nWzVtnNAOn7u


Threat detection service remote-access-authenticaiton hold-down 15 threshold 5


hold down - how long after the last failed attempt when new failures are counted 

threshold - number of failed auths, if we fail login with in 10 times inside 2 minuets


**** Flex config objects

*** Threat detect ON

threat-detection service invalid-vpn-access

threat-detection service remote-access-client-initiations hold-down 10 threshold 20

threat-detection service remote-access-authentication hold-down 10 threshold 20


*** Threat detect OFF

no threat-detection service remote-access-client-initiations

no threat-detection service remote-access-authentication

no threat-detection service invalid-vpn-access


*** Without CSD

tunnel-group DefaultWEBVPNGroup webvpn-attributes

without-csd


*** With CSD

tunnel-group DefaultWEBVPNGroup webvpn-attributes

without-csd


*** Disable anyconnect webpage

webvpn

keepout "503 Service Unavailable"


*** Enable anyconnect webpage

webvpn

no keepout "503 Service Unavailable"


Show commands:

show threat-detection service remote-access-authentication

show threat-detection service remote-access-client-initiations

show threat-detection service invalid-vpn-access


Logs locations in FMC:

Some of them change depending on version of interface 

Cog (top right) > monitoring > syslog

Monitoring → VPN → Remote Access (anyconnect)

Analysis → Connections → Events (won't show auth success/failure here)

Health → Events (shows cpu/memory issues)

There is a unified log as well


Log level

FMC GUI → Devices → Platform Settings

syslog > logging


Syslog messages:

%ASA-6-113004: AAA user authenticated successfully

%ASA-6-113005: AAA user authentication Rejected

%ASA-4-722051: Group <group> User <user> IP <ip> Session connected

%ASA-6-722041: Session disconnected (reason...)



***

Enable Access Control Logging for VPN User Traffic

On the rule that allows anyconnect in (log at start/log at end/ send to FMC) (still won't show login attempts)



search messsage *x.x.x.x*



Ok so lessons learned there:

You won't see anything in analysis > connections > events (doesn't show ssl rejected stuff, only successful https etc connections)

SAML (staff profile) rejection was not showing in the logs. I will ask cisco about this maybe it's a different event ID or Duo doesn't send anytning back to the firewall when SAML fails. He could see it in Duo logs so was happy enough there.

AAA/radius (contractors profile) was where we saw the issues coming in.

We needed to enable informational level logging under devices > platform settings. (we hit a bug there it didn't set first time not sure what happened, I watched him set it so watch out for that)

Once we had informational we could see some stuff under the cog > monitor > syslog.

Filter "message" for *x.x.x.x* where x.x.x.x is the IP you are looking for

We saw ssl denied for the German IP based on geoblock

We saw username ***** denied from my UK IP

The username was hidden in the logs

Added flex config "no loggin hide username" cisco said you have to leave off the "g" loggin is not a typo

Shun settings were 20 failed logins in 10 mins, he said he had to set it high because users were actually typing password wrong 10 times so that is something he will have to live with. Attackers can still try from the approved IPs for 20 tries then get shun'd but at this stage they can change IP address and try again


*** SAML

SAML failed logins won't show in the FMC log in the same way. Best to review these in the SAML provider dashboard/logs (Duo/Azure etc). These logs can be forwarded from there to a central SIEM. Duo have a tool called duo log sync.

filter to include class “vpnc”, which outputs logs like:

%FTD-6-611102: User authentication failed: IP = IP address, Uname: user


Tuesday, 1 July 2025

Palo alto PCNSA notes

Palo alto next generation firewall

Palo alto is a next gen firewall with user-id and app-id. Dynamic lists/feeds (EDL) for blocking malicious traffic and allowing trusted traffic like azure and CDNs etc.

It can do its inspections on north/south traffic and east/west traffic. Even on L2/virtual wire connections.

It has IPS, URL, wildfire (unknown threats).

DNS sinkhole (DNS protection)

Advanced logging with cortex data lake (take in multiple log sources and apply machine learning)

Platforms

  • Virtual machines for public and private cloud (you control the VM)
  • Prisma access (hosted cloud based firewall as a service)
  • Physical devices (physical boxes to install on site)

https://www.paloaltonetworks.com/network-security/hardware-firewall-innovations

SP3

Single pass simultaneous:

  • traffic inspection
  • classification
  • enforcement 

all in one pass

Control plane (mgmt)

  • config 
  • logging 
  • reporting 

Data plane (traffic)

  • Signature matching 
  • security and network processing 
If network gets hammered our control plane is still good and we can access our web interfaces to investigate and resolve the issue

Management options
  • Web interface HTTPS over the network or MGMT port
  • CLI via SSH over the network or via console cable
  • Panorama - centralized platform for managing multiple firewalls. Good for MSP. 6+ devices.
  • API - XML REST based API. Good for automation and network programming
The management GUI on box help
There is an onbox documentation, usually in the top right

ACC - Application Command Centre
Analytical tool to provide actionable intelligence about network activity. Shows trends etc.

Monitor tab
  • Live logs
  • Reports

Policies 
  • Firewall / NAT rules etc

Objects
  • Setup objects for use in policies

Network
  • data plane interfaces and zones
  • VPN related items
Device
  • General settings
  • Management interface
  • User accounts
  • Licenses
  • Config backup
Management port is part of the control plane
Default 192.168.1.1/24
HTTPS
default user: admin/admin
We can disable it if needed and use network interface
By default dataplane ports won't accept mgmt packets

Service routes
For all items we need to reach out of the firewall for eg radius / log forwarding etc. 
By default it will use the mgmt port
Device > Setup > Services > Service Router Configuration > Customize 
Lots of these settings are not sync'd like NTP so have to config on both palo1 and palo2
Don't forget to set timezone 

CLI modes
  • Operational - basic network commands: ping traceroute, show, debug
  • Configuration - configure command, now you can make changes
  • Similar to cisco in that regard
CLI enhancements
  • User find to figure out the command syntax
  • use ? to get help
  • User tab to autocomplete
  • Use | pipe with "match" or "except" for output filtering
ping "tab"
We will sett options with symbols
+ count - plus means it needs a value
* host - * means its required
> - means you will have more options after

ping host 1.1.1.1

tail - useful for log messages

set is how we do some config 
show is how we show the config

Find all the commands related to the network
find command keyword network

W can see ethernet is under interface under network. To change ethernet1/1 from cli we need to use:
set network interface ethernet1/1

CLI is good for checking and debugging but most config will be done via CLI now

Firewall maintenance

Config files

Running config (running-config.xml)
sits in the dataplane and this one controls the firewall behaviour
When the firewall reboots this config is loaded when it boots up 


Candidate configuration (snapshot.xml)
Separate file/space in memory to store temporary configuration in the control plane
Its config we have configured but have not deployed yet. 
When we do a commit its merged into running config.
Saving the candidate config doesn't commit the changes

Candidate config is the running config + the new changes
Commit command merges the changes from candidate config into running config
New updated running config has the new changes

We can revert to last saved conf
Replaces current candidate config with a saved candidate config file

We can revert to running config (probably will use this one most)
Get rid of un-commited changes

Load 
over writes with a file saved earlier (usually from a backup, used when restoring) 

Save
Can save a named config snapshot.

Export
Export a named config (backup)

Dynamic updates
  • Make sure these are enabled and auto downloading / installing 
  • Antivirtus / Wildfire 
  • Apps and threats 
  • Global protect HIP
  • PAN-DB URL filtering (may use umbrella instead)

Palo alto policy types
  • Security (firewall rules etc)
  • NAT (global NAT, NoNats, public NATs etc)
  • QoS (voice QoS)
  • Policy based forward (PBR)
  • Decryption (SSL)
  • Authentication ( radius / SAML etc)
  • DoS protection 
  • Tunnel Inspection
  • SD-WAN
Palo alto works like ASA
works from top to bottom
when rule is match traffic is dispatched 
it doesn't check any futther rules

Security policies
  • The primary traffic control tool
  • Block rules at top like block lists, implicit deny at the bottom.
  • Add the most specific rules at the top

IntERzone vs IntRAzone
  • IntERzone (lan to dmz)
  • IntRAzone (same zone)
  • Universal (interzone + intrazone combined)
Application/Service 
  • select (pick which ports)
  • any (allow HTTP on any port for example)
  • application-default (web-browsing only allowed on default ports 80/443 but not 8881)
Generally we don't want to allow apps on lots of ports but some custom applications run HTTP etc on non standard ports.
  • applicaiton-default - use this where we can as first preference
  • select - in edge cases we can config the specific ports. Second choice.
  • any - only for testing or we can't get it working any other way. Last resort.

Default rules can be changed by using the override button.

Policy objects / groups
Its efficient to group items into groups so later the groups can be updated but your firewall rules can remain unchanged.

Security profiles
ping command source from inside to host
ping source 192.168.10.100 host 192.168.10.50

however if the clients try to ping the firewall it will fail by default. We would need to create a management profile, allow ping and apply it to that interface.

ACLs can be found under
Policies > Security 

We can see applications ping and icmp
icmp is for the full protocol (except for ping)
ping is the ping app which is under icmp protocol

How to block web comms to a specific IP

NAT

  • Allows network devices to change source/destination of packets.
  • Main function for IPv4 depletion but has other uses.
  • In most orgs its used to hide all clients behind a single IP for internet access (NAT overload)
  • The other main use is to give servers a static public IP
  • NoNAT's are used for S2S VPNs

SNAT - source NAT
DNAT - destination
Some devices allow changing source and destination at the same time

Static NAT is to map one IP to one IP
Dynamic is IP that gets mapped can come from pool of IP's. Dynamic includes port translations

On palo alto we have a NAT policy
  • A NAT rule has 3 main sections:
    • General
    • Original packet
    • Translated packet
NAT type: IPv6 / IPv6

Original packet is how we select the original packet
Translated packet is what we want to change it to

Rules can refer to address objects instead of IPs
It's recommended to use objects in case the IP is updated later.

  • NAT Rule processing is top down
  • Applies regardless of NAT type
  • Most specific rules at top
  • More general NAT's at the bottom
  • No NAT rule can go at the top (exemptions)
IP addresses should always refer to the original IP's, pre-NAT
Use the original IP in the firewall rules as well.

Remember NAT does the translation but it doesn't allow or deny anything. That is the job of the security policy.

test routing fib-lookup virtual-router default ip 192.168.57.31
Will give you the interface it will go out.

show routeing route 
Shows all routes

Working with NAT
Policies > NAT
In some cases we might need to adjust routes

For example when you need to NAT to an external IP block 
In the case there is one public IP range configured on the outside of the firewall
A second block/pool has been added on later. In this case the firewall doesn't know about it.

Like an extra IP block
You may need to adjust routing so traffic knows how to get back to the firewall.

Verify and TS
Device > troubleshooting > NAT policy match
Rule usage, check hit  counts / last hit / fist hit

CLI
  • show session all
  • show running ippool
  • show system state | match nat

Goal is to enable dynamic NAT with a pool for any inside network
This will be source NAT (SNAT)
As the traffic leaves we will change the source to something else

First create your object with your public IP pool.
Name: DPOOL
IP netmask: 192.0.2.0/24

Policies > NAT
Add rule
Give a name
SRC: IN
DST: OUT
Go to translated packet
Change source to dynamic IP
select: DPOOL

NAT policy doesn't automatically allow the traffic. You will need a security policy rule as well.
You may need to have a route setup to route back.

Goal expose a DMZ device to the internet 
This will be destination translation from outside to outside
Palo NAT works on addresses and zones from the original packet, that is why we do outside > outside and not outside > dmz.

NAME: STATIC
SEC: OUT
DEST: OUT
DEST ADDR: 102.0.2.230

Translated packet
Source translation: none
Destination translation type: static IP
Translated address: 192.168.57.31

We don't need bi directional here because the firewall will allow the return traffic.

Again you will need security policy to allow the traffic
In the security policy it applies after translation. So we will need OUTSIDE > DMZ, even though the address belongs to outside.  

NAT policy: original packet (outside to outside)
Security policy: after translation (outside to DMZ)

Logging and monitoring

logs are timestamped events, often including useful information src/dst IP etc. 

Important log types but there are more
  • Traffic - src/dst IP, ports, app, nat
  • Threat - details on detected threats
  • Config/Audit - what changes admin made
  • System - the PAN os system
  • User-ID - details about user ID
  • Global protect - the dial in VPN logs
Log settings
  • Session start - log at the first packet (useful for UDP and sessions that never fully setup/close)
  • Session end - log when the tcp connection has closed
  • Log forwarding - send logs to external syslog server/SIEM etc. The firewall can only store so much.
  • Logs can be filtered
  • Log profile defines the external log server
  • Log forwarding is where we define what logs we will send
Enhanced logging
We can collect additional data for cortex XDR. You need data lake subscription 

Config
Device > server profiles > syslog
Add profile
SYSLOG-PROF
fill in IP of syslog server 192.168.100.50

Device > Setup > Services
Make sure you use the right interface for syslog, often picking inside/lan interface

Objects > Log Forwarding
LOG-FWD
pick traffic and select SYSLOG-PROF

Log settings 
under config logs do the same

In our rules set the logging settings as needed (session start vs session end)

If we need to override the default rule, log at session end
Set log forwarding

Policies

App-ID
We need app ID for modern threats
Different protocols can be listening on different ports 443/80/22

When the palo see's a connection on port 80 for example it will check that its TCP and that its HTTP protocol. Now it knows its actually HTTP traffic running on its standard port so can be allowed/blocked.

If the connection shows TCP but SSH protocol then the connection could be blocked as it won't match the application rule.

Similarly if we see TCP and HTTP protocol but the port is 8080 the palo will also block if its set to look for application default ports. This can be changed in the firewall rule settings

Advanced policies

QoS - a set of tech that we can enable to control traffic bandwidth/latency/jitter etc.
Palo can do classification on packets based on the user and app
Bandwidth mgmt - limit/guarantee bandwidth for certain apps/flows
Priority queuing - voice traffic gets processed first

example classification
  • voice/teams
  • business critical apps
  • everything else
Default profile is just for prioritization

Policies > QoS
Class 4 is the default
We can use DSCP and/or ToS marking that may have been done by other netwok devices and honor them or change them as you need

Use post NAT address in QoS (like in security access policy)
QoS is processed top down and exits on rule match

QoS is outbound/Egress feature. Affects outbound interface only 

To limit downloads from the internet, apply QoS in inside interface (egress to inside/LAN)
To limit uploads , apply QoS to outside interface (egress to internet)

Turn QoS on the interface
Physical vs clear text vs tunnelled interface 

Egress max is the max speed of the interface.
If a class has egress max 0, the value of egrees max will be used

When we guarantee bandwidth its only kicking in, in the event of congestion
Classes with no guarentee'd bandwidth will show a guarantee of 0.001 mbps

Steps
Create QoS policy
Create QoS profiles
Don't forget to commit
After applying check the statistics 

Decryption

Decryptions allows the firewall to look inside encrypted connections like HTTPS connections
We may detect malware coming across the encrypted flow and we can block
If we don't decrypt we are not able to detect it in transit and would hope the endpoint AV will catch it

Some traffic can't / shouldn't be decrypted

SSL/TLS decryption (man in the middle)

SSL forward proxy (outbound traffic)
Certs needed:
  • Forward trust 
  • Forward untrust
Client < > (SSL decrypt) FW (SSL decrypt) < > internet > Server
  • When client starts a connection, the firewall intercepts the connection setup
  • The firewall impersonates the server. 
  • The firewall does the same to the server, impersonates the client
  • The client thinks its talking to the server but its talking to the firewall
  • The server thinks its talking to the client but its talking to the firewall
  • The firewall joins both ends but is able to look inside the connection

SSL Inbound inspection
Applies to inbound traffic, usually to your public servers
Internet > HTTPS > FW > DMZ > Web server
In this method we install the certs from our servers on the firewall.

SSH decryption
We don't need certs
Useful to find people using SSH port forwarding x11 or TCP connections

Decryption mirror
We can copy decrypted traffic to a destination on an interface. The traffic gets sent 1 way out to be logg or inspected by another system

Decryption broke
Firewall still decrypts but only sends the allowed traffic to other devices for additional inspection
FW > C-TXT > SC1 > SC2 > remaining allowed traffic goes back to the firewall 

Decryption exclusions
Some apps can't be decrypted. Some compliance / regulation means we can't decrypt banking and health data as its private.

Decryption certs
  • Forward trust cert - needs to be trusted by enpoints
  • Forward untrust cert - should not be trusted because we want to represent untrusted destinations
  • SSL inbound certs will - install the certs/private key from your pubic servers on the firewall
Decryption profile
We can set extra options on how to handle sites that have expired or old ciphers etc

Define sites to decrypt by zone, user, but you will probably use URL category the most
In new infra make a NoDecrypt URL category and choose to decrypt everything else.
For existing infra you will want to move gradually, start with some non critical sites or test users

Device > certificate management > SSL decryption exclusion

Disable decryption temporarily via CLI
  • set system setting ssl-decrypt skip-ssl-decrypt yes
The command applies immediately, does not need commit. You can test your site/rule ssldecrypt in/out of your issue
Turn it back on
set system setting ssl-decrypt skip-ssl-decrypt no

Checking logs in the GUI:
  • Monitor > logs > traffic

Checking logs on the CLI:
  • show session all filter ssl-decrypt yes
  • show counter global | match proxy
If the session is decrypted we should see a * in the flag field. If its blank we did not do decryption
ACTIVE FLOW * 192.168.100.50

SSH decryption

Create a decryption policy with the action set to SSH proxy

To see if SSH is tunneling traffic we need to decrypt
Normal SSH traffic is SSH, SCP, SFTP
In you security rule allow the the app ssh but block ssh-tunnel

Example rule order
  • NoDecrypt / exclusion list
  • HTTPS decrypt
  • SSH decrypt
Tunnel inspection 

Looking at content of cleartext pass through tunnels
  • GRE (generic Routing Encapsulation)
  • IPsec (ESP with null encryption, AH transport mode)
  • VXLAN (virtual extensible local area network)
  • GPRS (general packet radio servic)
Why inspect tunnels ?
For example if we allow a GRE tunnel
We allow GRE from tunnel source to tunnel destination
However everything inside the tunnel is allowed (which we might not want)
If we inspect the tunnel and look at the original IP header and payload and inspect it
Then we can allow/block what we want or enforce QoS

Processing logic
  • Tunnel must be allowed
  • tunnel inspection rules are evaluated from top down
  • packets that match a rule are subject to extra validation (eg RFC checks, unknown protocols)
  • Encapsulated traffic becomes subject to security policy evaluation  
We can also create tunnel zones
inside zone > tunnel zone
This will make it easier to control the tunnelled traffic
For example TIN and TOUT

Logs
  • GUI: Monitor > Logs > Tunnel Inspection, ACC > Tunnel activity 
  • CLI: show session id

Application override

Simplified app id mechanism which overrides App-ID
You might have a custom app that palo alto doesn't know about so there is no App-ID
L7 inspections are abandoned, just l4
Generally not recommended to use it, we should use App-ID or make customer app-id signature.
When used we should try to limit to the client/server that uses.

Why use it
Improved visibility and reporting
The draw back is we will lose L7 inspections
Our app runs on TCP 57188 but we don't want it detected as unknown TCP

show session all filter application

Policy Based Forward (PBF)
Normal routing forwards packets based on the destination
PAN-OS uses virtual routers
PBF allows us to override those default decision by routing
PBF only works with services (port number) don't use apps because PBF happens before L7 stuff. 
PBF can use
  • source ip
  • destination ip
  • ports
  • zones
  • etc
Why use it ?
Dual link/ISPs
  • We may want to send our WIFI traffic out our secondary connection, to take pressure off the primary but also a good indicator that the secondary connection is up and working as users will alert us.
  • Security
  • Load distribution and testing
  • Traffic segregation
  • PBF can be combined with path monitoring for failure detection
  • If ISP link goes down, we can fail back to the default path 



CLI show commands:
  • show routing route
  • show routing fib
  • test routing fib-lookup ip 192.168.1.10 virtual-router default
  • show pbf
  • show session id
  • test pbf-test-policy-match

Policy optimizer
A tool that to help control and optimize the security rule set
used for rule migration (ports > apps)
find rules that are never matched and duplicates

Device > setup > Management > Policy rule base settings > policy application usage

In general clone the rule
change the services (ports to apps)
You can move the app rule above the port rule and make sure its matched or just disable the old rule and test. After some period of testing you can delete the disabled rules.


App-ID
Objects > Applications
Palo has built in App-ID's in its database
You can customize some info, but some info is fixed
You can also make a custom app-id for bespoke apps

App properties
Category, subcategory
Risk 
Technology
Tag (add your own tag)
Characters 

Working with applications 
App rules > port based rules (because anything can be tunnelled over port 80/443, we need to look deeper)
We should make app rules on top
port rules below

Review the hitcounts and detected applications, work towards removing the port based rules.
If we do have to use a port based rule we can lock it to source/destination 

Applicaiton-default
reduces administrative overhead
port-mappings

We can look in objects > applications >facebook and see what ports it uses by default.
We can also look on https://applipedia.paloaltonetworks.com/

Application dependencies
Many applications will rely on another application
Implicit dependencies - will be enabled automatically 
Explicit dependencies - requites to be added manually

eg
Facebook requires "http" and "ssl"

Check objects > applications
Check an app
Check the "implicitly uses"   (implicit)
Check the "depends on"         (explicit)

When adding an app to the rule we should see a list of depends on applications. You can quickly add these to the existing rule.

We can make application groups
objects > application groups 
eg 
make a app group call social media, then add facebook, instragram, twitter 
Now we just need to allow our users access to this group 

Similar to applications group is application filter
We say what characteristics/properties make an app part of the filter
eg business-filter
go to category and select business relevance and risk level 1 (most secure)
This may allow apps in the future that you don't intend but also can save you time.

Custom applications
Created for better visibility and granular control
Lets say you have a custom application in your org
It's showing up as unknown-tcp
So we may need to build a custom application
We should have detailed information on how the app works
You may need to do a wireshark on the traffic

User-ID
Classic firewall rules were based on IP's and ports. From a world where everyone was in the office etc.
We would give important clients and servers static IP's and create firewall rules based on those.

Today we try to work off role based access control (RBAC). For example Bob is a member of marketing and everyone in the market team should have access to facebook. We also have users working on WIFI and in remote locations from home etc. User IP's are often given by DHCP on top of that so that makes the old IP based policies no longer sufficient.

Most application firewalls will also be user aware. This is done by connecting the firewall to active directory and the firewall keeps a user to IP mapping. This process is known as user-id. We can now make firewall rules based on the AD username or group. On top of that we will get more information on users in our logging like how much bandwidth they are using etc.

How user ID works ?
The user info is not part of the network traffic. We just see a connection from an IP to www.facebook.com. It can work by several methods.

Group mappings
Firewall collects group mapping info for simplified administration. Eg connect to LDAP server. You will need an AD account to connect.

Global protect user-id
When users log in via the global protect client they type in the username and password. The firewall can record who the remote user is at that point. This is why you will often see user-id is working for remote clients but LAN clients it hasn't been enabled yet.

Windows agent
Software installed on the DC's. 
Saves CPU on the firewall MGMT plane.
Needs some bandwidth has agent must send data to the firewall
Software has to be installed/updated on the DC

Integrated agent (or agentless)
built into the firewall 
Reduces bandwidth usage 

Server monitoring
analysis of the event logs

Syslog
analysis of syslog login/logout

Port mapping
For multi-user system, such as terminal services or citrix

XFF headers
X forwarded for header will be there if a proxy server is in use

Auth with Captive portal
All the other methods are passive, the user doesn't have to do anything.
Captive portal is the only active method.
This is where the user gets a pop up to enter their username and password
Works with Kerberos SSO, NTLM, Client cert. More than one method can be used.

Captive portal modes
transparent - good for L2 or Vwire deployments
redirect  - Firewall does 302 redirect to original request, better user experience 

General overview
  • Enable User-ID in the right zone (GP and LAN etc)
  • Map IP address to users (with one of the methods, usually passive server monitoring)
  • Create user ID rules (create your firewall rules based on app and user roles)


Deploying authentication

Server profile
  • Device > Server Profiles > LDAP
  • Add our server IP and port 389
  • Type will be active directory
  • Base DN, DC=domain,DC=int
  • Bind DN admin@domina.int
  • password: secret-strong-password-here

Group mapping
  • Device > User ID > Group Mapping settings
  • Add mapping
  • Choose the server profiles
  • Choose the group from AD
  • Instead of fetching all AD groups we can choose
  • Most deployments we will want to bring in all groups
  • This is also a good test to see if the server profile is working
Auth profile
Device > Authentication profile
Add
type LDAP
Server profiles (select profile created above
User Domain ( domain ) 
*** if you leave this off the users may not match
*** We want domain\user, not just user

CLI commands for checking
show user group list
show user group name
show user ip-user-mapping
show user ip-user-mapping all

Clearing cache in case of troubleshooting / after fixing a broken AD connection
clear user-cache all
clear user-cache-mp all
clear uid-cache all
delete user-group-cache 

Enable user ID on the zone
Network > Zones
Click on Inside zone for example
Tick the enable user ID check box

Service routes
Devices > Setup > Services
Check the settings on LDAP and UID agent are correct
In some cases you will want the LDAP/UID to come from the LAN interface 

For captive portal make below
Network > Network profiles > Interface MGMT > Add interface mgmt profile
enable response pages
Enable user ID
This can be used later for captive portal

Portal certificate
  • Device > Certificate mgmt > Certificates > Device Certificates
  • For self signed make sure to check "certificate authority"
  • Bind the server to a SSL/TLS profiles
  • Device > Certificate management > SSL/TLS service profiles
When generating the cert
PA-CERT
common name: x.x.x.x (IP of the interface on the firewall eg LAN IP)
check certificate authority box
This cert will need to be trusted by all clients, you can deploy it to GP clients via the firewall
But best to deploy out via GPO or Intune

Device > User identification
Tick enable captive portal
Choose your SSL/TLS profile (one we made above)
Pick redirect mode
Fill in FW inside IP for the portal address

Auth policy for captive portal
Policies > Authentication
Add auth policy rule
Name your rule eg auth-trigger-http
select src and dst (eg inside > outside)
user is unknown 
service is service-http
authentication enforcement: default-web-form 

Troubleshooting
  • Use CLI commands to troubleshoot
  • Clear cache and retry connections, is the mapping working ?
  • Ensure you can reach your AD servers from the right interface
  • Ensure your AD user account is valid, has rights and correct password
  • Ensure you mappings are correct domain\user vs user

Security profiles

Security profiles are extra security inspection engines which can be applied for extra security on allow rules. They won't do any thing on deny rules as the traffic will already be dropped.

Profile types
  • Antivirus - classic AV based off signatures (some may be created by wildfire)
  • Antispyware - detects C2 traffic such as beaconing  
  • Vulnerability protection - Similar to IPS, detects known SQL injects, RCE etc.
  • URL filtering - URL content/category filtering (DNS protection)
  • File blocking - Block by file type .pdf. Does not care if the file is malicious or not.
  • Data filtering - Stop data exfil such as credit card numbers / certs / keys etc. Basic DLP.
  • DoS protection - Protects against floods and session exhaustion, rate limit etc.
  • Wildfire analysis - Like AMP on cisco land. It forwards unknown/suspicious samples to cloud for analysis in sandbox. It is used by palo alto to produce new signatures that feed back into antivirus profile. The AV/AS profiles are the ones that do the blocking.
Actions
We can set various actions like 
  • Allow
  • Drop
  • Alert (log)
  • Reset (client / server / both)
  • Default

Antispyware has extra actions
  • Block IP - block the C2 IP for some time
  • DNS sinkhole - redirect the C2 traffic to some server so it can be dropped or monitored. If all infected devices start reporting in you can clean them from your network.
URL filtering has extra actions
  • Continue - display a warning page before letting the user continue
  • Override - allow access to the page if an authorized user authenticates
In reality I would say not much use for these. Either allow or block these pages based on company policy.


Default vs Strict
Default will go with the suggested action in the signature
Strict will always block high and critical signatures 

BPA
Will want you to set the strict value which blocks all high/critical signatures in all cases.


Wildfire vs antivirus (signatures) and antispyware (c2 beacons)
In practice: WildFire analyses an unknown file and identifies it as malware. Antivirus can then block that file using the resulting signature. If a host was already infected, Anti-Spyware can catch its attempts to reach out to the attacker.

Exam tip: A WildFire Analysis profile forwards files for analysis but doesn’t block them. Blocking comes from other controls, such as the Antivirus profile’s WildFire action.

A note on SSL decryption
The majority of these profiles need SSL decryption on to be effective as they are lookin inside the payload. Obviously clear text stuff like HTTP can be protected without SSL decrypt but majority of traffic today is encrypted.
DoS protection is the only one because it uses traffic and session rates no payload inspection.


We can apply the profiles in the actions tab on a firewall rule.
We can apply each one for granular control, but in most cases you will have a standardized set of rules. In that case you can use a security profile group.
Set all the settings in a group and apply the group to the firewall rule. That way you don't have to select each profile individually.

Security profile groups
Generally you will have a company policy. You can config all your security profiles according to company policy. Once completed you can make a security profile group which uses all of them. Now you can apply one group to all your rules and have all company polices applied. If you use the default group it will automatically apply to all new rules. So some time investment up front in building these profiles will pay off later.

DoS attacks

What is a denial of service attack ?
Any type of attack that renders a network / device / service unusable. They can cause websites to crash / WIFI AP's not to accept new clients / Claim all the IP addresses from a DHCP server so no new clients can connect etc. There are many types of DoS attack and many different methods but the end goal is the same. Two main types are flood based (send lots of packets) or crash based (exploit / bug / vuln) which will crash the device or cause a reboot.

Often they are considered less risk than a remote code execution because generally the attacker doesn't get access to anything, they just break things. However the impact does depend. If your website needs to be up for the company to make money or its a hospital system. Sometimes DoS attacks are used to put the server into a crashed state where it will accept commands which can give the attacker access. For these reasons its important we protect against DoS attacks.

High volume DDOS attacks.
Your internet connection is usually of a fixed size. Likewise your firewall hardware resources are limited. Attackers can use botnets and DNS reflection attacks to fill your connection/hardware.

For these reasons a layered approach is recommended

Internet - put cloud flare out in front of your web sites DNS names. You will need to take care not to expose your real server public IP's via your website code and server software.

Next layer is your perimeter device (palo) with hardware based ACLs and stateful firewall. Palo recommend  to place the firewall as close to the servers its protecting as possible. Its not always feasible based on cost.

Web server based protection. For example nginx has some abilities to absorb slow connections and request floods from induvial IPs. It can't help with volumetric attacks. See Fail2Ban and CrowdSec. WAF can filter applications but we can use WAF at cloudflare level.

Preparing a baseline 

If we set zone protection with default numbers it might work but it could be too high or too low. Its a good idea to create a baseline for a week or month.

How to get the numbers ?

Panorama
Panorama > Managed Device > Health > All devices 

SNMP MIBS (can be monitored by monitoring tools)
CPS is connection per second
PanZoneActiveTcpCps
PanZoneActiveUdpCps
PanZoneOtherIPCps

3rd party monitoring tools
Wireshark, netflow etc

Once we have baseline we can set values for example if normal ops don't go over 2500 then we can set 3000 or even 9000 as a limit. Keep in mind as legitimate traffic grows you may have to re baseline and adjust.

Zone protection

We can put zone protection profiles to the zone for example all packets entering the inside zone.
If we have 2 or more interfaces as part of the inside zone both interfaces are subject to zone protection. This is known as broad protection.
It only applied to new sessions. So if you apply zone protection you may need to clear connection / sessions.

The protection is applied on the way in (ingress).

Web GUI
Network > Network > Profiles > Zone protection
Network > Zones
Add zone protection profile

CLI
show zone-protection

KB
https://docs.paloaltonetworks.com/best-practices/dos-and-zone-protection-best-practices

Flood protection defends against
  • SYN 
  • ICMP
  • ICMPv6
  • UDP
  • And other flood based attacks
Traffic above the connection per second threshold, we take action
RED (random early drop)

In the case of SYN flood protection we can use SYN cookies
Firewall acts as a proxy similar to SSL decryption the firewall is sitting in the middle.
However its memory intense so need to use carefully 

Reconnaissance protection
Recognise port scans or host sweeps
Actions
  • Allow
  • Alert 
  • Block

We can also exempt an IP for our own penetration tests. You may need to pair this with a firewall rule. However its not a real world scan if you just let the penetration testers in. Something to be aware of.

Protocol protection (non IP)
  • For L2 protocols, you would use this on virtual wires
  • LLDP
  • STP
  • SCADA
  • GOOSE
Exclude list will block the protocols you define and allow the rest
Include list will allow the protocols your define and block the rest

This is based on the protocol type code which you will need to know / get from wireshark capture.

DoS protection

DoS protection is granular protection
In general will be flood protection (some resource based attacks) 

Aggregate vs Classified 
  • Aggregate applies to combined traffic (per device group)
  • Classified applies to individual devices (per device)

With aggregate you could find your zone is not overloaded but a single server could be over loaded. In those cases you may want to use classified so each server has a profile. You can combine them.

Objects > security profiles > DoS protection
Monitor and adjust thresholds
Eanble resource protections (max concurrent sessions)

Protections rules
Policies > DoS Protection
Actions
  • allow
  • deny
  • protect (classified, need to select protection profile)
DoS protection is processed before the firewall rules.

For classified we want to count on destination IP (our DMZ server)

CLI
show dos-protection
show dos-protection rule RULE1 settings
show dos-protection zone

Advanced Technologies

Administrative access methods

  • CLI
  • GUI
  • API
We can apply authentication and authorization where required 


Admin accounts


Dynamic roles
built in eg superuser
They will change if palo changes them with an update.

  • superuser - has full access to read/change everything
  • superreader - has read access to everything 
  • deviceadmin - has full access except can't make new accounts
  • devicereader - has read access except for password profiles and other accounts

Role profiles
More granular 
Device > Admin Roles

Auth options
Local auth (local accounts on the palo)
 
external database (TACACS+, RADIUS, LDAP, Kerberos, SAML, MFA)

Device > Administrators (called the no database but think of it as admin database)
Admin accounts are used for panorama access.

Device > Local Users Database 
The local user database is for end users, usually used for network access on VPN etc.
It is possible to give them admin rights but generally they will not, these accounts will be used for remote access or auditors etc. 

Reality check
In the vast majority of cases you will setup the firewall for external auth using AD/MFA etc for your remote access VPN users.

Password complexity for local accounts.
Device > Setup > Management
Minimum password complexity
Keep in mind this can only apply to passwords that the palo can see. 
If you use password hashes (probably won't) then the palo firewall can't see how long/complext the password is.

Keep in mind password policies for external auth will need to be set on those external systems.

Password profile for admin database
Device > Password profiles
We can set expiry etc. Only for admin accounts.

Custom roles
Device > Admin roles
Add 
Name your role
Select the items you want to give them access to 
For example we could let a lvl 1 engineer to access the objects and security policies, save and commit config. But they can't change passwords or decryption etc.

Admin access with radius (external auth)

In this example the radius server will be run by ISE.

Setup radius server profile
Device > Server Profiles > RADIUS
Add
RADIUS-PROF
Administrator use only (only used for admin purposes)
We can use simple auth for example PAP (in production you would use stronger)
Add your radius servers
Fill in IP 192.168.0.100
Fill in shared secret
Fill in port number 1812 etc
On your external auth server make sure you have the palo set as a radius client with matching shared secret

Config authentication profile
Device > Authentication Profile (or sequence)
Add
EXT-RAD-AUTH
Type: RADIUS
Profile: RADIUS-PROF (the one we created above)

On advanced tab
add "all" so all users can auth 

Device > Setup > Management 
Auth settings
Choose 
Authentication profile: RADIUS-PROF
Only required for non local admin accounts

Create role
Device > Admin Roles
Add
allpolicies
set the permissions you need

External auth server config
Config external server
Palo alto vendor code 25461

Depending on your external auth method the config may be slightly different, consult the palo alto documentation. 
Look for PAN-OS Administrators guide. 
Choose your version
Go to authentication section > authentication types

Setup external auth with cisco ISE (example)

In cisco ISE 
Policy > Dictionaries 
Find RADIUS
Go to RADIUS vendors
If we don't see palo alto as a vendor we can add 
Dictionary name: PaloAltoDictionary
Vendor ID: 25461 (you can find it in the docs)
Submit to save

Now go back to the "PaloAltoDictionary" dictionary
Click on Dictionary attributes in the top right 
We can copy the attributes from the docs
Add
Attribute Name: Palo-Alto-Admin-Role
Data type: STRING
Direction: BOTH
ID: 1
Submit

We can add only the ones we need but probably worth adding them all while you are there.


Add group in Cisco ISE
Administration > Groups
Add PA-POLICYADMINS

Add user account in cisco ISE
Administration > manage user identities 
Add EXT-PA-POLICYADMIN
set password
add to our group PA-POLICYADMINS

Add the firewall in Cisco ISE
Administration > Network devices
Add
PA1
enter IP: 192.168.0.200
Default profile: for cisco will be fine
Fill in same shared secret configured on the palo firewall

Create authorization profile in Cisco ISE
Policy > Authorization > authorization profile
Name: PA-ALL-POLICES
Access type: ACCESS_ACCEPT
Network device profile: Cisco (its ok to use for the palo)
Go to advanced attribute settings
Select Palo-Alto-Role = allpolicies (this needs to match what is configured on the palo alto firewall)

*** NOTE you only config the name of the role in Cisco ISE. The role and its settings are configured on the palo alto firewall.

Create a rule in cisco ISE
In cisco ISE go to the policy set (rules)
Make a custom rule for authorization
pa external admin auth
select the dictionary PA-POLICYADMINS

Make sure Cisco ISE and palo alto settings have been saved and test login.

Testing auth from the palo CLI
test authentication authentication-profile EXT-RADIUS-AUTH username
Fill in password
We will see a results of it was allowed or not

Checking logs in Cisco ISE
Operations > RADIUS > Live logs
We can drill down on the details


Advanced routing 

  • BFD (bi directional forwarding detection)
  • ECMP (equal cost multiple path)
  • Routing redistribution

BFD (bi directional forwarding detection)
  • RFC 5880
  • Its a dedicated failure detection mechanism
  • Allow for fast failover
  • uses UDP 3784 and 4784
  • This is on top of OSPF hello messages, its an extra layer

PAN-OS offers many but not all BFD functions
PAN-OS supports:
  • static routes
  • OSPF
  • BGP
  • RIP
Docs can be found under networking in the admin guide.

Create a BFD profile
Network > Network profiles > BFD Profile
At least one peer must be active
Click add
Give it a name like "BFD-R1-PROF"
Make it active
Options need to match the peer

Enable BFD
Network > Virtual Routers
Go to OSPF
Select the BFD profile

For static routes we can select the profile when we add the route

Verification
GUI:
Network > Virtual routers 
Show more runtime stats

CLI:
show routing bfd
show routing bfd summary

What is the point if we already have failover in OSPF etc ?

If a firewall is directly cabled to a router and the link fails, the interface goes down and OSPF reacts almost immediately, so BFD adds tiny performance overhead there.

But suppose there’s a switch or a provider handoff in between:

FW > SW > ISP RTR > upstream routers

If the router dies or the link beyond the switch fails, the firewall’s port can stay up. The firewall then has to wait for the routing protocol’s timers to expire, and traffic may be dropped in the meantime.

What about just adjusting OSPF timers ?

This creates more overhead than BFD as the OSPF hellos packets are more demanding. BFD check for the neighbor and informs OSPF if its down. Then OSPF reacts as it normally would when detecting a neighbor down.

Common timings

  • OSPF - up to 40 seconds
  • BGP - 90 (palo defaults) - 180 (common standards) seconds 
  • With BFD - 900ms -3 seconds (a big improvement) 
Reality check
If failover time is critical consider BFD otherwise standard OSFP/BGP failover is probably fine

ECMP (equal cost multiple path)


By default ECMP is disabled
If we have more than one path the second one will never be used

Consider two paths to the same destination
FW1 >R1 > DST (10.1.1.0/24)
FW1 >R2 > DST (10.1.1.0/24)

With ECMP disabled the firewall learns about the two routes but only one is placed in the FIB, if it fails then the second path can be moved into the FIB

ECMP enabled
The firewall can have more than one equal cost path. Both the R1 and R2 path go into the FIB and traffic can be sent via either. 

We can have up to 4 equal cost routes to the same destination 

Benefit of ECMP
  • Load distribution
  • Bandwidth aggregation
  • Using backup link that is normally idle
  • No waiting for backup route to be installed
  • If one of the routes fails, all traffic starts going to the remaining path immediately
How to select path
ECMP distributes packets at the session level based on the configured load balancing 

IP Modulo
  • based on src and dst IP
  • 10.1.1.1 > 1.1.1.1 > R1
  • 10.1.1.1 > 2.2.2.2 > R2

IP hash
  • Has a few options
  • src and dst IP
  • src IP only
  • src and dst ports

Balanced (round robin)
  • Good if we have two links that are the same speed
  • first packet > R1
  • second packet > R2
  • third packet > R1
  • fourth packet >R2
  • etc

Weighted (round robin)
  • Good for two paths that are different speeds
  • We set a ration like 2:1
  • So twice as many packets get sent down the faster path


CLI
test routing fib-lookup ecmp source-ip 192.168.1.00 destination-ip 1.1.1.1 destination-port 23 source-port 1024

test routing fib-lookup ecmp source-ip 192.168.1.100 virtual-router default ip 1.1.1.1

show routing fib
The palo should tell us which path was selected


Routing redistribution

  • Share routes between routing domains.
  • For example if we have some OSPF devices and some cisco EIGRP devices we may need to share the routes to provide end to end connectivity.
  • OSPF > BGP > REMOTE SITE > OSPF
  • OSPF <> EIGRP

Use cases
  • Public addresses ( you want you entire company to have the sam
  • Company mergers
  • Multi vendor environments
Create redist profile
  • Network > Virtual Routers > Redistribution profile
  • Add IPv4
  • No Redist (to make exceptions)
  • General Filter matches routes for redistribution
  • Its not often we want to redist everything
  • At a minimum we need to be able to control it later
  • Destination matches configured prefix or longer (if we define /24, it will do /25 /26 etc)
  • If we don't want /25 etc we need to add the to the nodist list.
  • OSPF and BGP provide more redist criteria 

Start redist
  • Network > Virtual rotuer > OSFP/BGP/etc
  • Export Rules 
  • Redist rules
Show ospf routing info
show ip route ospf

High Availability

The same concept as cisco firewalls. We have two firewalls in a HA pair. They have a HA connection between them. If one of the firewalls fails, the other takes over. We can resolve the issue while the business/network stays up and working.

Active/passive (most common)
  • FW1 active (does all the processing)
  • FW2 passive (ready to take over)

Active/active (generally used in data centre)
  • Both units process traffic
  • packets should be distributed to both firewalls using external method for efficient
  • ECMP / load balancers / etc
  • Requires advanced config for routing and NAT

The firewalls must be:
  • hardware
  • license
  • interfaces
  • software (can differ during upgrades)
  • must agree on multi virtual system (on/off)
HA ports
Some models have dedicated HA ports, others you make use of the normal data ports / sfp slots and configure them as HA ports

Some config is not sync'd by HA
Some example below 
  • MGMT interface config (we need two different mgmt IP's for each firewall)
  • Licenses
  • HA config (need different IP's on the HA)
  • SNMP
  • Panorma settings
  • Services
  • Global service routes
  • Telemetry and threat intel settings 
  • Log export settings
  • Software updates
  • GP agent package

You can get a full list from the doc > admin guide > high availability > What settings don't sync


HA1 - Control link
  • Hellos
  • ICMP hearbeats
  • State and sync data

HA2 - Data link
  • Sessions
  • arp tables
  • forwarding tables
  • keep alives

HA3 - Packet forwarding (active/active setup only)
Data packets including asymmetric flows
Requires l2 connection (usually firewalls are beside each other anyway)
Carries real traffic, you may need a big interface / enable jumbo frames.

Backup links for all HA1/2

Failure detection
  • ICMP heartbeats - icmp packets
  • Link failure - datalink keep alivees
  • Path failure - IP reachability checks
  • Critical - Health checks like high CPU/memory usage
  • Forced/manual - initiated by admin
Docs are in the admin guide.

All config should be done on the active firewall.
Lower number means higher priority
Active/passive  - make changes on the primary
active/active - make changes on the active-primary firewall.
They need to call one of the active primary because it stores the config, it will be sync'd to the other firewall but we need some way to tell the two active firewalls apart. From a traffic forwarding point of view they are both active.

VPN technologies

VPN and IPsec

In general we use VPNs to make a secure connection which needs to travel over a public network like the internet.
VPN's are popular because they make use of an existing internet connection and avoid paying for an expensive site link or MPLS connection. Most of the time the performance of VPN is good enough. 
Site A <> VPN <> Internet <> VPN <> Site B

Primary function of VPNs is to provide end to end connectivity
Usually built over an unsecured network such as the internet
Sometimes used to put security / encryption around clear text traffic on LAN
VPN rely on tunnelling
Tunnelling is encapsulating the original packet into a new packet header.
The original packet becomes the payload in the second packet and is encrypted so it can't be read while traveling across the network.

However some VPN's are not secure, eg DMVPN and some L2 are clear text

IPsec
  • The most common implementation of VPN
  • RFC 4301
  • Layer 3 technology
  • A framework / group of tech.
  • We can replace items like SHA1 gets replaced by SHA2 

IPsec security services
  • Authentication ( psk etc)
  • Confidentiality (hide content of original packet)
  • Integrity ( verify the packet has not be changed in transit )
  • Anti-replay ( protect against replay attacks)
IPsec components
  • Key mgmt: DH, ECDH
  • Auth: PSK,RSA, ECDSA
  • Security: ESP, AH
  • Confidentiality: DES, 3DES, AES, SEAL
  • Data integrity/hashing: MD5, SHA1, SHA2
IKEv1
Released 1998
Still very common (deprecated April 2023)
Phase 1 and Phase 2
9 messages to first tunnel
RFC 2409
Ports UDP 500 / 4500 (NAT-T)

IKEv2 
Released 2005
Current standard
IKE_SA_INIT,IKE_AUTH,CREATE_CHILD_SA,INFORMATIONAL
4 messages to first tunnel
RFC 4306 / 5996 / 7296 STD 79
Ports UDP 500 / 4500 (NAT-T)

Tunnel establishment 
IKEv1 (phase1) IKEv2 (IKE_SA_INIT)
Data channels
IKEv1 (phase2) IKEv2 (IKE_AUTH)

SA - security association
We can have multiple SA's for each network

VPN negotiation goals
  • Policy agreement
  • Key establishment
  • Authentication
  • Data protection
  • Maintenance (lifetime and DPD)

Implementing S2S VPN

For example 

Define a zone for the VPN
Network > Zone
Add 
Give a descriptive name eg "VAULTS2S"
Type: Layer3

Create a tunnel interface 
Network > Interfaces  > Tunnel
Add the next available number like tunnel.10
Bind to defatul router
Bind to Zone created above "VAULTS2S"
IP's are not needed unless we want to enable dynamic routing over  the VPN


Define crypto profiles
  • Network > Network Profiles > IKE Crypto
  • Choose your settings ( DH group / AES / etc). You can add more than one
  • Network > Network Profiles >  IPsec Crypto
  • Choose your settings

Define IKE gateway
  • Network > Network Profiles > IKE Gateways
  • Give it a name
  • Choose IKE version settings
  • Choose outside interface 
  • Choose and outside/public IP (may need to make an object if you don't have it already)
  • Choose peer public IP
  • Fill in PSK
  • Choose IKE crypto profile (phase1)

Setup IPsec tunnels
Network > IPsec tunnels
Fill in name
select your tunnel (tunnel.10)
select your IPSEC crypto profile (phase2)
define proxy ID's (select network traffic for the VPN)

A note about naming VPN tunnels and proxy IDs
There is a 63 character which is shared
A note when naming your proxy ID's this name will be used on the CLI later during troubleshooting.
My suggestion:
<vpn-name>:<local-net>-<mask>_<remote-net>-<mask>
CUSTVPN:192.168.0.0-24_172.30.20.0-24
CUSTVPN:10.1.1.5-32_172.30.10.0-24

You could include the public IP in the VPN tunnel name but probably no need
ACME-203.0.113.10:192.168.0.0-24_172.30.0.0-16

Routing
Network > Virtual routers
Add static route to the remote subnets to go via the tunnel interface (next hop: none)

Security rule (to allow the traffic)
  • Policies > Security
  • Add a rule
  • Choose the VPN source zone (you can stop there if you need as just VPN traffic will be allowed)
  • I suggest to allow your src/dst IP traffic / applications for completeness (BPA) 

CLI TS commands
test vpn ipsec-sa tunnel CUSTVPN:192.168.0.0-24_172.30.20.0-24
show vpn gateway 
show vpn ipsec-sa
show session all  (look for ike and ipsec-sa)

show session id 123
On GUI we should see pkts increasing 

Global Protect (remote access / dial in vpn)

Known as anyconnect / secure client in cisco world.
With GP we don't need an additional license for basic connectivity but there is license required for HIP checks etc.

Overview
The GlobalProtect app talks to the portal to find out what to do, then connects to a gateway to build the actual tunnel. 
The portal gives the app its config, list of gateways etc
The gateway terminates the VPN tunnel, gives IP pool, routes, rules etc.

Getting the client to your users
Best to deploy with a software deployment tool
Mobile devices can get the app from their app store

Connecting GP
When the GP connects to the portal it gets a list of gateways
Authentication (MFA etc) is configured for both portal and gateway
We can have users authenticating twice which they don't like so we can make use of authentication cookies so we only get one auth.

Portal
  • Gives the app its configuration
  • List of gw's etc
  • Usually one per deployment
  • Portal transport is HTTPS (443)
  • No policy security enforced here

Gateway 
  • Terminates the VPN tunnel and enforces access
  • Provides IP address pool, DNS servers, split-tunnel routes, idle and login timeouts, receives HIP reports
  • enforces policy 
  • Can have many per deployment but often 1-3.
  • IPsec (UDP 4501) by default, falls back to SSL (TCP 443)
  • Security policy, User-ID and HIP-based rules apply to traffic here

Types of gateway
Internal (enabled on inside interface)
Inside corporate network

External (enabled on out side interface)
Used for outside networks to access inside networks

GP application
Installed on the end user PC
Gives VPN access 
Not all features are supported on all OS but majority will be windows end users.
There is a GP feature matrix on the palo docs

A note on brute forcing
You'll want to create rules to only allow certain geo country to connect to your GP.
You can also limit so only the GP app is allow (not https login attempts)

Global Protect basic config

Palo has documentation in the admin guide

Make a zone 
Network > Zone
Type: layer 3
Name it something like GP-VPN
Enable user ID on the zone

Add tunnel interface
Network > interfaces > tunnel (tunnel.20)
set default virtual router 

Make security rules
Policies > security 

Define authentication profile
For testing you can use local
In reality you will use SAML/MFA/RADIUS etc.

Certificate for the portal
vpn.domain.com 
You can generate a self signed certificate (and choose to install it on end users so its trusted)
In reality you need to purchase one from a cert vendor and install it.

Gateway
We will use tunnel mode
select tunnel.20
use IPsec and fall back to SSL/TLS

Portal
Use same cert / auth
agent
All users
define the external gateway
FW-outside
fill in the IPv4
We can select the region here but can use "any" for testing.

You may need to download the client on the firewall from palo.
Network > GP client
You can also upload a client here (probably won't ever need to do that)

If we login

Monitoring
Network > Global Protect > Gateways
Click on RemoteUsers

Monitor > Logs > GP

Wildfire

  • Analysis environment similar to cisco AMP.
  • Take data analyse it and sandbox it and maybe create a signature
  • Can look at certain types of files (.pdf etc)
  • Can look at URLs
  • Available with basic license but need subscription for the advanced features.
  • In majority of cases we will want the wildfire subscription
Public and private clouds available 
  • Vast majority will use public cloud (closest region)
  • US government has its own cloud
  • If you had some sensitive files you want to analyse but don't want to upload you can get a wildfire appliance which will do private analysis for you in your environment 
What happens when you submit a file for wildfire analysis
  • Static: first tries existing signatures
  • Machine learning: ML used to identify variants of known threats
  • Dynamic: Decompress and decrypt obfuscated files, execute file observe what it does
  • Bare metal: hardware based solution (probably won't use)
Verdicts
Benign: didn't see anything suspicious 
Grayware: not a direct security threat (ad/spyware)
Phishing: for urls
Malicious: malware detected, signature is generated and distributed 

False positives
In some cases we can get false positives and you can change the verdict manually

Config
Devices > Setup > Wildfire 
We can limit file limits etc here
We can select what info we include

Important note
Under content ID settings tick
Allow forwarding of decrypted content
Otherwise decrypted content won't be checked 

Choose what files
Objects > security profiles > Wildfire analysis
Use default for all

In security profile enable wildfire

Monitor
Monitor > wildfire submissions

Prisma SD-WAN

SD-WAN and how modern WAN designs evolved

Before talking about SD-WAN, we need to go over legacy WAN's and how we got to SD-WAN.

Early WAN design
Hub and spoke type setup 
Hub (usually HQ site or datacenter)
Spoke (remote sites) came back to HQ
Everything came back to HQ via a site link or S2S VPN.
Site link would be MPLS
To reach the internet from a spoke you need to travel to HQ and out to the internet from there

Hybrid WAN's
Spokes would have their connection back to HQ but also had their own internet connection
DIA (direct internet access) via a cheap DSL connection etc
MPLS connections can be expensive so the idea was to save money by sending internet connections directly out via the DSL etc.
They could also use LTE backup connections.
This also aided redundancy in cases where HQ was down, remote sites could work independently via their own internet connection.
Some remote sites may be critical like a factory production line etc so you could end up with branch sites have 2 or 3 WAN connections:
  • WAN for internal traffic
  • DIA for internet access 
  • Backup LTE / wireless radio back up link in case lines are cut etc.

Problems with legacy WAN:
  • Static routing decision
  • Limit application visibility 
  • Operational complexity with VPN meshes (100+ VPN tunnels is a lot to config/update)
  • Poor path visibility 
  • Slow failover 

SD-WAN 
  • Software defined wide are networking
  • Separates WAN path control logic from individual routes and centralizes policy management on SD-WAN controller
  • Creates a leverages overlay networks across multople WAN transports (MPLS, Internet, LTE/5G, wireless radio) to connect sites
  • Overlay network is a virtual network built on top of a base network. The virtual networks flow via tunnels.
  • Underlay network can be MPLS / DSL etc.
  • Overlay network is created via tunnels
  • Common application is to use a VPN tunnel so our overlay network is encrypted

Palo alto Prisma SD-WAN

This is palo alto's SD WAN solution. CloudGenix was acquired by palo alto in 2020.
  • SD-WAN edge appliance 
  • Instant on network ION
  • Strata cloud manager / SCM
  • You connect IONs to the controller
Why use palo alto vs another vendor
Palo is very application focused, a more modern approach. 

Prisma SASE
SASE is s general term secure access service edge

We can send all traffic to the cloud and inspect it from there.

Prisma ION appliance
  • ION's are the enforcement and forwarding engines for SD-WAN
  • We don't want to jump on each one
  • We control them all from one central location
The IONs can be:
  • physical: plug and play hardware appliance 
  • virtual (AWS, Azure). These require a bit more config

Some physical IONs have integrated 5G / WIFI etc
hardware models:
  • 1200 series (small)
  • 3200 series (small)
  • 5200 series (medium)
  • 9200 series  (large)
Sites and modes
  • In our cloud manager we can setup each site.
  • Each site has a mode. 
  • When an ION is connected to that site it will inherit the mode from the site.
  • Mods
  • disabled  - (IONs can register but won't do anything)
  • analytics mode  - (passes traffic through, just watches, and reports back to cloud)
  • Traffic doesn't go to the cloud, just telemetry. This will help you build policies
  • Control mode - now the ION is reporting but also acting on traffic.
  • In most cases you will use control mode, you may start in analytics mode but end goal is control mode
Strata cloud manager or SCM
cloud based controller hosted by palo alto networks
The orchestration layer (you do all the config here)
Policy distribution system,
visibility and explanation engine 
works off telemetry 

  • IONs receive policy and config from SCM
  • IONs transmit telemetry to SCM
  • IONs utilize zero touch provisioning
Software lifecycle
We need to update the SCM and the IONs 
Palo alto upgrade the SCM, you will be notified.
SCM portal will be down but IONs will keep forwarding traffic

ION software needs to be triggered by the customer 
When it reboots there will be an interruption to traffic 

Overlay network and underlay reality 

Underlay vs overlay

Underlay networks
  • The physical transport network (MPLS, Internet, LTE) the medium the signal travels down
  • Owned by carriers / ISP
  • Forwarding behavior outside of your control once your traffic enters the network

Overlay network
  • Logical tunnels created between ION devices
  • Encapsulated traffic across one or more underlay paths
  • Enables measurement, policy enforcement and traffic steering 
ION is palo term
ION to ION is polo altos SD-WAN. In Cisco it would be Meraki to Meraki for example.

SD-WAN benefits from creating overlay networks. The wrapper typically includes new IP header, UDP transport and optional encryption.

If the ION to ION comms is across the internet it will automatically encrypt it.
If the its going across something internal/private then it will not encrypt byt default but you can turn it on

Overlay comms only happens when IONs are are both ends of the tunnel
  • ION <> ION
  • ION < Internet (encrypted by default) > ION
  • ION < MPLS (not encrypted by default but can be enabled) > ION
Underlay realities 
  • We can't have overlay without underlay.
  • Underlay is like the road. Overlay is like a bus route. 
  • People can take the bus to get from A to B
  • If the road is closed the bus can't run. People can't get there
  • SD-WAN controls the overlay but can't  control the underlay
Overlay encapsulation does not eliminate some issues like:
  • ECMP (carrier using multiple equal cost links, one of the links could be bad that day)
  • Carrier hashing (carrier breaking up traffic across multiple links)
  • Asymmetric routing (traffic going out one path and returning via another)
  • ISP variability (public internet / ISPs can have issues)
Key point to remember 
Once traffic enters the underlay network what happens inside that provider is beyone enterprise control

DIA without a remote ION
A common setup would be a branch office that has DIA for internet and a WAN for internal connections such as MPLS

ION to ION we can monitor etc
When its ION to internet we lose the featues of the SD-WAN

Prisma license activation 

Purchasing via palo alto or reseller
  • After signing an agreement and making payment with palo alto
  • You will have purchased strata cloud and IONs etc
  • Next you will get the "magic link" email
  • Now you must activate your subscription and log into SCM for the first time
Activating
  • Email arrives from palo alto
  • Scroll down and we'll see an activation section
  • The auth codes will be listed 
  • You can click activate button
  • Log into paloaltonetwork with your login (setup if not created already)
  • Active the subscription
  • Select your region: eg Germany 
  • Scroll down
  • You can give a description
  • Tick to agress to TOS
  • Click Done
  • Click Activate
Logging into SCM for the first time
  • After activation 
  • You will see "Strata cloud manager - In progress" in palo alto hub.
  • Wait approx 15 mins for the VM to spin up.
  • Then check again it should be ready. 
  • Launch strata cloud manager 

Strata cloud manager

  • Go to palonetworks hub and sign in (apps.paloaltonetworks/hub)
  • You may need to setup SSO/MFA if not setup already
  • From here you can see a link for strata cloud manager, click the "Launch" button
  • Once here you could bookmark the SCM page
Menu is on the left hand side
Some items are standard 
Others only appear if we have the license for them

Summary of the menus
  • Insights - gives you info on your traffic
  • Strata canvas - lets you generate reports
  • AI security - Related to prisma access, AI security tools
  • Incidents - View/investigate issues
  • Configuration - Where all the config of sites, IONs, policies etc (probably will spend the most time here)
  • Strata co-pilot - AI chat helper
  • Favourites - You can mark a section as favourite and it will appear there
  • Announcements - Palo alto will make announcements here
  • Help - brings you to the the AI chat helper
  • Last one is your profile - gives you tenant ID and option to sign out

ION zero touch provisioning 

What happens when we deploy a new ION connect it to the network
Physical IONs are zero touch
Virtual IONs are light touch, they require a few commands

Example with a virtual ION
Go into console of the virtual ION
confirm model
select port 1
select public WAN
2 - config
1 - DHCP
4 - Apply and return

Need to set ION key and Secret key
Go to strata cloud manager 
Go to system settings > Subscriptions > ION subscription management 
You will see your IONS
Click manage tokens
Click the "Create token" button
Choose single use
Now you can copy the ION key and Secret key

Go back to ION console
option 
2 - ION key (paste our key)
3 - Secret key (paste the secret key)

Apply and reboot
14 - submit and restart 
Y to submit changes
The ION will reboot now

After reboot
The ION will look for DHCP to get an IP address and DNS servers.
Next it will do a DNS lookup for locator.cgnx.net (remember cloud genix was the original company)
Now it will make a connection to the public IP via TLS on port 443


Provisioning ION virtual appliance in MS azure 

The virtual IONs have a v at the end eg 3102V
You can pick the size of the virtual ION you need for you use case
The vIONs will have different throughput mbps / vCPUs / RAM / DISK etc

Palo altos doc's focus on solution template but only works with 7108 or 7116 which cost more.

To deploy the smaller appliance we need to use the virtual appliance.

Create you ION key + secret key in SCM just like we did above
You need to add the NIC cards in advance
You cannot detach and redeploy existing IONs 

The ION interfaces
Controller1
Port1
Port2
Port3

Usually we would select
Port1 is my WAN
Port2 is my LAN

When provisioning the first NIC we add in azure will be Port1, the second will be Port2

We will want to preconfig VNET
At least 3 subnets
  • Controller
  • Internet 
  • LAN
At least 2 nics for WAN/LAN (the controller one gets setup during provisioning)

During the provisioning step we connect to the controller port.
The NIC needs to be bound to an existing VNET/Subnet

We can allocate a public IP
We need to uncheck the box
"Enable private subnet (no default outbound access)"

The controller NIC must have internet access as its the one that connects back to strata cloud manager.
Additional NIC's can't be added after azure ION deployment

Azure steps
Home > Market place
Search Prisma ION
Select Prisma SD-WAN ION Virtual Appliance

Select 
Subscription 
Click create
Select resource group
Give a name "ION3"
No infrastructure redundancy required (cheaper less redundancy) 
Standard

Networking 
Create the controller NIC (must have outbound internet access)
Public IP: none
security group: my-sec-group
Delete NIC when VM is deleted
Auto shutdown if needed
Monitoring 
Boot diagnostics: Enabled with managed storage account 
Review and create
Create button down the bottom

Wait 15-20 mins

Now the VM should be running.

Stop the VM to attach our new NICs
At this stage we should have controller is attached
Go to networking > Network settings
Port1 - ION-lan-nic - LAN
Port2 - ION-wan-nic-  WAN
Port3 - ION-mpls-nic- MPLS

Those NICs are connected to subnets

Since we can't make changes after the fact. We should map out for each ION
What NIC's it will use 
What ports will they be attached to
What subnets will the NICs be attached to
If we mess it up we need to delete the VM and start all over again.

Once NICs are added we can boot the VM again
Wait the 15-20 mins again

Under help > serial console 
We should see the same ION menu
pick the model
2 - ION 3210V

Config the ports
Config the ION and secret key
For MPLS use "private WAN"

Save ION details / keys in a secure place.

Apply and reboot

default username and password (this info is public)
user: elem-admin
password: hackle628)bags

In SCM we should see the azure ION appearing