EdgeRouter X PPTP VPN 配置(实测可用)
拓扑:
1、使用SSH连接到EdgeRouter X 或 通过web管理打开CLI工具进行配置
2、进入配置模式
configure
3、添加防火墙规则
set firewall name WAN_LOCAL rule 30 action accept
set firewall name WAN_LOCAL rule 30 description PPTP
set firewall name WAN_LOCAL rule 30 destination port 1723
set firewall name WAN_LOCAL rule 30 protocol tcp
#以下部分防火墙配置为补充配置,解决部分用户无法通过外网连接PPTP VPN
set firewall name WAN_LOCAL rule 31 action accept
set firewall name WAN_LOCAL rule 31 description PPTP_GRE
set firewall name WAN_LOCAL rule 31 protocol gre
4、配置服务器身份验证设置,在此示例中我们使用本地身份验证。
set vpn pptp remote-access authentication mode local
set vpn pptp remote-access authentication local-users username 需要设置的帐号 password 需要设置的密码
#使用RADIUS而不是本地身份验证(此项配置为可选项,根据实际情况选择)。
set vpn pptp remote-access authentication mode radius
set vpn pptp remote-access authentication radius-server <RADIUS服务地址> key <RADIUS服务密码>
5、定义VPN客户端将使用的IP地址池。
set vpn pptp remote-access client-ip-pool start 192.168.1.10
set vpn pptp remote-access client-ip-pool stop 192.168.1.30
#但请确保它们不与DHCP服务器发出的地址重叠。
6、定义VPN客户端将使用的DNS服务器。
set vpn pptp remote-access dns-servers server-1 8.8.8.8
set vpn pptp remote-access dns-servers server-2 114.114.114.114
7、WAN接口连接方式,根据实际情况选择其中一种进行配置。
7.1、如果WAN口是通过DHCP分配
set vpn pptp remote-access dhcp-interface eth0
7.2、如果WAN口是通过固定IP
set vpn pptp remote-access outside-address <wan-address>
7.3、如果WAN口是通过PPPoE拨号
set vpn pptp remote-access outside-address 0.0.0.0
8、PPTP MTU设置(可选配置)
set vpn pptp remote-access mtu <值>
9、保存配置
commit ; save
以上配置,在英文原版的基础上增加了额外的防火墙配置,用于解决国内部分用户,外网无法链接上PPTP VPN。