之前写过《VPS搭建pptp VPN小结》,那个环境是在OpenVZ上部署的,最近又试了在Xen上部署,配置差不多,这里把我配置过程中不一样的地方简单罗列一下。
1. 安装配置脚本
OpenVZ
sed -i 's/require-mppe-128/#require-mppe-128/g' /etc/ppp/options.pptpd
Xen不再需要这一行,因为我的那个OpenVZ不支持mppe加密,也懒得发ticket开了。
2. iptables脚本
OpenVZ:
# iptables -t nat -A POSTROUTING -s 192.168.88.0/24 -j SNAT --to-source 11.22.33.44 #
Xen:
iptables -t nat -A POSTROUTING -s 192.168.88.0/24 -o eth0 -j MASQUERADE iptables -A INPUT -p gre -j ACCEPT
OpenVZ使用SNAT指向固定IP,Xen指定eth0网卡。
相关日志
Tags: VPS