How to Setup Windows 10 Firewall for L2TP/IPSec

This guide will walk you through how to open your Windows 10 firewall to allow the L2TP/IPSec protocol. For more about the L2TP/IPsec firewall ports you can read up on this L2TP VPN ports to allow in your firewall technet article.

Are you getting VPN connection errors?
Connection Error

If you are having trouble getting your VPN connection to work, traffic is most likely getting blocked by your local windows 10 firewall or your router. L2TP is a great option for creating a VPN because most operating systems support it automatically, but the downside is that firewalls and networks might block this protocol, and you will need a guide like this to help you allow this VPN traffic.

Before making these changes, you can test wether the firewall is blocking the connection simply by disabling it and then re-trying to connect. If the connection failed with the firewall disabled, then most likely you will need to adjust your router, if you need help with your router leave a message in the comments and we will try to respond. If the connection succeeds after the firewall is disabled, then these steps below will show you how to open the L2TP ports so that you can use VPN with your firewall enabled.

Steps for opening L2TP/IPSec VPN ports on Windows 10 firewall

  1. From your Windows desktop locate the Windows taskbar Search Box in the lower left and click in the Search Box.
    Blank Desktop

  2. In the Search Box, type 'Windows Firewall' and click the top result 'Windows Firewall with Advanced Security'.
    That will locate and launch the settings control panel link called 'Windows Firewall with Advanced Security' where we will enter the new L2TP/IPSec ports as a new inbound rule.
    Windows Firewall

  3. Click 'Inbound Rules'.
    Inbound Rules

  4. Click 'New Rule...'.
    Inbound Rules

  5. Select 'Port' and click 'Next'.
    Port Rule

  6. Select 'UDP' and Enter '50, 500, 4500' in the 'Specific local ports' field and click 'Next'.
    UDP Ports for L2TP VPN

  7. Select 'Allow the connection if it is secure' and click 'Next'.
    Allow the connection if it is secure

  8. Leave user fields blank and click 'Next'.
    User Blank Next

  9. Leave all the checkboxes checked and click 'Next'.
    Profile Blank Next

  10. Enter 'MagnumVPN L2TP Firewall Rule', or any name you want and click 'Finish'.
    MagnumVPN Finish

  11. All done! You should be able to connect to your VPN without your firewall blocking you. Make sure you have re-enabled your firewall if you turned it off for testing.