Layer 2 Tunneling Protocol (L2TP) is a tunneling protocol used to support virtual private networks (VPNs) or as part of the delivery of services by ISPs. It does not provide any encryption or confidentiality by itself. Rather, it relies on an encryption protocol that it passes within the tunnel to provide privacy.
MyPBX only can be as the client of L2TP. If open the L2TP for MyPBX, MyPBX can access to the company’s branch, IP phones in the branch can register the accounts and make calls. But the server configuration, please consult the server vendors or your technical administrator of L2TP server.
MyPBX runs with xl2tpd which is kind of open source L2TP. It runs in “Spontaneous Tunnel” mode. In this mode MyPBX act as LAC (L2TP Access Concentrator) client and extend the PPP session to LNS (L2TP Network Server) via the L2TP tunnel. It will help you understand how it works in the figure below.
Figure 1 L2TP Session
Note: MyPBX supports L2TP feature since version x.19.0.x.
2.1 make L2TP file
“VPN Config” : For the VPN configuration, please consult your L2TP VPN Provider or make it on your L2TP server. And you can also refer to the template file provided by Yeastar.
Configuration file format: The file format must be .tar format, The file name of .tar file can use numbers, letters ‘_’and ‘.’ . The .tar file contains two files, one xl2tpd option file and one configuration file.
Figure 2 Configuration in xl2tpd.conf
In the figure 2, you could see you could 2 LAC or more. In fact, the 2nd LAC is unavailable in the figure 2. And it is not recommended to configure multiple LAC.
Figure 3 Configuration in options.l2tpd.client
2.2 Upload the L2TP file to MyPBX:
1. Open the MyPBX’s web page;
2. The client-side configuration via web GUI “VPN settings->enable L2TP->Choose file”, choose the file then click “Upload”:
Figure 4 Upload L2TP file
3.If upload successfully, you could check the network status under Status menu. If it shows disconnect you may try reboot to take effect.
Figure 5 L2TP status
2.3 Register account to MyPBX via L2TP:
In this case, MyPBX has already connected to L2TP server with IP 10.10.11.3, and another PC in the L2TP VPN with IP 10.10.11.2. And there runs a softphone on the PC. Then you could see softphone register successfully to MyPBX.
Figure 6 Account Setting in the Softphone
If get no registered, you could try to enable “Register remotely” and “NAT” on the extension edit page in MyPBX.
Figure 7 Account Status
2.4 Create Service Provider Trunk to MyPBX via L2TP:
In this case, 2 MyPBX has already connected to same L2TP server with IP 10.10.11.2 and 10.10.11.3. And there on of them creates a Service Provider Trunk to the other. Then you could see the trunk register successfully to the other MyPBX.
Figure 8 Service Provider Trunk settings
Figure 9 Trunk Status