我正在按照这个教程来configuration我的centos 6 VPS和我的fedora 22工作站之间的pptp连接。 我只做了一件与本教程不同的事情:我从epel存储库安装了pptpd,而不是提供的链接。
我在教程后面添加了以下规则到我的iptables:
iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE && iptables-save iptables --table nat --append POSTROUTING --out-interface ppp0 -j MASQUERADE iptables -I INPUT -s 10.0.0.0/8 -i ppp0 -j ACCEPT iptables --append FORWARD --in-interface eth0 -j ACCEPT
我还添加了以下规则,以确保我的收费墙不会阻止我的连接请求:
iptables -A INPUT -s XXX.XXX.XXX.XXX -j ACCEPT
其中XXX.XXX.XXX.XXX是我的工作站公共固定ipv4。
当我运行:
pppd call pptpserver ip route add 10.0.0.0/8 dev ppp0
我得到了RTNETLINK answers: Network is down
了几次尝试我Cannot find device "ppp0"
。
从journalctl -f
我得到:
pppd[7632]: pppd 2.4.5 started by user, uid 0 pppd[7632]: Using interface ppp0 pppd[7632]: Connect: ppp0 <--> /dev/pts/5 NetworkManager[1186]: <info> (ppp0): new Generic device (driver: 'unknown' ifindex: 15) NetworkManager[1186]: <info> (ppp0): exported as /org/freedesktop/NetworkManager/Devices/14 pptp[7633]: anon log[main:pptp.c:333]: The synchronous pptp option is NOT activated NetworkManager[1186]: <info> (ppp0): No existing connection detected. pptp[7640]: anon log[ctrlp_rep:pptp_ctrl.c:258]: Sent control packet type is 1 'Start-Control-Connecti...equest' pptp[7640]: anon log[ctrlp_disp:pptp_ctrl.c:758]: Received Start Control Connection Reply pptp[7640]: anon log[ctrlp_disp:pptp_ctrl.c:792]: Client connection established. pptp[7640]: anon log[ctrlp_rep:pptp_ctrl.c:258]: Sent control packet type is 7 'Outgoing-Call-Request' pptp[7640]: anon log[ctrlp_disp:pptp_ctrl.c:877]: Received Outgoing Call Reply. pptp[7640]: anon log[ctrlp_disp:pptp_ctrl.c:916]: Outgoing call established (call ID 0, peer's call ID 256).
几秒钟之后:
pppd[7632]: LCP: timeout sending Config-Requests pppd[7632]: Connection terminated. avahi-daemon[874]: Withdrawing workstation service for ppp0. gnome-session[2254]: Gjs-Message: JS LOG: Removing a network device that was not added pppd[7632]: Modem hangup pptp[7633]: anon warn[decaps_hdlc:pptp_gre.c:220]: short read (-1): Input/output error pptp[7633]: anon warn[decaps_hdlc:pptp_gre.c:232]: pppd may have shutdown, see pppd log pppd[7632]: Exit. pptp[7640]: anon log[callmgr_main:pptp_callmgr.c:245]: Closing connection (unhandled) pptp[7640]: anon log[ctrlp_rep:pptp_ctrl.c:258]: Sent control packet type is 12 'Call-Clear-Request' pptp[7640]: anon log[call_callback:pptp_callmgr.c:84]: Closing connection (call state)
有没有人有任何线索我的连接有什么问题? 它是在我的工作站还是在服务器上?
谢谢
closures并清除iptables并执行连接testing。 如果它工作,很可能你不需要正确的iptablesconfiguration来使pptp工作。
如果它与iptables清除和禁用,那么你应该读这个: PPTP IPTables路由问题