Description
This article describes how to set up split tunneling on L2TP/IPSEC VPN between FortiGate and Windows 10/11.
FortiOS does not support split tunneling unless FortiClient is used.
To enable L2TP split tunneling directly in Windows 10/11 host: Technical Tip: How to enable split-tunneling in Windows 10/11 (L2TP/PPTP VPN)
Some users have mixed environments, and it is necessary to be able to utilize the OS native VPN client.
Related documents:
IP to HEX: https://codebeautify.org/ip-to-hex-converter
HEX to IP: https://codebeautify.org/hex-to-ip-converter
Decimal to IP : https://codebeautify.org/decimal-to-ip-converter
Scope
For v7.0.1 and above.
Solution
L2TP VPN over IPSEC is still used in many environments, some customers want to have split tunneling when L2TP VPN over IPSEC is configured.
If the traditional way is used, the configured L2TP range can access only IP addresses from that range, because the Firewall does not provide additional routes.

- Go to User & Authentication -> User Definition and select 'Create New'.
- Select 'Local User' and select 'Next'.

- Enter the user name, in this case, 'l2tpuser'.

- Select 'Next' to be ready.

- Create an L2TP VPN using the building VPN wizard:


- As a local interface and addresses configure those IP addresses and interfaces which remote VPN users need to connect, for example, 'port2' and 'port3' of the FortiGate.



- Configure the IP address for the 'l2tp.root' interface, using the first usable IP address from the L2tp range. Make sure to add the Remote IP/Nestmak with the second available usable IP from the L2tp range otherwise the route to the L2tp subnet will not be added accordingly and cause the split-tunnel route to fail to be pushed.
- Enable the DHCP server, lease address range 0.0.0.0-0.0.0.0, and select 'advanced':

- On the additional DHCP options, select 'Create new':

- The subnet mask in CIRD notation.
- Destination subnet.
- Next hop.
Windows 10 output:
If after connecting to the L2TP VPN the routes are not shown, one possible solution would be to try splitting up the networks.
For example, the following route is being pushed 172.16.1.0/22 via 192.168.89.1, the hex should be '16AC1001C0A85901'.
If this is not working try pushing routes for:
- 172.16.1.0/24 via 192.168.89.1
- 172.16.2.0/24 via 192.168.89.1
- 172.16.3.0/24 via 192.168.89.1
In this case, the hex value for the DHCP Option 121 will now look like '18AC1001C0A8590118AC1002C0A8590118AC1003C0A85901'.
Related article:
Technical Tip: How to connect Windows 10 client to L2TP VPN network