Paloalto
Paloalto
Contents
Dedication xv
A Practical Introduction 1
Chapter 1. Basics
4.1 IPsec VPN between Palo Alto on Premise and Microsoft Azure 197
4.2 Deploy Palo Alto to Azure 221
4.3 Site-to-Site VPN between Palo Alto on Premise and Palo Alto in the Azure 235
Capstone Project
The Accessibility Checklist table was adapted from one originally created by the Rebus Community (ht
tps://press.rebus.community/the-rebus-guide-to-publishing-open-textbooks/back-matter/accessibility-as
sessment/) and shared under a CC BY 4.0 License (https://creativecommons.org/licenses/by/4.0/).
2 Palo Alto Firewall
A Practical Introduction
What this book aims to accomplish is a practical understanding of the usage and functionality of Palo
Alto firewalls. Learn by doing will be a strong driving force in the coming labs and examples in this
book, and I encourage you to try and extend these labs and have fun with them.
Chapter 1. Basics 3
Chapter 1. Basics
3
1.1 GNS3 and Palo Alto 5
Learning Objectives
Scenario: In this lab, we’re only going to start with the basics. Connecting to and configuring basic
settings on Palo Alto. There will be a little console usage, but don’t fret. The rest of these will involve
some sort of GUI based option
5
6 Chapter 1. Basics
Device Configuration
Make sure to start all your devices, then double click the Palo Alto device. You should see a console
window pop up. We need to wait till the prompt changes to “PA-VM”. Otherwise, we cannot login.
After about 15 mins, hit enter, and the prompt should change. Login with the following credentials:
Username: admin
Password: admin
1.1 GNS3 and Palo Alto 7
It will prompt you to change your password. Once you’re finished changing your password, you will
see the prompt change to this:
I promise you that this is one of the only times we will be interfacing with the command line. But this
is necessary for setting up a static IP. Type these commands into the now open console:
1) configure
2) set deviceconfig system type static
3) set deviceconfig system ip-address 192.168.0.1 netmask
255.255.255.0
4) commit
Line 2: Configuration mode command to set the management interface to a static address.
Line 4: Every time you make any change in Palo Alto, you must commit the changes for it to take
effect.
Double click on the webterm device. A Firefox window should immediately pop up:
On the top address bar, type in “https://192.168.0.1” (without quotes) then hit enter.
10 Chapter 1. Basics
To get past this, click advanced, then click “Accept the Risk”.
Now that we’re past the scary-looking warning screen, type in the credentials to the user: admin. The
password should be the password you set after initially logging in through the command line.
Now, we’re in the web interface for the Palo Alto device!
In device settings, we can change the hostname, create users, generate certs, etc. The bottom line is that
it is used for general system administration. We will be delving more into this as the chapters progress.
In network settings, we can change interface IP addresses, create tunnels, and setup routing.
We won’t be using the objects tab very much, however, it is important to know about it. Here, we can
create pre-defined address objects, define ports, and create security policy templates.
The policies tab is arguably the most important tab of the firewall. Here we will configure security
policies and define NAT rules. An important thing to note is these pre-existing security policies.
Everything within a zone is allowed, whereas a zone to another zone is not allowed.
18 Chapter 1. Basics
Head over to the device tab, and click the cog icon to the right of device settings.
Change the hostname to anything but PA-VM. I will change mine to “BruhloAlto”.
1.1 GNS3 and Palo Alto 19
After changing the hostname to anything you desire, click on OK at the bottom right of the screen.
After any change in Palo Alto, you will have to commit the changes. When you make changes in Palo
Alto, it is put into what we call a “candidate configuration.” This means that changes do not take
effect immediately. After we change some settings, we need to press the commit button on the top
right.
Pressing commit will push the candidate configuration to the running configuration. This is helpful
because the Palo Alto device is smart enough to tell you if a configuration won’t work without
affecting your active network settings. Let’s commit these changes by clicking commit again.
If all is well, after a while you should see something similar to this. It means everything worked!
Refresh the page by pressing the F5 key (or clicking on the refresh button) on the webterm web
browser. If the hostname changed, the tab will change to the hostname you set.
You can also see the changes being reflected on the console interface if you press enter.
Learning Objectives
Scenario: In this lab, we are going to configure our friend DORA (Discover Offer Request
Acknowledge) the hander of addresses. And we’ll also be configuring internet access so that clients
may finally browse their precious Internet with SNAT (Source Network Address Translation).
25
26 Chapter 1. Basics
Device Configuration
management: 192.168.0.1/24
PaloAlto Ethernet1/1: 10.0.0.1/24
Ethernet1/2: DHCP
Zones Interfaces
Inside Ethernet1/1
Outside Ethernet1/2
Under the network tab, click zones, then add on the bottom left of the screen.
In here, we just change the name and type of zone. For information’s sake. We will only be dealing
with (mostly) layer 3 things in Palo Alto for this book. After that, press OK. Remember to create Inside
and Outside zones (Remember to also commit changes from time to time!)
1.2 DORA the DHCP Provider 27
The first thing we want to do when configuring an interface is changing the interface type to layer 3,
the virtual router to default, and changing the security zone to the desired zone. In this case, we have to
change it to inside for ethernet1/1, and outside for ethernet1/2.
Now, under the IPv4 tab of the opened window, click on Add, then type in the address and prefix of the
interface.
By default, a Palo Alto interface is not pingable. In a lab environment, checking if pings are working is
a good sanity test. Go to the advanced tab, click the drop-down menu next to the management profile,
then click New.
Call this whatever you want, but make sure to tick the ping option under networking services. Then
press OK.
It’s almost the same thing as setting up a static interface, but you act differently in the IPV4 menu.
Instead of typing in an IP address and mask, you just specify that this is a DHCP client.
If all is well after a commit, you will be able to check your DHCP IP address by clicking “dynamic
DHCP client” in the main network menu.
First, we need to define the interface, I set that to ethernet1/1 because it is our LAN. Then, I press Add
and define a range that fits the network subnet.
After that, we need to configure some DHCP options under the options tab. Here we need to define the
gateway, (which is usually the interface IP address) subnet mask (which is usually 255.255.255.0), and
a DNS server. I just use Google’s DNS server as an example.
When opening up your webterm for “Client”, click the bottom left button, then click terminal.
Type in ip a or ifconfig on the terminal. If you see an IP address under eth0, the DHCP Server
worked!
Now, let’s ping our Palo Alto device. Type in ping 10.0.0.1. If all works out, you should see this:
This means that everything so far worked! Press Ctrl+C to stop pinging the Palo Alto device.
1.2 DORA the DHCP Provider 39
In the policies tab, we want to create a new policy. Click on new in the bottom left of the Palo Alto web
interface.
Under the general tab, we just want to give it a name. We will only be working with universal rules.
Under the source tab, we specify the inside zone (from). In this case, it will be the “Inside” zone.
In this case, we want to translate packets originating from the Inside to go to the outside zone using the
interface address of ethernet1/2. This would be Port Address Translation Overload. Under the general
tab, just change the name.
Under the original packet tab, click Add then make the source zone inside. As for the destination zone,
make it outside.
Figure 1.45: Set a Source Zone and Destination Zone for NAT
44 Chapter 1. Basics
Under translated packet on source address translation. Specify the translation type as Dynamic IP and
port, the address type as interface address, and the interface as ethernet1/2(The interface in the outside
zone) After that, click OK.
If both of these work. You have successfully configured DHCP and SNAT properly!
1.3 SNAT 47
1.3 SNAT
Learning Objectives
Prerequisites:
Scenario: Source NAT is what your router does on a daily basis to provide you with Internet access
just so you can go on social media and complain about how slow your internet is. Your router at home
does this all automatically for you. But since we’re real network engineers with a firewall on one
hand, and determination on the other. Let’s learn how to configure this all by ourselves using Palo
Alto! We’ve already configured this in the previous chapter, so let’s just go over it again!
47
48 Chapter 1. Basics
Device Configuration
Ethernet1/1: 10.0.0.1/24
PaloAlto Ethernet1/2: DHCP
Management: 192.168.0.1/24
Zone Interface
Inside Ethernet1/1
Outside Ethernet1/2
1.3 SNAT 49
We want to translate packets originating from the Inside to go to the outside zone using the interface
address of ethernet1/2. This would be Port Address Translation Overload. Under the General tab, just
change the name.
Under the original packet tab, click add then make the source zone inside. As for the destination zone,
make it outside.
Figure 1.52: Set a Source Zone and Destination Zone for NAT
Configure these settings under the translated packet tab in the source address translation area:
Parameter Value
Interface Ethernet1/2
IP Address None
52 Chapter 1. Basics
If your desired webpage showed up, you have successfully configured SNAT!
1.4 DNAT 55
1.4 DNAT
Learning Objectives
Prerequisites:
Scenario: When I think of DNAT (Destination Network Address Translation) I always think of the
days of setting up port forwarding for all my favorite games just so I could host server friends can
play on. You can think of DNAT like this too if it helps! The goal of this lab is to reach WordPress
from the Outside. So, users only enter the IP address of Ethernet 1/2 in the Outside webterm and the
firewall redirects the traffic to WordPress.
55
56 Chapter 1. Basics
Device Configuration
Ethernet1/1: 10.0.0.1/24
PaloAlto Ethernet1/2: DHCP
Management: 192.168.0.1/24
Zone Interface
Inside Ethernet1/1
Outside Ethernet1/2
1.4 DNAT 57
In this window, we will add the IP of the WordPress server to reference it easier.
We also want to put our firewall’s “public” IP (the interface facing the NAT cloud) here too. You can
find the firewall’s DHCP address under network > interfaces. Then click the hyperlink under IP
address:
Under Policies > NAT, click the Add button on the bottom.
Parameters Value
Service service-http
Under the translated packet tab, Destination Address Translation. Configure these:
Parameters Value
Translated Port 80
Under the source tab, add the outside zone under the source zone:
Under the destination tab, add the inside zone as the destination zone:
Test DNAT
Using the Outside webterm. Navigate to the public IP address of your firewall. If any webpage shows
up, whether it’s the WordPress site or the one below. You got DNAT working!
69
2.1 Work with Applications 71
Learning Objectives
Prerequisites:
Scenario: Employees can doze off and do other things that they’re not supposed to do during work
time. If only there was an easy application-aware next-generation firewall that can block these
applications! (Hint: It’s this firewall!) In this lab, we are going to add applications to the security
policy to only allow specific traffic to pass through the firewall.
71
72 Chapter 2. Security Tuneup
Device Configuration
Ethernet1/1: 10.0.0.1/24
PaloAlto Ethernet1/2: DHCP
Management: 192.168.0.1/24
Zone Interface
Inside Ethernet1/1
Outside Ethernet1/2
2.1 Work with Applications 73
Under polices > security, create a new security policy that allows inside to outside.
• dns
• ssl
• web-browsing
• dns-over-https
On the client machine, navigate to any website, and you’ll see it works:
You can allow Ping application under application settings and then you can verify whether you are able
to Ping or not.
2.2 Deal with Bad Actors 77
Learning Objectives
Prerequisites:
Scenario: In this lab, we will learn how to block a specific website and how to prevent script kiddies
from succeeding with the infinite ping tool they downloaded from the sketchiest site you’ve ever seen.
Kali acts like an attacker machine and we are going to attack the firewall through port Ethernet1/2.
Then, we’ll enable DoS Prevention in the firewall to prevent attacks.
77
78 Chapter 2. Security Tuneup
Device Configuration
management: 192.168.0.1/24
PaloAlto-1 Ethernet1/1: 10.0.0.1/24
Ethernet1/2: DHCP
Zone Interfaces
Inside Ethernet1/1
Outside Ethernet1/2
2.2 Deal with Bad Actors 79
Under object > custom objects > URL category, click Add. Click cancel on the pop-up.
Here we can block 5, 6, or multiple sites. But here we will use just 1. Give it a name, then click Add.
Enter some websites you would like to block. Here I have added a sample website
(www.thegreattechadventure.com) (https://www.thegreattechadventure.com) you can also use
wildcards if you want.
Block a Website
Under the source tab, add the Inside zone under the source zone:
Under the destination tab, add the Outside zone under the destination zone:
Under the Service/URL Category tab, add the created URL category you created in the previous step.
Under Device > Response pages. Click on Disabled beside Application Block Page.
Open up Firefox on the Client machine, and try to connect to the URL you blocked. If all is right, you
should see a blocked page.
After entering into the live graphical environment and testing for internet connection. Open up the
terminal.
For the IP, use the IP of the interface in the outside zone. It should be in the 192.168.122.0/24 range.
As you can see, there are many entries here for ping. We want to prevent floods like these.
96 Chapter 2. Security Tuneup
Under Objects > Security Profiles > DoS Protection. Click Add.
Set the type to Classified and under Flood protection, click the checkbox on the SYN Flood, UDP
Flood, and ICMP Flood tabs.
Parameter Value
Action Protect
Schedule None
Aggregate None
Address source-IP-only
Under Network > Network Profiles > Zone Protection. Click Add.
Under the flood protection tab, tick SYN, ICMP, and UDP.
Under the Reconnaissance Protection tab, tick enables on all boxes, and change the action to block.
Under the Packet Based Attack Protection tab, under the IP drop subtab, tick on Spoofed IP address
and Strict IP Address Check.
Under the Packet Based Attack Protection tab, under the TCP drop subtab, tick on TCP SYN with
Data and TCP SYNACK with Data.
Under the Packet Based Attack Protection tab, under the ICMP drop subtab, tick on ICMP Ping ID 0,
ICMP Fragment, and ICMP Large Packet(>1024).
Under the Zone Protection category, select the profile you just created.
Click OK.
Run Pentmenu again using the previous options, then Ctrl+C after 3 seconds.
Under Monitor > Logs > Threat. You should see an entry for an ICMP flood.
Learning Objectives
Prerequisites:
Scenario: Here we will test out the file blocking, anti-malware, spyware, and spam features of Palo
Alto. Sometimes we should block clients from downloading certain file types, and on top of that,
implement some sort of antivirus and antispyware solution. We’ll also be “testing” wildfire. A feature
that thwarts new exploits from happening.
111
112 Chapter 2. Security Tuneup
Device Configuration
management: 192.168.0.1/24
PaloAlto-1 Ethernet1/1: 10.0.0.1/24
Ethernet1/2: DHCP
Zone Interface
Inside Ethernet1/1
Outside Ethernet1/2
2.3 Block Files and Viruses 113
Under Objects > Security Profiles > Antivirus. Click on default, then Clone.
Rename the profile, and tick the option for packet capture.
Under the signature policies tab, click Add, name it, then configure these:
Rule Configuration
Action: Alert
Medium
Severity: Medium, Low, Informational
Action: Drop
HighAlert
Severity: Critical, High
118 Chapter 2. Security Tuneup
Under Objects > Security Profiles > File Blocking. Click Add.
Configure these settings using the add button on the new window that just spawned.
Name Properties
Applications: any
PDF File Types: pdf, encrypted-pdf
Action: Block
Applications: any
EXE File Types: exe, com
Action: Block
120 Chapter 2. Security Tuneup
Configure these settings using the add button on the new window that just spawned.
Name Properties
Applications: any
Detect
File Types: archive, jar, ms-office
122 Chapter 2. Security Tuneup
Under Polices > Security. Click the policy for inside to outside you created.
Under the Actions tab, in the Profile Setting subsection. Configure these:
Parameters Value
Since I do not have a licence, we cannot demonstrate all of these profile features, as you can see when
you commit.
This is ok, we can still test out the file blocking features.
126 Chapter 2. Security Tuneup
On the client, navigate to a website that hosts PDF files (I used panedufiles.com (https://panedufiles.co
m)).
Try and open one of these. If it shows the file blocking screen, it means that the file blocking worked!
Learning Objectives
• Configure VLANs
• Configure captive portal
Prerequisites:
• Setup Zones
• Some interface configuration
• Configuring VLANs on the GNS3 switch
• Knowledge of previous labs
Scenario: Now let’s push for some advanced networking configurations. Sometimes you just have to
push departments into their own VLANs for organization and compliance. Say we have a guest and
employee network. We want to prevent communication between the two as much as possible. We
would also want to implement some sort of login to access the internet for guests, much like hotels.
129
130 Chapter 3. Advanced Networking
Device Configuration
management: 192.168.0.1/24
Ethernet1/1: Trunking
PaloAlto-1 Ethernet1/1.10: 10.10.10.1/24
Ethernet1/1.20: 20.20.20.1/24
Ethernet1/2: DHCP
Zone Interface
VLAN10 Ethernet1/1.10
VLAN20 Ethernet1/1.20
Outside Ethernet1/2
3.1 Captive Portal 131
Interface Configuration
Interface Name: 10
Tag: 10
Config tab:
– Virtual Router: default
Ethernet1/1.10
– Security Zone: VLAN10
IPv4:
– Type: Static
– IP: 10.10.10.1/24
Interface Name: 20
Tag: 20
Config tab:
– Virtual Router: default
Ethernet1/1.20
– Security Zone: VLAN20
IPv4:
– Type: Static
– IP: 20.20.20.1/24
Well, it’s not really advanced, but under Policies > Security, click Add.
We will be making a policy to allow VLAN10 and VLAN20 into the Outside zone. We can do this by
adding multiple zones under the source zone.
Still not really advanced. But under Policies > NAT, click Add.
We want to make a Static NAT policy for the Internet connectivity. But under the Original Packet tab,
we can select multiple zones.
Add a User
Under Device > Local User Database > Users. Click Add.
Create any user you want with a username and password. Here is an example:
Under Device, User Identification in the Authentication Portal Settings tab, click the settings icon.
Parameter Value
Mode Transparent
146 Chapter 3. Advanced Networking
In this window, we just want to tick the Enable User Identification checkbox.
On the VLAN-20 webterm, navigate to any website. If all was right, the desired website should appear.
On the VLAN-10 webterm, navigate to any website. If all was right, you should see a certificate error,
accept this. Then you should see a login page.
Enter your credentials and log in. If all was successful, you should see the website appear.
Learning Objectives
Prerequisites:
• Setup Zones
• Some interface configuration
• Create a new user
• Create an auth policy
• Policy that allows VPN to Inside
• Policy that allows Outside to VPN
• Knowledge of previous labs
Scenario: VPNs aren’t just about changing your location like many advertisements say they’re for.
What it’s really used for is to securely access a remote location’s resources like your workplace, or
even your own home. That is what this lab will focus on. We are going to install GlobalProtect Agent
on Kali and then we’ll try to reach the Internal through VPN connection.
155
156 Chapter 3. Advanced Networking
Device Configuration
management: 192.168.0.1/24
PaloAlto-1 Ethernet1/1: 10.0.0.1/24
Ethernet1/2: DHCP
Zone Interface
Inside Ethernet1/1
Outside Ethernet1/2
VPN Tunnel.1
3.2 Remote Access VPN 157
In the new window, change the virtual router to default, and the security zone to the VPN zone.
Generate Certs
Parameters Value
Under Device > Certificate Management > SSL/TLS Service Profile, click Add.
In the authentication tab, select SSL/TLS profile you created in the previous step, then click Add.
In the new window, change the authentication profile, then press OK.
In this window, change the Address to select IP, and in the IPv4 box, type in the IP of Ethernet1/2.
Press OK twice to get back to the agent tab. Then in the trusted root ca section, add your generated
cert, and tick the box to install in local root certificate store.
In the Authentication tab, add your SSL/TLS profile, then click Add.
In the new window, select your authentication profile, then click OK.
Under the agent tab, in tunnel settings, tick the tunnel mode checkbox and select the tunnel you made.
Make sure the Any checkbox is ticked on top of the OS category, then press OK.
172.16.10.1-172.16.10.10
When connecting, it will show an error about validation. Type in y then press enter.
It will also ask for your username and password. Enter the one you created prior.
On Kali, after connecting to GlobalProtect, navigate to the IP of the WordPress Server (Internal).
Learning Objectives
Prerequisites:
Scenario: This one is a bit tricky since you will be managing both devices. A site-to-site VPN is what
your company would set up if you had offices in other locations without being directly connected to
each other. But in this lab, we’ll just take it easy and assume that they have a direct connection to each
other. So, we are going to configure site-to-site VPN between two Palo Alto firewalls. Then, you
should be able to ping from client-1 to client-2.
183
184 Chapter 3. Advanced Networking
Device Configuration
management: 192.168.0.1/24
Site-1 Ethernet1/1: 10.0.0.1/24
Ethernet1/2: 1.1.1.1/24
management: 192.168.0.2/24
Site-2 Ethernet1/1: 172.16.10.1/24
Ethernet1/2: 1.1.1.2/24
Zone Interface
Inside Ethernet1/1
Zone Interface
Inside Ethernet1/1
Under Network > Network Profiles > IKE Gateways, click Add.
Parameter Value
Interface Ethernet1/2
Parameters Value
Interface Ethernet1/2
Parameters Value
Parameters Value
Destination 172.16.10.0/24
Interface tunnel.1
Parameters Value
Destination 10.0.0.0/24
Interface tunnel.1
On any client device, try and ping the other client on the other site.
If you can ping the other client in the other site, everything worked!
Chapter 4. Cloud Technologies 195
195
4.1 IPsec VPN between Palo Alto on Premise and Microsoft Azure 197
4.1 IPsec VPN between Palo Alto on Premise and Microsoft Azure
Learning Objectives
Scenario: We are going to connect on-premise Palo Alto to Azure Virtual Gateway. This is going to
be IPsec VPN between Palo Alto and Azure. First, we’ll configure Azure and then connect Palo Alto
through Port1 to Azure Virtual Gateway.
197
198 Chapter 4. Cloud Technologies
Azure Configuration
◦ Name: Azure-VPN-Pal
◦ Region: West US
◦ Generation: Generation1
◦ Gateway subnet address range: 10.0.0.0/24
◦ Public IP address name: AzurePublic
Click on Create and Review. It takes around 25 minutes to deploy a virtual network gateway
in Azure.
5. Go to Virtual network gateway and create a connection in Virtual network gateways >
Azure-VPN-Pal > connections > Add
Based on the Microsoft article “About cryptographic requirements and Azure VPN
gateways” (https://learn.microsoft.com/en-us/azure/vpn-gateway/vpn-gateway-about-complia
nce-crypto), by default, integrity is SHA384, SHA256, SHA1, MD5, and encryption is
AES256, AES192, AES128, DES3, DES. So, we’ll select SHA1 and AES128 in FortiGate.
After doing this step, you should receive a Public IP address in the Overview tab.
2. Create a static route to tunnel1 and ethernet1/1 as following figures. Traffic related to
10.0.0.0/16 should go through the tunnel. The rest of the traffic should go through the default
Gateway.
6. Go to Network > IPsec Tunnels > Add. Select the previous profile you have created as
Figure 4.34.
7. Create a firewall policy from LAN to VPN zone and from VPN to LAN.
Figure 4.36: Create a security policy “LAN-AZ.” Select the source zone as LAN.
4.1 IPsec VPN between Palo Alto on Premise and Microsoft Azure 217
Figure 4.37: Create a security policy “LAN-AZ.” Select destination zone as VPN.
Figure 4.39: Create a security policy “AZ-LAN.” Select source zone as VPN.
218 Chapter 4. Cloud Technologies
Figure 4.40: Create a security policy “AZ-LAN.” Select destination zone as LAN.
Verify Connections
Learning Objectives
Scenario: In this lab, we’ll learn how to deploy Palo Alto Firewall to Azure.
221
222 Chapter 4. Cloud Technologies
5. Leave other tabs as default and press on “Review + create.” It will validate your information
and then you can create a Palo Alto Firewall.
6. Then, it will start deployment of Palo Alto. It takes around 5 minutes to deploy Palo Alto.
7. After deployment is completed, go to Resource group > hamid > Overview and look for
Palo Alto Public IP address.
8. Type the IP address in the browser. You should be able to see the Palo Alto credentials page.
Enter your username and password to log in to the firewall.
9. Azure will create three interfaces, as Figure 4.57. By default, Eth0 is set as a management
port and this port has the public IP address and you can reach the GUI through this IP
address. Eth1 is set as an Untrusted interface and to be able to access the firewall through this
port, you should set the Public address for this port.
10. To set interfaces in the firewall, you should go to Network > Interfaces and set both
ethernet1/1 and ethernet1/2 as a DHCP client. Also, uncheck “Automatically create default
route pointing to default gateway.”
11. Then, you set a default route and set a zone for each interface.
and then in Ethernet1/1 under the advanced tab, set management interface profile as Figure
4.62.
13. Create a public IP address and assign the public IP address to interface eth1 (Untrusted
interface).
14. Open the browser and type the public IP address. You should be able to access the firewall.
4.3 Site-to-Site VPN between Palo Alto on Premise and Palo Alto in the Azure 235
4.3 Site-to-Site VPN between Palo Alto on Premise and Palo Alto in
the Azure
Learning Objectives
Scenario: In this lab, we will create a site-to-site VPN from Palo Alto on-premise to Palo Alto in the
Azure. Knowing the configuration of section 4.2 is necessary for this lab. I have created management
and ethernet1/1 as a DHCP, so they will receive an IP address from Cloud.
235
236 Chapter 4. Cloud Technologies
1. Configure the interfaces of the firewall. Set Ethernet1/1 as a Untrust Zone and Ethernet1/2 as
a Trust Zone.
3. Create two static routes, one pointing to 142.232.197.254 (on-Prem Default Gateway) and the
other one sending the traffic of Azure through the tunnel.
4. For setting up, site-to-site VPN we will use default IKE Crypto, IPsec Crypto profiles and we
will only set IKE Gateway and IPsec Tunnel as following figures. You have to configure
local and peer identification.
5. Finally, create two security policies, one from Trust to Untrust zone and the other from
Untrust to Trust zone.
Azure Configuration
1. Create a Palo Alto firewall in Azure and configure the interfaces. You need to do all steps in
section 4.1 and assign public IP address to Ethernet 1 (Untrust Zone).
2. Create a route in Azure pointing to Trust interface.
4. For setting up, site-to-site VPN we will use default IKE Crypto, IPsec Crypto profiles and we
will only set IKE Gateway and IPsec Tunnel as figures 4.85 and 4.86.
5. Finally, create two security policies, one from Trust to Untrust zone and the other from
Untrust to Trust zone.
6. Add windows or Linux VM to Trust Subnet. This VM is for testing ping from Azure side to
on-prem. We will not create a public IP address for the VM.
7. Now, you should be able to ping and your tunnel should be green.
Capstone Project
Well, this is it. The final lab. This will test everything you have learned so far and maybe some more. I
will list the requirements and come up with a scenario below. I will not be providing IP addresses or
zone information. If you can meet the requirements below, you can consider yourself pretty good at
Palo Alto. Good luck!
251
252 Capstone Project
Scenario: ODI (Openly Deceptive Insurance) is a company looking for a consultant to do all their
networking. They have 2 office locations, one in Vancouver, and the other one in England. In the
Vancouver site, they want 2 VLANs, VLAN 10 and VLAN 20. VLAN 20 will serve as a login only
network, whereas VLAN 10 is for all the employees. Vancouver also hosts their internal webserver
where they keep internal records of very important things like their next scam, and list of really good
Netflix shows. They also have a site-to-site setup with their England site to access their other
resources. But that site-to-site is mainly so that the Vancouver employees have access to British
Netflix. The England site is responsible for hosting the public webserver in the DMZ, as well as being
the main source of remote access employees so they can access the internal webserver by connecting
to the England site online.
Requirements
“Vancouver Site”:
• VLAN Configuration
• Captive Portal on VLAN 20
• DHCP Server to provide addressing for VLAN 10 and VLAN 20
• Access Internet through Site to Site VPN
• Site to Site VPN
“England Site”:
Video Guide
This video will go over how I set it up and maybe some other additional tips and tricks. Download
Captions (https://drive.google.com/file/d/1UIu4nOmj9RyPkaQWw-YOrzpmbjMMzkL8/view?usp=sha
ring)
Capstone Project 253
One or more interactive elements has been excluded from this version of the text. You can view them
online here: https://opentextbc.ca/paloalto/?p=331#oembed-1 (#oembed-1)
Appendix: GNS3 Basics 255
In this chapter, we’ll be going through the basics in GNS3. Try to play and familiarize yourself with
this environment as this is a good tool for network simulations.
Configure Your Palo Alto Firewall Template and Adding the Device
Lets start by modifying the GNS3 template of the Palo Alto firewall by right clicking the existing
template, and clicking on “configure template”.
255
256 Palo Alto Firewall
Make sure the max amount of RAM is set to at least 4096MB, and the amount of vCPUs are at least 2.
Now close the window, and drag in the Palo Alto device from the left hand pane.
Once you’ve dragged in the Palo Alto device, right click it, then click “start”.
Webterm Installation
Let’s begin by clicking “new template” on the bottom left hand of GNS3.
We want to install this into the GNS3 VM. Click on the option to “Install an appliance from the GNS3
Server”, then click Next.
On the next window, search for “webterm”, select the option under “guests”, then click install.
On the next screen, ensure that “install the appliance on the GNS3 VM”, is already selected, then click
Next.
Drag in the webterm device from the left pane. Then once it finishes downloading the docker file, right
click it and select “edit config”.
A window will pop up containing the device’s network configuration. We want to modify this file to
match the specified IP address. The final modification should look like a little like this:
After these modifications, click on the save button on the bottom right of the window.
Appendix: GNS3 Basics 265
We just need to uncomment these 2 lines to enable DHCP. Click on save and we’re done.
Please see the example in the GIF below (if using an offline version of this book, go to the web version
of the appendix of Palo Alto Firewall (#back-matter-gns3)):
The NAT device in GNS3 will allow devices in our virtual topology to communicate with the internet.
This device is under the all devices section of GNS3.
Make sure you select the GNS3VM as the option whenever you see this window (applies for all
devices).
Sometimes we need to use Kali to demonstrate an attack. Please keep in mind that Kali is used strictly
for testing purposes.
Let’s begin by clicking “new template” on the bottom left hand of GNS3.
We want to install this into the GNS3 VM. Click on the option to “Install an appliance from the GNS3
Server”, then click Next.
On the next window, search for “kali”, and select the non “CLI” option.
On the next screen, ensure that “install the appliance on the GNS3 VM”, is already selected, then click
Next.
Next again.
Expand the “2019” option, and download both missing files. Also, you can download the latest version.
Version 2019 is more stable in GNS3.
After that, import the downloaded file to the specified 2019 selection.
It should take a second, but GNS3 will start to load up the ISO into the GNS3VM.
After that, click the 2019 version again, then click Next.
Sometimes we need a basic webserver to demonstrate website functionality. This can be accomplished
using the WordPress appliance in GNS3. Start by clicking the new template button on the bottom of the
page.
Just press next for the following dialog boxes, and you should now have WordPress!
Configure WordPress
After changing the interface configuration, start the machine. You will see a dialogue box:
Press enter and you’ll see the device under some basic configuration. Once you get to the prompt, you
can exit that window, and you will have WordPress ready!
Usually we just use switches to connect multiple devices together in GNS3. However, it can also be
used for VLANs. Start by dragging one in and double clicking it.
Here you can see that they are all basically untagged. To configure a specific port, simply double click
your desired port.
Configure the necessary settings for them (access is for tagging, dot1q is for trunking).