Skip to main content
sjoshi
Staff
Staff
August 8, 2022

Technical Tip: How to block third party VPN

  • July 10, 2026 at 5:59 AM
  • 1 reply
  • 34154 views

Description

 

This article describes how to block an end user from using third-party VPN services.

 

Scope

 

FortiGate.

 

Solution 


To block the third-party VPNs, set the category 'Proxy' and the signatures, 'IKE' and 'ISAKMP', to Block in application control; this should block most VPNs.

 

PPTP and L2TP signatures fall under the proxy category, so they will cover VPN using those protocols. Ensure to use deep inspection in the firewall policy.

 

Find the configuration to be done on the FortiGate:

 

  1. Firewall Policy.

From the GUI:

 

sjoshi_0-1659895520060.png

 

From the CLI:

 

config firewall policy
 edit 1
        set name "Internet-Access"
        set uuid 6759f40a-1672-51ed-ecd6-6344b9113347
        set srcintf "port2"
        set dstintf "port1"
        set action accept
        set srcaddr "all"
        set dstaddr "all"
        set schedule "always"
        set service "ALL"
        set utm-status enable
        set ssl-ssh-profile "deep-inspection"
        set application-list "default"
        set logtraffic all
        set nat enable
    next
end

   

  1. Application control profile:

 

sjoshi_1-1659895561514.png

 

If the VPN APP changes frequently, how it connects may be categorized as 'Unknown Applications', in those cases, this category should also be blocked.

 

  1. SSL inspection considerations:

  • It is not possible to modify the default profiles of SSL inspection; it has to be cloned and modified as per the requirements

  • Some VPNs use different ports from the default ones. For FortiGate, to be able to inspect the traffic for those arbitrary ports, 'Inspect all ports' should be enabled.

  • Enabling the following features can help make sure the deep inspection feature will be effectively used for all connections:

    • Enforce SSL cipher compliance.

    • Enforce SSL negotiation compliance.

 

Notes:

Clone the Deep Inspection Profile.

  1. Navigate to Security Profiles -> SSL/SSH Inspection.

  2. Locate the deep-inspection profile.

  3. Select Clone.

  4. Provide a name for the new profile (for example, deep-inspection-custom).

  5. Save the configuration.


2025-02-04_11-37.png

 

The certificate-inspection profile is not possible to edit. To apply the above settings, it is necessary to clone them and then customize the profile.

 

image.png

 

  1. Create a top rule to block traffic to a known Internet Service Database (ISDB) (Optional):


Note: There may be cases where firewall policy inspection-mode needs to be set to proxy-based. It is best to do preliminary tests first in a test policy with a specific source before implementing it in the production firewall policy.

 

Related documents:

For an explanation of the reasons for using deep inspection, refer to this document: Deep inspection.

How to import CA certificates into Android devices: Technical Tip: How to import FortiGate CA certificates into Android devices.

Technical Tip: Extended logging for SSL traffic

 

If any of the VPN signatures are not available in the application control signature list, it is then also possible to use a custom application signature. How to implement a custom application signature:
Creating IPS and application control signatures
Blocking applications with custom signatures

Technical Tip: Block a specific VPN application by using application control

    1 reply

    laltuzar
    Staff
    Staff
    February 6, 2025

    Excellent post. I was trying to block a VPN (NordVPN) that some clients were using on their phones to workaround the web filter I had configured. After following the instructions from this post, issue resolved. Thanks a lot!

    Thought Leadership. Security Summit. Thursday, November 12th, PGA National Resort, Palm Beach Gardens, FL.
    Thought Leadership. Security Summit. Thursday, October 8th. Disney's Grand Californian Hotel & SPA, Anaheim, CA.
    Security Operations Summit: Modernize SecOps. Operate AI-Native.AMER: November 4 | 9:00 AM PST. India and SAARC: November 5 | 10:00 AM IST. EMEA: November 5 | 10:30 AM CET. APAC: November 5 | 11:00 AM SGT