| Description | This article describes how custom DNS servers are not supported with L2TP tunnels. |
| Scope | FortiGate. |
| Solution |
Custom DNS servers are not supported with L2TP tunnels. Users connected via L2TP will always retrieve FortiGate system DNS servers.
With the CLI:
config system dns set primary x.x.x.x set secondary y.y.y.y
Changing the system DNS is a global change and does not affect only L2TP. The FortiGate will now use the configured DNS servers for DNS queries.
It is possible to configure custom DNS servers on the L2TP adapter in Windows by editing the Internet Protocol Version 4 (TCP/IPv4) settings.
Example:
When the L2TP VPN is connected, use ipconfig /all in Command Prompt or PowerShell to verify the custom DNS servers are configured.
Related articles: Technical Tip: How to configure L2TP using interface/route based IPsec VPN |
The Fortinet Security Fabric brings together the concepts of convergence and consolidation to provide comprehensive cybersecurity protection for all users, devices, and applications and across all network edges.
Copyright 2025 Fortinet, Inc. All Rights Reserved.