Tested using GL-MT300N-V2 ver.4.3.18
- Install
xl2tpd - Reboot device
- Open LuCI console.gl-inet.com/cgi-bin/luci
- Create network interface of type
L2TP - Set L2TP Server IP address (not host name), login and password
- Set firewall zone => wan (needed for masquerading)
- Use default gateway = YES
- Use gateway metic = 20
- Networking => Routing => add static route to VPN server through WAN interface
- Edit
waninterface, don't use default gateway - Use gateway metric = 50
- Save, apply, reboot
Note: this guide doesn't cover IPsec.