Set up and test L2TP remote access on Sophos Firewall
L2TP remote access remains available on Sophos Firewall, but it should not automatically be the first choice for new managed endpoints. Sophos Connect with IPsec or SSL VPN is easier to operate centrally and provides the more complete Sophos client path. L2TP remains useful when an operating system must use its native VPN client or when an existing compatible environment needs to be continued in a controlled manner.
Position for new deployments: The current SFOS 22 help continues to document L2TP as a configurable remote access type. Sophos has not published a retirement notice for it. However, this does not guarantee support in a later major release. Avanet does not recommend L2TP as a new standard for managed clients. Do not deploy a new L2TP service without a specific legacy or compatibility requirement.
L2TP alone defines the tunnel, not the required security. On Sophos Firewall, an IPsec policy protects the connection. The IPsec profile, authentication, preshared key or certificate, and client configuration must therefore match. A green Active status also means only that the policy is enabled; only the Connection status and actual traffic confirm the tunnel.
⚠️ The route precedence required by Sophos for L2TP places
vpnglobally ahead of Static and SD-WAN Policy Routes. A new L2TP policy with a wildcard peer can also affect existing preshared keys. Before making the change, document the current order, an independent management path, and all other VPN, Static, and SD-WAN paths.
L2TP in eight steps
- Confirm that L2TP is actually required and that the client, IPsec profile, and authentication are compatible.
- Plan a non-overlapping private lease range, internal DNS servers, and a narrowly scoped user group.
- Under Remote access VPN > L2TP > L2TP global settings, enable L2TP and add users.
- Create an L2TP policy with the matching IPsec profile, WAN port, authentication, and NAT traversal.
- Under Administration > Device access, allow the IPsec service for the required WAN reachability.
- Save the current route precedence and place
vpnfirst in a controlled change. - Create a narrow, logged firewall rule from the VPN zone to the internal destinations that are actually required.
- With an external pilot client, validate authentication, lease address, DNS, rule, return path, and a negative test.
When L2TP fits
L2TP can be useful for native operating-system clients or existing devices on which Sophos Connect is not intended. It is also a reasonable choice when a small, already documented L2TP environment needs to continue without additional client software.
For a new standard rollout, Sophos Connect with IPsec or SSL VPN is usually more suitable. Profile distribution, client diagnostics, and the Sophos-specific support path are clearer there. PPTP is not a modern fallback: the protocol itself does not define encryption and should no longer be planned for new remote-access connections.
Three boundaries should be clear before configuration:
- On Sophos Firewall, L2TP uses one shared global address pool and shared DNS settings for all L2TP policies.
- Groups imported from Active Directory or Microsoft Entra ID are not automatically enabled for L2TP. They must be added explicitly under Add members.
- L2TP and PPTP consider only the relevant main group when evaluating group membership. An additional group membership alone therefore does not prove authorization. Manage user groups and the main group correctly explains the background.
Example and preparation
The example connects an external client to an internal application network. The values are deliberately documentation values and must be adapted to the local environment:
- L2TP pool:
10.250.30.10to10.250.30.100within10.250.30.0/24 - internal DNS server:
10.10.10.10 - permitted group:
L2TP_Users - policy name:
L2TP_Remote_Access - IPsec profile:
DefaultL2TPas the starting point for the compatibility test - internal destination network:
10.10.10.0/24 - example service:
HTTPS
The range 10.250.30.0/24 is only a private example network. It must not overlap LAN, VLAN, site-to-site, or home networks, nor the lease ranges used by remote access IPsec, SSL VPN, or PPTP. Sophos allows no more than 254 addresses for Assign IP from, within a /24 or smaller subnet.
Before starting, also verify the following:
- A matching IPsec profile is aligned with the settings supported by the native client.
- The public address or FQDN of the selected WAN port is reachable from the client.
- System time, DNS, and the certificate chain are correct when a certificate is used.
- The user or group exists, and the correct authentication method is entered under Authentication > Services > VPN (IPsec/dial-in/L2TP/PPTP) authentication methods.
- The current output of
system route_precedence showand a matching rollback command are documented. - WebAdmin or the console remains reachable through an independent management path.
The authentication source and client must support the same method: SFOS lists
PAP,CHAP, orMSCHAPv2forLocalandRADIUS, onlyPAPforActive DirectoryandLDAP, andPAPorCHAPforTACACS+. Before rollout, verify the common method with the native client. The outer IPsec protection remains mandatory for L2TP; this compatibility matrix is not a recommendation for PPTP or unprotected PAP use.
Configure global L2TP settings
Under Remote access VPN > L2TP > L2TP global settings, turn on Enable L2TP. For Assign IP from, enter 10.250.30.10 to 10.250.30.100 in this example. Select 10.10.10.10 as the Primary DNS server if this server can resolve the internal names. Set secondary DNS and WINS only when the environment actually requires them.
The option Allow leasing IP address from RADIUS server for L2TP, PPTP, and Sophos Connect client is useful only when the RADIUS server reliably supplies a suitable address. If it does not return an address, the firewall first uses a static address configured for the user or then the global pool. RADIUS assignment and the fallback path must therefore both be planned without overlaps. Set up RADIUS on Sophos Firewall explains the server configuration.
Then add the L2TP_Users group through Add members and verify it with Show members. For a directory user, a successful group import alone is not enough. A pilot user must actually belong to the permitted group, and that group must be the main group used for the L2TP evaluation.
Create the L2TP policy
Under Remote access VPN > L2TP, use Add to create the L2TP_Remote_Access policy.
Profile and startup behavior
Under Profile, select the IPsec profile that matches the clients. In the example, the existing DefaultL2TP profile is the starting point for the compatibility test. Its algorithms and lifetimes must still be checked against the client values; a name containing Default is not a permanent security guarantee. The two Gateway type values have different operating consequences:
- Respond only keeps the policy ready after a restart so that it can answer incoming requests.
- Disable leaves it inactive until it is switched on manually through the Active status.
For a production remote-access service, Respond only is usually the understandable starting point. Verify this choice explicitly after a firewall or service restart so that activation and connection status are not confused.
Authentication and preshared key
The available Authentication type values are Preshared key and Digital certificate. Certificates avoid a shared PSK but require a fully planned trust chain and suitable client support. A PSK must be long, random, transmitted separately, and renewed under controlled conditions.
Sophos uses the most recently configured PSK for all connections with the same listening interface and remote peer. For remote access, Remote host is typically set to
*. A new or changed wildcard policy can therefore replace the PSK of existing remote-access configurations. Before saving, review every policy that uses the same WAN port and wildcard gateway.
For a PSK, define matching Local ID and Remote ID values. The ID type DER ASN1DN (X.509) is not accepted for PSK. The IDs must match the native client; they should not be set to arbitrary values for convenience.
WAN port, peer, and selectors
Under Local WAN port, select the WAN port that is actually reachable. For clients with changing addresses, set Remote host to the wildcard value *. Enable Allow NAT traversal when clients are behind NAT, which is normal on home, mobile, and hotel networks.
For the typical remote-access workflow, the Sophos example uses Remote subnet: Any, Local port: 1701, and Remote port: *. 1701 is the L2TP port on the firewall; the client port can vary. These values are tunnel selectors and do not replace a firewall rule. Subsequent access remains restricted to specific zones, destinations, and services.
With Disconnect when tunnel is idle, the firewall can disconnect inactive clients after the period specified under Idle session time interval. Adapt the value to the actual working pattern and test it with realistic pauses. A value that is too short causes unnecessary reconnections; without a limit, forgotten sessions can remain established for longer.
After Save, switch on the policy through the red icon in the Active column. Green under Active does not yet mean that a client is connected. The separate Connection status shows whether the tunnel has actually been established.
Reachability, routing, and firewall rule
Allow IPsec on WAN
Under Administration > Device access, IPsec must be allowed for the required WAN reachability. Implement this allowance as narrowly as the topology permits. A strong PSK or a certificate does not justify unnecessarily broad WebAdmin, User Portal, or SSH access. Device Access and Local Service ACL explains the separation between service reachability and user authorization.
Set route precedence in a controlled change
Sophos requires VPN routes to be evaluated ahead of Static and SD-WAN Policy Routes for L2TP. First save the initial state in the Device Console:
system route_precedence show
Then set the documented L2TP order and check it again:
system route_precedence set vpn static sdwan_policyroute
system route_precedence show
This change is global and is not an isolated switch for the new L2TP policy. Before and after the change, test overlapping Static, SD-WAN, and VPN paths as well as management access. Adjust route precedence on Sophos Firewall explains the effect and safe rollback.
Allow access to internal destinations
Under Rules and policies > Firewall rules, create a logged IPv4 rule. The Sophos example using Any for source, destination, and service is simple for an initial functional check, but it is not a good permanent security standard. The example here is narrower:
- Source zone: VPN
- Source network: the L2TP pool
10.250.30.0/24or a matching IP host object - Destination zone: the zone containing the application network
- Destination network:
10.10.10.0/24or, preferably, the required servers - Services:
HTTPSor only the services actually required - Log firewall traffic: enabled
Internet traffic through the firewall requires a separate rule from VPN to WAN and a deliberate NAT and security design. This access is not created automatically merely because the L2TP tunnel is established.
Validate the connection
Perform validation from a real external network. A test from the same LAN or through an existing VPN path can hide routing, NAT, and public-reachability problems.
- Connect with an authorized pilot user and the documented client configuration.
- Under Remote access VPN > L2TP, check Active and Connection status separately.
- Verify that the client receives an address from
10.250.30.10to10.250.30.100and the intended DNS servers. - Resolve an internal name and reach an explicitly permitted destination over
HTTPS. - In Log Viewer, verify the expected Firewall Rule ID, source IP from the L2TP pool, destination, service, and action.
- Verify the return path from the destination network to the L2TP pool and repeat the same access after reconnecting.
- Run a negative test with a user who has not been added; this user must not receive a usable tunnel.
- Test idle behavior, disconnect, reconnect, and, in HA, a controlled failover with a new sign-in.
Successful authentication does not prove the data path. Likewise, a green tunnel does not prove that DNS, the rule, NAT, and the return path are correct. Test Sophos Firewall rules explains how to separate Log Viewer and Packet Capture evidence.
Troubleshoot systematically
The policy is active, but the tunnel remains down
First compare the WAN port, public reachability, IPsec under Device Access, NAT traversal, client address, PSK or certificate, Local/Remote ID, and IPsec profile. Then check whether a wildcard policy saved more recently replaced the expected PSK.
For the first separation, use l2tpd.log for L2TP and strongswan.log or charon.log for the IPsec negotiation. Sophos Firewall service and log files provides the complete mapping. Correlate logs with the exact time, user, public client IP, and policy name; a service restart is not the first diagnostic step.
Sign-in fails or the user receives no access
Under Authentication > Services, check the method for VPN (IPsec/dial-in/L2TP/PPTP) authentication methods. Then verify whether the user or group is listed under Add members and which group appears as the main group in the user object. With RADIUS, additionally verify authentication and optional lease assignment separately.
The tunnel is up, but internal destinations are unreachable
Check the lease address, route precedence, Firewall Rule ID, destination route, and return path in that order. A broad SD-WAN route or a competing Static Route can change the path. The L2TP pool must be reachable from the internal network without a second identical route or an overlapping network taking over the return path.
If Log Viewer shows Rule 0, an unexpected Rule ID, or no matching entry, identify the actual rule match before widening anything to Any. If the outbound packet is visible but no response returns, continue at the destination host, its gateway, local firewall, or return route.
The connection is slow or unstable
Check latency, packet loss, MTU or fragmentation, WAN changes, and CPU usage during a reproducible test. A single SMB transfer is not a clean VPN throughput test. Several controlled TCP streams in both directions help separate the tunnel, transport, and application.
If only L2TP connections are unstable, compare timestamps in l2tpd.log, the IPsec logs, WAN events, and the client log. Change the profile, MTU, or idle time individually in a maintenance window only after a concrete relationship has been established.
Roll back safely
Keep the independent management path open during rollback. First restore the exact saved route precedence and test management, Static, SD-WAN, and VPN paths. Then disable the L2TP policy and use a pilot client to confirm that no production dependency remains.
Next remove the firewall rules and IPsec allowance if no other service depends on them. Only then remove users from Add members and turn off Enable L2TP. Do not blindly reset the preshared key to an earlier value; review all policies using the same WAN port and wildcard gateway together.