通过加载ip_nat_pptp模块使iptables支持PPTP穿透

在KVM中安装CentOS,ppp拨号时报错,根据错误日志查看,发现pptp没有穿透,所以按照如下方法配置防火墙后,拨号成功。

---
Starting negotiation on /dev/pts/1
sent [LCP ConfReq id=0x1 <asyncmap 0x0> <auth chap MS-v2> <magic 0xc93c30c6> <pcomp> <accomp> <mrru 1500> <endpoint [MAC:00:16:3e:d8:d7:39]>]
sent [LCP ConfReq id=0x1 <asyncmap 0x0> <auth chap MS-v2> <magic 0xc93c30c6> <pcomp> <accomp> <mrru 1500>
...
LCP: timeout sending Config-Requests
Connection terminated.
---
经搜索,发现有人提到PPTP穿透需要在iptables中配置,就像一般的路由器一样。通过lsmod查询,发现确实没有pptp模块,于是就通过以下命令加载了一下该模块:
# modprobe ip_nat_pptp
加载之后,果然能够正常拨上VPN了。

为了能够让iptables在每次启动的时候都自动加载该模块,最好在/etc/sysconfig/iptables-config中加入该模块:
IPTABLES_MODULES="ip_conntrack_netbios_ns ip_conntrack_ftp ip_nat_pptp"

----------------

pptpsetup --create pptp_hk --server xxx.xxx.xxx.xxx --username xxxxxxx --password xxxxxxx --encrypt

pppd call pptp_hk

看不清,换一张