A site to site VPN allows networks in multiple fixed locations (branch offices) to establish secure connections with a Headquarters Datacenter network over the Internet. In this example we will configure a Palo Alto Application Firewall to establish an IPSec tunnel with a Cisco Router. I will not go into Cisco ios configuration, since there are many guidelines over the internet about it.
Let’s suppose that the headquarters network is 10.1.1.0/24 and a local internet address that will be used for the tunnel is 188.8.131.52, additionally the remote network is 10.2.2.0/24 and the remote peer internet address is 184.108.40.206.
First open up Palo Alto Networks gui and goto Network – Interfaces and create a new tunnel interface, let’s say tunnel.2. Type in the standard MTU size of 1500 bytes, leave empty the IP address since this is used for dynamic routing and tunnel monitoring purposes, select the allow ping Management Profile, select your virtual router and Zone internal since we will bring the tunnel to an internal subnet and finally press ok to save the settings.
Then select Network – Zones at the menu and edit the internal zone (that is bound to the interface on the internal network). The internal ethernet interface and tunnel.2 should be checked. Press ok to save the settings.
Now let’s configure the IKE phase1 parameters by going to Network – Network Profiles – IKE Crypto and create a new IKE profile (e.g. name it IKE_BRANCH) that matches with the remote Cisco router ISAKMP profile (crypto isakmp policy command). For example let’s do the following DH Group 2, Encryption aes128 and 3des, Hash Algorithm sha1 and Lifetime 8 hours (indicative only values). Some options are more secure than others, but more resource hungry and less faster.
For IKE Phase2 parameters goto Network – Network Profiles – IPSec Crypto and create a new IPSec profile (e.g. name it IPSEC_BRANCH) that matches with the remote Cisco IPSec parameters (crypto ipsec transform-set command). For example let’s configure ESP authentication md5 and sha1, ESP encryption aes128 and 3des DH Group no-pfs and lifetime of 3 hours (indicative only values).
Now click on Network – Network Profiles – IKE Gateways to setup the configuration information necessary to perform IKE protocol negotiation between local and remote peer nodes. Input a name for IKE Gateway e.g. HQ_TO_BRANCH, select the internet interface of your firewall and select your internet ip address (in our case 220.127.116.11), at the peer address input the branch office’s router internet address (in our case 18.104.22.168), leave the dynamic checkbox unchecked (if a dynamic address is required, check the box and select the FQDN hostname at the Peer Identification selection at the advanced Phase 1 options below). Then input the pre-shared key defined on both firewall and router devices. Press the Show advanced Phase 1 options to display more settings and leave Local and Peer Identification to none and the local/peer IP address will be used as the local/peer identification value, otherwise choose the right setting. Choose main at the Exchange Mode (this should match to the Cisco router setting as well).
Phase 1 negotiation can occur using one of two modes: main mode and aggressive mode. The two modes serve different purposes and have different strengths. Main mode is slower than aggressive mode, but main mode is more secure and more flexible because it can offer an IKE peer more security proposals than aggressive mode. Aggressive mode is less flexible and not as secure, but much faster.
Select the previously created IKE Crypto Profile and finally leave checked the Dead Peer Detection checkbox.
Next goto Network – IPsec Tunnels and create a new setting to combine all the previously created elements of IPSec tunnel. Give it a name (e.g. VPN_TO_BRANCH), select the previously created tunnel.2 interface, leave type setting to the recommended Auto Key, select the previously created IKE Gateway and some of the following settings will autoupdate to the correct values. Then choose the previously created IPSec Crypto Profile (e.g. IPSEC_BRANCH). Next you must define the ProxyIDs (this is a must), these are actually the subnets or hosts that should talk to each other, for example in our case Local Id is 10.1.1.0/24 and Remote Id is 10.2.2.0/24. Here you may restrict subnets or protocols and ports but this depends on your needs. Finally check the Replay Protection setting to detect and neutralize replay attacks.
Till here we have configured the needed VPN IPSec tunnel settings, next we should route traffic between the subnets and restrict access permissions.
First add a static route to your Virtual Router to route the traffic from the Headquarters to the Branch Office, as follows.
Then you should configure the access permissions between the peer nodes by going to Policies – Security. The minimum configuration should be the icmp, ike, ipsec and ping permissions between the peer nodes, as follows.
Finally configure the permissions between the subnets. For example your may open up the traffic from the Headquarters subnet to the Branch Office subnet, or give access to workstations in Branch Office to specific services at the Headquarters.
If you configure the Cisco router accordingly the tunnel should come up. Check it out by going to Network – IPSec Tunnels, the status icons should have turn green!
You may need to goto Monitor – System to view the system log during IKE negotiations. This will help you to troubleshoot the IPSec tunnel errors on Palo Alto Firewall side.
On Cisco side use the show crypto isakmp, show crypto ipsec and show crypto map commands with the relevant flags for troubleshooting.