Skip to main content
JNDias
Staff & Editor
Staff & Editor
Feb 23, 2023 12:38 PM UTC

Technical Tip: HTTP 401 error in SSL VPN Web mode

Description

This article describes what to do when having HTTP error '401 Authorization Required' through SSL VPN web mode. 

Scope SSL VPN Web mode, FortiGate.
Solution

For this case, when getting HTTP error '401 Authorization Required' through SSL VPN web mode, the bookmark will be used as an example.

 

JNDias_0-1677154657008.png

 

It should be noted that this error is not from the FortiGate. It comes from whatever Web Server the user is trying to access. It is always best to check on the Web Server or application to see why it is giving this response back.
If the Web Server is blocking the connection due to the IP not being allowed, and if the Web Server is not expecting the IP of the SSL VPN user, it is possible to prevent this information from being presented in the HTTP request.

This is the command to send the HTTP header 'as-is' from the client:

 

config vpn ssl setting

    set header-x-forwarded-for pass

end

 

It is also possible to configure it as 'remove'. Try both to see which one the Web Server prefers:

Options:

  • pass: Forward the same HTTP header.
  • add: Add the HTTP header.
  • remove: Remove the HTTP header.
    Risk and Resilience in the Age of AI. An OT Thought Leadership Summit for Houston's Critical Infrastructure Leaders. Date: Thursday, December 3, 2026. Time: 8:30 am - 1:30 pm (CT). Location: The Westin Houston, Memorial City | 945 Gessner Road, Houston, TX 77024