V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
V2EX 提问指南
uuair
V2EX  ›  问与答

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

  •  
  •   uuair · 2015-11-10 10:03:45 +08:00 · 3669 次点击
    这是一个创建于 3302 天前的主题,其中的信息可能已经有所发展或是发生改变。
    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 端口打开了,可是连不上。

    12 条回复    2015-11-10 14:27:25 +08:00
    lution
        1
    lution  
       2015-11-10 10:07:35 +08:00
    liyvhg
        2
    liyvhg  
       2015-11-10 10:43:25 +08:00
    VPS? 看一下是不是支持 PPP:
    #ls /dev/ppp
    然后 pptpd.conf 添加
    logwtmp

    还是不行的话请贴上你的配置文件
    EvanQu
        3
    EvanQu  
       2015-11-10 10:48:40 +08:00
    kmahyyg
        4
    kmahyyg  
       2015-11-10 12:51:14 +08:00
    同问 不过是 718err
    uuair
        5
    uuair  
    OP
       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
        6
    uuair  
    OP
       2015-11-10 13:21:00 +08:00
    @kmahyyg

    问题解决了。查看了一下 debug 的东西,在设置里关闭了 logwtmp 参数就好了。
    kmahyyg
        7
    kmahyyg  
       2015-11-10 13:22:31 +08:00
    @uuair firewalld 路过
    SharkIng
        8
    SharkIng  
       2015-11-10 13:24:15 +08:00
    PPTP 现在在国内不是不好用了么?
    uuair
        9
    uuair  
    OP
       2015-11-10 13:42:58 +08:00 via iPhone
    @kmahyyg 有一键脚本可以用。 ubuntu15 没脚本,所以我了自己弄了
    uuair
        10
    uuair  
    OP
       2015-11-10 13:43:34 +08:00 via iPhone
    @SharkIng 偶尔用一下,没事吧
    adrianzhang
        11
    adrianzhang  
       2015-11-10 13:51:56 +08:00
    换 ISP 吧
    uuair
        12
    uuair  
    OP
       2015-11-10 14:27:25 +08:00
    @adrianzhang 我已经搞定了啊。。。。。。
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   实用小工具   ·   1407 人在线   最高记录 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 24ms · UTC 17:06 · PVG 01:06 · LAX 09:06 · JFK 12:06
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.