Chapter 3. Advanced Networking
3.2 Remote Access VPN
Learning Objectives
- Configure a tunnel interface
- Configure a remote access VPN
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.
![main scenario](https://opentextbc.ca/wp-content/uploads/sites/445/2022/04/2022-04-24-21-16-57-image.png)
Device | Configuration |
---|---|
PaloAlto-1 | management: 192.168.0.1/24 Ethernet1/1: 10.0.0.1/24 Ethernet1/2: DHCP |
Internal (WordPress) | eth0: 10.0.0.2/24 GW: 10.0.0.1 |
KaliLinux2019.3-1 | eth0: DHCP |
Management | eth0: 192.168.0.2/24 |
Zone | Interface |
---|---|
Inside | Ethernet1/1 |
Outside | Ethernet1/2 |
VPN | Tunnel.1 |
Create a Tunnel Interface
Under Network > Interfaces in the Tunnel tab, click Add.
![Creating a Tunnel](https://opentextbc.ca/wp-content/uploads/sites/445/2023/11/Rem1.jpg)
In the new window, change the virtual router to default, and the security zone to the VPN zone.
![Tunnel Interface](https://opentextbc.ca/wp-content/uploads/sites/445/2023/11/Rem2.jpg)
Then click OK.
Enable User ACL for a Zone
Under Network > Zone, click the VPN zone.
![Create a VPN Zone](https://opentextbc.ca/wp-content/uploads/sites/445/2023/11/Rem3.jpg)
Tick the Enable user identification box.
![Enable User Identification under VPN Zone](https://opentextbc.ca/wp-content/uploads/sites/445/2023/11/Rem4.jpg)
Then press OK.
Generate Certs
Under Device > Certificate Management > Certificates, click on Generate.
![Generate a certificate](https://opentextbc.ca/wp-content/uploads/sites/445/2023/11/Rem5.jpg)
Configure these settings in the new window:
Parameters | Value |
---|---|
Certificate Name | Cert Name Here |
Common Name | The DHCP IP of Ethernet1/2 |
Certificate Authority | Tick this box |
![Generate a certificate](https://opentextbc.ca/wp-content/uploads/sites/445/2023/11/2022-04-25-00-46-16-image.png)
Then click Generate.
Create an SSL/TLS Service Profile
Under Device > Certificate Management > SSL/TLS Service Profile, click Add.
![Add SSL/TLS Service Profile](https://opentextbc.ca/wp-content/uploads/sites/445/2023/11/Rem6.jpg)
In the new window, add the certificate you generated.
![Configure SSL/TLS Service Profile](https://opentextbc.ca/wp-content/uploads/sites/445/2023/11/2022-04-25-00-52-33-image.png)
Then click OK.
Create a GlobalProtect Portal
Under Network > GlobalProtect > Portals, then click Add.
![Add a Portal](https://opentextbc.ca/wp-content/uploads/sites/445/2023/11/Rem7.jpg)
In the general tab, set the interface to Ethernet1/2.
![GlobalProtect Portal Configuration](https://opentextbc.ca/wp-content/uploads/sites/445/2023/11/Rem8.jpg)
In the authentication tab, select SSL/TLS profile you created in the previous step, then click Add.
![Adding SSL/TLS Profile](https://opentextbc.ca/wp-content/uploads/sites/445/2023/11/Rem9.jpg)
In the new window, change the authentication profile, then press OK.
![Adding Authentication Profile](https://opentextbc.ca/wp-content/uploads/sites/445/2023/11/Rem10.jpg)
In the agent tab, in the agent section, click Add.
![Adding the agent](https://opentextbc.ca/wp-content/uploads/sites/445/2023/11/Rem11.jpg)
In the internal tab in the Internal gateway, click Add.
![Configure Internal Gateway](https://opentextbc.ca/wp-content/uploads/sites/445/2023/11/Rem12.jpg)
In this window, change the Address to select IP, and in the IPv4 box, type in the IP of Ethernet1/2.
![Set the IP address for Internal Gateway](https://opentextbc.ca/wp-content/uploads/sites/445/2023/11/Rem13a.jpg)
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.
![Add the Root CA certificate](https://opentextbc.ca/wp-content/uploads/sites/445/2023/11/2022-04-25-01-26-39-image.png)
Then press OK.
Create a GlobalProtect Gateway
Under Network > GlobalProtect > Gateways, click Add.
![Add a Gateway](https://opentextbc.ca/wp-content/uploads/sites/445/2023/11/Rem14.jpg)
In the general tab, set the interface to Ethernet1/2.
![GlobalProtect Gateway Configuration](https://opentextbc.ca/wp-content/uploads/sites/445/2023/11/2022-04-25-01-35-57-image.png)
In the Authentication tab, add your SSL/TLS profile, then click Add.
![SSL/TLS Service Profile](https://opentextbc.ca/wp-content/uploads/sites/445/2023/11/Rem15.jpg)
In the new window, select your authentication profile, then click OK.
![Authentication Profile](https://opentextbc.ca/wp-content/uploads/sites/445/2023/11/Rem16.jpg)
Under the agent tab, in tunnel settings, tick the tunnel mode checkbox and select the tunnel you made.
![Tunnel Mode and Interface](https://opentextbc.ca/wp-content/uploads/sites/445/2023/11/Rem17.jpg)
In client settings, click Add.
![Client Settings](https://opentextbc.ca/wp-content/uploads/sites/445/2023/11/Rem18.jpg)
Make sure the Any checkbox is ticked on top of the OS category, then press OK.
![Select Client as Any](https://opentextbc.ca/wp-content/uploads/sites/445/2023/11/Rem19.jpg)
In client IP pool settings, add an IP pool range of this:
172.16.10.1-172.16.10.10
![IP Pool Configuration](https://opentextbc.ca/wp-content/uploads/sites/445/2023/11/Rem20.jpg)
Then press OK. Don’t forget to commit the configuration!
Install the GlobalProtect Client on Kali
Open up a terminal window and run the following commands:
#curl -L https://bit.ly/32Ljx1y --output GP.deb
#sudo dpkg -i GP.deb
#globalprotect connect -p [IP of Palo Alto Ethernet1/2 Here]
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.
![Installing GlobalProtect on Kali Linux](https://opentextbc.ca/wp-content/uploads/sites/445/2023/11/2022-04-25-01-45-47-image.png)
Test Remote Access VPN
On Kali, after connecting to GlobalProtect, navigate to the IP of the WordPress Server (Internal).
![Verify your configuration](https://opentextbc.ca/wp-content/uploads/sites/445/2023/11/2022-04-25-01-50-02-image.png)
If everything was correct, it should display the WordPress site!