想建立一个 pptp 服务器,但是拨不上去,有日志,给看看呗

2015-11-10 10:03:45 +08:00
 uuair
Nov 10 02:01:02 localhost pptpd[7452]: MGR: Launching /usr/sbin/pptpctrl to handle client
Nov 10 02:01:02 localhost pptpd[7452]: CTRL: local address = 192.168.0.2
Nov 10 02:01:02 localhost pptpd[7452]: CTRL: remote address = 192.168.0.234
Nov 10 02:01:02 localhost pptpd[7452]: CTRL: pppd options file = /etc/ppp/pptpd-options
Nov 10 02:01:02 localhost pptpd[7452]: CTRL: Client 60.2.133.35 control connection started
Nov 10 02:01:02 localhost pptpd[7452]: CTRL: Received PPTP Control Message (type: 1)
Nov 10 02:01:02 localhost pptpd[7452]: CTRL: Made a START CTRL CONN RPLY packet
Nov 10 02:01:02 localhost pptpd[7452]: CTRL: I wrote 156 bytes to the client.
Nov 10 02:01:02 localhost pptpd[7452]: CTRL: Sent packet to client
Nov 10 02:01:02 localhost pptpd[7452]: CTRL: Received PPTP Control Message (type: 7)
Nov 10 02:01:02 localhost pptpd[7452]: CTRL: Set parameters to 100000000 maxbps, 64 window size
Nov 10 02:01:02 localhost pptpd[7452]: CTRL: Made a OUT CALL RPLY packet
Nov 10 02:01:02 localhost pptpd[7452]: CTRL: Starting call (launching pppd, opening GRE)
Nov 10 02:01:02 localhost pptpd[7452]: CTRL: pty_fd = 6
Nov 10 02:01:02 localhost pptpd[7452]: CTRL: tty_fd = 7
Nov 10 02:01:02 localhost pptpd[7452]: CTRL: I wrote 32 bytes to the client.
Nov 10 02:01:02 localhost pptpd[7452]: CTRL: Sent packet to client
Nov 10 02:01:02 localhost pptpd[7453]: CTRL (PPPD Launcher): program binary = /usr/sbin/pppd
Nov 10 02:01:02 localhost pptpd[7453]: CTRL (PPPD Launcher): local address = 192.168.0.2
Nov 10 02:01:02 localhost pptpd[7453]: CTRL (PPPD Launcher): remote address = 192.168.0.234
Nov 10 02:01:02 localhost pptpd[7420]: /usr/sbin/pppd: Plugin /usr/lib/pptpd/pptpd-logwtmp.so is for pppd version 2.4.5, this is 2.4.6
Nov 10 02:01:02 localhost pppd[7453]: Plugin /usr/lib/pptpd/pptpd-logwtmp.so is for pppd version 2.4.5, this is 2.4.6
Nov 10 02:01:02 localhost pptpd[7452]: GRE: read(fd=6,buffer=564847e5b4a0,len=8196) from PTY failed: status = -1 error = Input/output error, usually caused by unexpected termination of pppd, check option syntax and pppd logs
Nov 10 02:01:02 localhost pptpd[7452]: CTRL: PTY read or GRE write failed (pty,gre)=(6,7)
Nov 10 02:01:02 localhost pptpd[7452]: CTRL: Reaping child PPP[7453]
Nov 10 02:01:02 localhost pptpd[7452]: CTRL: Client 60.2.133.35 control connection finished
Nov 10 02:01:02 localhost pptpd[7452]: CTRL: Exiting now
Nov 10 02:01:02 localhost pptpd[7420]: MGR: Reaped child 7452

就是这么个东西,我用的是 ubuntu 15.04 ,最后那个错误我搜不到啊, GRE 错误,好像是端口的事,可我看有些人说不用理会。。
我看 1723 端口打开了,可是连不上。

3671 次点击
所在节点    问与答
12 条回复
lution
2015-11-10 10:07:35 +08:00
liyvhg
2015-11-10 10:43:25 +08:00
VPS? 看一下是不是支持 PPP:
#ls /dev/ppp
然后 pptpd.conf 添加
logwtmp

还是不行的话请贴上你的配置文件
EvanQu
2015-11-10 10:48:40 +08:00
kmahyyg
2015-11-10 12:51:14 +08:00
同问 不过是 718err
uuair
2015-11-10 13:01:29 +08:00
@lution
@liyvhg
@EvanQu

我的 iptables -S 的结果:

```
-P INPUT DROP
-P FORWARD ACCEPT
-P OUTPUT ACCEPT
-N syn-flood
-A INPUT -i lo -j ACCEPT
-A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT
-A INPUT -p tcp -m state --state NEW -m tcp --dport 22 -j ACCEPT
-A INPUT -p tcp -m state --state NEW -m tcp --dport 80 -j ACCEPT
-A INPUT -p icmp -m limit --limit 100/sec --limit-burst 100 -j ACCEPT
-A INPUT -p icmp -m limit --limit 1/sec --limit-burst 10 -j ACCEPT
-A INPUT -p tcp -m tcp --tcp-flags FIN,SYN,RST,ACK SYN -j syn-flood
-A INPUT -j REJECT --reject-with icmp-host-prohibited
-A INPUT -i ppp+ -j ACCEPT
-A INPUT -p tcp -m tcp --dport 1723 -j ACCEPT
-A INPUT -p gre -j ACCEPT
-A FORWARD -j ACCEPT
-A OUTPUT -o ppp+ -j ACCEPT
-A OUTPUT -p gre -j ACCEPT
-A syn-flood -p tcp -m limit --limit 3/sec --limit-burst 6 -j RETURN
-A syn-flood -j REJECT --reject-with icmp-port-unreachable
```
uuair
2015-11-10 13:21:00 +08:00
@kmahyyg

问题解决了。查看了一下 debug 的东西,在设置里关闭了 logwtmp 参数就好了。
kmahyyg
2015-11-10 13:22:31 +08:00
@uuair firewalld 路过
SharkIng
2015-11-10 13:24:15 +08:00
PPTP 现在在国内不是不好用了么?
uuair
2015-11-10 13:42:58 +08:00
@kmahyyg 有一键脚本可以用。 ubuntu15 没脚本,所以我了自己弄了
uuair
2015-11-10 13:43:34 +08:00
@SharkIng 偶尔用一下,没事吧
adrianzhang
2015-11-10 13:51:56 +08:00
换 ISP 吧
uuair
2015-11-10 14:27:25 +08:00
@adrianzhang 我已经搞定了啊。。。。。。

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/234956

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX