RouterOS创建PPTP服务器

用于在总公司和多分部之间建立虚拟专用网络,方便数据共享:

#建立地址池

/ ip pool add name="pptp_pool" ranges=9.9.9.1-9.9.9.253

#建立模板

/ ppp profile add change-tcp-mss=no dns-server=8.8.8.8,8.8.4.4 \
local-address=9.9.9.254 name=pptp_profile only-one=yes \
remote-address=pptp_pool use-encryption=yes

#添加NAT

/ ip firewall nat add chain=srcnat src-address=9.9.9.0/24 \
action=masquerade comment=vpn_pool

#开启服务

/interface pptp-server server
set authentication=mschap1,mschap2 default-profile=pptp_profile \
enabled=yes keepalive-timeout=30 max-mru=1460 max-mtu=1460

#添加用户

/ppp secret add name=test password=test service=pptp profile=pptp_profile