L2TP with NAT ?
I'm trying to use L2TP installed on a Windows Server 2012 behing a NAT with Pfsense
VPN client <===> Internet <===> Pfsense <===> Windows Server on LAN
Ports redirect to Windows Server :
- UDP 500
- UDP 4500
- UDP 1701
- protocols AH and ESP
(i think not everything is mandatory but i try …)
My tests :
- Connecting on LAN with PPTP or L2TP (key or certificate) is working good
- Connecting on WAN with PPTP is working too (with others ports)
- Connecting on WAN with L2TP is not working
I try to put AssumeUDPEncapsulationContextOnSendRule to 2 in registry on both sides (server and client) but no change
I even try with a test server behind an internet box without pfsense and dmz to the serveur but not working, so i'm not sure the issue is on pfsense ...
Is it possible to make L2TP with NAT ?
If yes what could be the cause ?
You have setup NAT for everything you need, but L2TP+IPsec is known to have problem in general (not related to pfSense) when the server is behind NAT.
Use something more modern and less problematic, such as IKEv2, or if you need the server to be Windows, SSTP might be able to work as well, though it can also have NAT issues.