L2TP/IPsec Remote Access VPN Configuration Example (2024)

On current versions of pfSense® software, L2TP/IPsec may be configured formobile clients, though it is not a desirable configuration.

Warning

Users have reported issues with Windows L2TP/IPsec clients behind NAT. If theclients will be behind NAT, Windows clients will most likely not function.

Consider an IKEv2 implementation instead.

As warned at the start of the chapter, the Windows client, among others, and thestrongSwan IPsec daemon are not always compatible, leading to failure in manycases. The best practice is to use another solution such as IKEv2 instead ofL2TP/IPsec.

See also

IPsec Remote Access VPN Example Using IKEv2 with EAP-MSCHAPv2 contains a walkthrough forconfiguring IKEv2.

Before configuring the IPsec portion, setup the L2TP server as described inL2TP Server Configuration and add users, firewall rules, etc, as coveredthere.

Setup IPsec

These settings have been tested and found to work with some clients, but othersimilar settings may function as well. Feel free to try other encryptionalgorithms, hashes, etc.

Mobile Clients Tab

  • Navigate to VPN > IPsec, Mobile Clients tab in the pfSense softwareGUI

  • Configure the settings as follows:

    Enable IPsec Mobile Client Support:

    Checked

    User Authentication:

    Local Database (Not used, but the option must have something selected)

    Provide a virtual IP address to clients:

    Unchecked

    Provide a list of accessible networks to clients:

    Unchecked

  • Click Save

Phase 1

  • Click the Create Phase1 button at the top if it appears, or edit theexisting Mobile IPsec Phase 1

    • If there is no Phase 1, and the Create Phase1 button does not appear,navigate back to the Mobile Clients tab and click it there.

  • Configure the settings as follows:

    Key Exchange version:

    v1 or Auto

    Description:

    Text describing the tunnel

    Authentication method:

    Mutual PSK

    Negotiation Mode:

    Main

    My Identifier:

    My IP address

    Encryption algorithm:

    AES 256

    Hash algorithm:

    SHA1

    DH key group:

    14 (2048 bit)

    Note

    iOS and other platforms may work with a DH key group of 2 instead.

    Lifetime:

    28800

    Disable Rekey:

    Unchecked

    NAT Traversal:

    Auto

    Enable DPD:

    Checked, set for 10 seconds and 5 retries

  • Click Save

Phase 2

  • Click L2TP/IPsec Remote Access VPN Configuration Example (1) Show Phase 2 Entries to show the Mobile IPsec Phase2 list

  • Click L2TP/IPsec Remote Access VPN Configuration Example (2) Add P2 to add a new Phase 2 entry if one does not exist,or click L2TP/IPsec Remote Access VPN Configuration Example (3) to edit an existing entry

  • Configure the settings as follows:

    Mode:

    Transport

    Description:

    Text describing the tunnel

    Protocol:

    ESP

    Encryption algorithms:

    ONLY AES 128

    Hash algorithms:

    ONLY SHA1

    PFS Key Group:

    off

    Lifetime:

    3600

  • Click Save

IPsec Firewall Rules

Firewall rules are necessary to pass traffic from the client host over IPsec toestablish the L2TP tunnel, and inside L2TP to pass the actual tunneled VPNtraffic to systems across the VPN. Adding the L2TP rules was covered in theprevious section. To add IPsec rules:

  • Navigate to Firewall > Rules, IPsec tab

  • Review the current rules. If there is an “allow all” style rule, then there isno need to add another. Continue to the next task.

  • Click L2TP/IPsec Remote Access VPN Configuration Example (4) Add to add a new rule to the top of the list

  • Configure the options as follows:

    Protocol:

    any

    Source:

    any

    Destination:

    any

    Note

    This does not have to pass all traffic, but must at least pass L2TP (UDPport 1701) to the WAN IP address of the firewall.

  • Click Save

  • Click Apply Changes

DNS Configuration

If DNS servers are supplied to the clients and the Unbound DNS Resolver isused, then the subnet chosen for the L2TP clients must be added to its accesslist.

  • Navigate to Services > DNS Resolver, Access Lists tab

  • Click L2TP/IPsec Remote Access VPN Configuration Example (5) Add to add a new access list

  • Enter an Access List Name, such as VPN Users

  • Set Action to Allow

  • Click L2TP/IPsec Remote Access VPN Configuration Example (6) Add Network under Networks to add a new network

  • Enter the VPN client subnet into the Network box, e.g. 10.3.177.128

  • Choose the proper CIDR, e.g. 25

  • Click Save

  • Click Apply Changes

Client Setup

When configuring clients, there are a few points to look for:

  • Ensure that the client operating system configuration is set to connect to theproper external address for the VPN.

  • It may be necessary to force the VPN type to L2TP/IPsec on the client ifit has an automatic mode.

  • The client authentication type must match what is configured on the L2TPserver (e.g. CHAP)

L2TP/IPsec Remote Access VPN Configuration Example (2024)
Top Articles
How To Get The Gauss Minigun In Fallout 76
Checking your users' 2FA status
Sdn Md 2023-2024
I Make $36,000 a Year, How Much House Can I Afford | SoFi
Research Tome Neltharus
The 10 Best Restaurants In Freiburg Germany
Affidea ExpressCare - Affidea Ireland
Craigslist Cars And Trucks For Sale By Owner Indianapolis
³µ¿Â«»ÍÀÇ Ã¢½ÃÀÚ À̸¸±¸ ¸íÀÎ, ¹Ì±¹ Ķ¸®Æ÷´Ï¾Æ ÁøÃâ - ¿ù°£ÆÄ¿öÄÚ¸®¾Æ
DEA closing 2 offices in China even as the agency struggles to stem flow of fentanyl chemicals
2022 Apple Trade P36
Directions To Lubbock
Costco in Hawthorne (14501 Hindry Ave)
Craigslist Chautauqua Ny
What to do if your rotary tiller won't start – Oleomac
Belle Delphine Boobs
Magic Mike's Last Dance Showtimes Near Marcus Cedar Creek Cinema
London Ups Store
Zack Fairhurst Snapchat
Libinick
Viha Email Login
Grimes County Busted Newspaper
Best Transmission Service Margate
Mj Nails Derby Ct
Bethel Eportal
Redfin Skagit County
F45 Training O'fallon Il Photos
The 15 Best Sites to Watch Movies for Free (Legally!)
At 25 Years, Understanding The Longevity Of Craigslist
Villano Antillano Desnuda
Craftybase Coupon
lol Did he score on me ?
Redbox Walmart Near Me
Kaiserhrconnect
Kokomo Mugshots Busted
Nicole Wallace Mother Of Pearl Necklace
Amici Pizza Los Alamitos
To Give A Guarantee Promise Figgerits
Sukihana Backshots
Wasmo Link Telegram
Www Craigslist Com Atlanta Ga
4k Movie, Streaming, Blu-Ray Disc, and Home Theater Product Reviews & News
My Eschedule Greatpeople Me
Caphras Calculator
The Bold and the Beautiful
Contico Tuff Box Replacement Locks
Kidcheck Login
Joe Bartosik Ms
Edict Of Force Poe
Glowforge Forum
Suzanne Olsen Swift River
The Missile Is Eepy Origin
Latest Posts
Article information

Author: Terence Hammes MD

Last Updated:

Views: 5608

Rating: 4.9 / 5 (69 voted)

Reviews: 84% of readers found this page helpful

Author information

Name: Terence Hammes MD

Birthday: 1992-04-11

Address: Suite 408 9446 Mercy Mews, West Roxie, CT 04904

Phone: +50312511349175

Job: Product Consulting Liaison

Hobby: Jogging, Motor sports, Nordic skating, Jigsaw puzzles, Bird watching, Nordic skating, Sculpting

Introduction: My name is Terence Hammes MD, I am a inexpensive, energetic, jolly, faithful, cheerful, proud, rich person who loves writing and wants to share my knowledge and understanding with you.