Skip to main content

IPv6 IPsec VPN Tunnel Palo Alto <-> FortiGate

While it was quite easy to bring the tunnel “up”, I had some problems tunneling both Internet Protocols over the single phase 2 session. The reason was some kind of differences within the IPsec tunnel handling between those two firewall vendors. Here are the details along with more than 20 screenshots and some CLI listings.

(Please note that I have many different VPN tutorials on my blog. Have a look at this list to find the appropriate post. This one here focusses on IPv6 tunneling.)

Lab

My lab consists of a Palo Alto Networks PA-200 firewall with PAN-OS 8.0.3, and a Fortinet FortiWiFi 90D with Firmware Version v5.4.5, build1138. I am using some uncommon but highly secure crypto protocols: Diffie-Hellman group 20 (have a look here), AES-256, SHA-512 and a lifetime of 28800 s (IKE) respectively 3600 s (IPsec). The following figure shows the IP addressing scheme. Note that the VPN tunnel is established over IPv6 only while it tunnels IPv6 and legacy IP!

The configuration was almost straightforward. However, it took me a while to understand the handling of the phase 2 sessions: While Palo Alto simply establishes a single phase 2 tunnel and forwards IPv6 as well as IPv4 packets through it, FortiGate needs two different phase 2 tunnels, one for IPv6 and one for IPv4. That is: I configured two Proxy IDs on the Palo as well, one for IPv6 and another for IPv4. Here are some information from Forti that helped me in thinking about several phase 2 settings.

Configuration Palo Alto

The configuration of the Palo firewall consists of the following steps: IKE Gateway, Tunnel Interface, IPsec Tunnel with Proxy IDs for IPv6 and IPv4, static routes for IPv6 and IPv4, dual-stack policies. Here we go:

Configuration FortiGate

Except the tunnel interface (which must not be added separately) and two separate policy sets (since FortiGate has a shit policy design which distinguishes between the Internet Protocols) the config on the FortiGate is very similar: IPsec Tunnel with Gateway, Authentication, Phase 1 Proposal and two Phase 2 Selectors (IPv6 and IPv4), as well as two static routes (IPv6 and IPv4) and four policies (IPv6 and IPv4). Let’s do this:

Monitoring

I had two Ubuntu clients, one behind each firewall. Rather than only pinging I did some file transfers via ssh/scp. Here are some traffic logs from both firewalls:
At the Tunnel Info from Palo Alto you can see the odd behaviour due to the phase 2 tunnel handling. All outgoing packets are sent via the IPv4 tunnel “fg:fg”. The counter for “Pkt Encap” at the IPv6 tunnel “fg:fg6” shows a 0:

On the FortiGate everything seems to be ok. The counters increased for both phase 2 tunnels, i.e., IPv6 and legacy IP.

Here are some CLI outputs from the Palo Alto:
And some CLI outputs from the FortiGate as well:

Conclusion

Yeah it works. Great. Two different firewall vendors, IPv6, uncommon protocols (DH20, SHA512), different Proxy ID handling, but still: it works. Keep on going, guys!
(But I am still a bit irritated about the phase 2 tunnels. Which is better? Palo Alto: simply establishing a single phase 2 and handling everything over it or FortiGate: different phase 2 tunnels for each Internet Protocol? I don’t know. But good to know how to circumvent it.)

Comments

Popular posts from this blog

CLI Commands for Troubleshooting FortiGate Firewalls

CLI Commands for Troubleshooting FortiGate Firewalls 2015-12-21 Fortinet , Memorandum , Network Cheat Sheet , CLI , FortiGate , Fortinet , Quick Reference , SCP , Troubleshooting Johannes Weber This blog post is a list of common troubleshooting commands I am using on the FortiGate CLI . It is not complete nor very detailled, but provides the basic commands for troubleshooting network related issues that are not resolvable via the GUI. I am not focused on too many memory, process, kernel, etc. details. These must only be used if there are really specific problems. I am more focused on the general troubleshooting stuff. I am using it personally as a cheat sheet / quick reference and will update it from time to time. Coming from Cisco, everything is “show”. With Fortinet you have the choice confusion between show | get | diagnose | execute . Not that easy to remember. It is “ get router info6 routing-table” to show the routing table but “ diagn...

Check Throughput of Interfaces - Palo Alto Networks NGFW

Check Throughput of Interfaces - Palo Alto Networks NGFW Following command shows brief interface throughput. > show system statistics session To see the complete statistics, run the show system state browser command > show system state browser Press Shift+L and click on Ports To enable tracking and updates press Y and U To see additional ports, press space bar

FortiGate: Upgrading the firmware via CLI

FortiGate: Upgrading the firmware via CLI To use the following procedure, you must have a TFTP or FTP server that FortiDB can connect to. You must also log in using the “admin” administrator account. Start the FTP or TFTP server. Copy the new firmware image file to the FTP or TFTP server. Log into the CLI. Verify that FortiDB can connect to the FTP or TFTP server. For example, if the IP address of the TFTP server is 192.168.1.168, enter the CLI command: execute ping 192.168.1.168 Enter the following command to copy the firmware image from the TFTP server to FortiDB: execute restore image ftp execute restore image tftp Where is the name and location of the firmware image file and or is the IP address of the FTP or TFTP server. For example, if the firmware image file name is image.out and the IP address of the FTP or TFTP server is 192.168.1.168, enter: execute restore image tftp image.out 192.168.1.168 FortiDB responds with the message: This oper...