Mikrotik RouterOS/ROS 配置搭建L2TP server+ipsec服务器端
温馨提示:这篇文章已发布于2025-07-04 19:13:18,请注意相关的内容是否还可用!
L2TP (Layer 2 Tunneling Protocol)是一种通常用于VPN的协议。在MikroTik设备上搭建L2TP服务器可以完成远程连接和全局网络的通信。下面的脚本在MikroTik上搭建L2TP VPN服务器。
配置脚本
#建立地址池 / ip pool add name="vp_pool" ranges=10.88.1.1-10.88.1.200 #建立模板 / ppp profile add dns-server=114.114.114.114,223.6.6.6 local-address=10.88.1.254 name=vp_profile only-one=yes remote-address=vp_pool #添加用户 /ppp secret add name=r1 password=123456 profile=vp_profile #开启服务,ipsec密钥为123456(自行修改) /int l2tp-ser ser set enabled=yes use-ipsec=yes ipsec-secret=123456 #添加NAT / ip firewall nat add chain=srcnat src-address=10.88.1.0/24 action=masquerade comment=vp_pool
部署l2tp server后,Winbox添加用户

版权声明:文章除非注明天云网原创,否则均为转载,如有侵权请联系我们删除!


