kiltum (kiltum) wrote,
kiltum
kiltum

  • Music:
(всхлипнув) Какие все умные, аж завидно. Один я идиот.

Итак, все равно пока я на продакшн не вышел, посему, грохнул свой ppp и поставил родной. Затем перезагрузился в родное ядро.
[root@kicker root]# uname -a && rpm -qa|grep ppp
Linux kicker 2.4.20-20.9asp #1 Thu Aug 21 18:17:37 EEST 2003 i686 i686 i386 GNU/Linux
ppp-2.4.2-0.20030420asp


смотрим на /etc/ppp/options.pptpd (тут я только переставил буковки ms вперед):

[root@kicker root]# cat /etc/ppp/options.pptpd  
lock
proxyarp
auth
+chap
-pap
ms-dns 172.31.0.1
ms-wins 10.0.1.6
+mschap
+mschap-v2
nodefaultroute
+mppe-40
+mppe-128
debug

[root@kicker root]# cat /etc/pptpd.conf |grep debug
# TAG: debug
#       Turns on (more) debugging to syslog
debug


Как видим, дебуг включен и там и там. Пытаемся взлететь на гарантированно рабочих конфигах, адреса я поменял на x.x.x.x

Sep 17 17:39:51 localhost pptpd[889]: MGR: Launching /usr/sbin/pptpctrl to handle client
Sep 17 17:39:51 localhost pptpd[889]: CTRL: local address = х.х.х.х
Sep 17 17:39:51 localhost pptpd[889]: CTRL: remote address = х.х.х.х
Sep 17 17:39:51 localhost pptpd[889]: CTRL: pppd options file = /etc/ppp/options.pptpd
Sep 17 17:39:51 localhost pptpd[889]: CTRL: Client x.x.x.x control connection started
Sep 17 17:39:51 localhost pptpd[889]: CTRL: Received PPTP Control Message (type: 1)
Sep 17 17:39:51 localhost pptpd[889]: CTRL: Made a START CTRL CONN RPLY packet
Sep 17 17:39:51 localhost pptpd[889]: CTRL: I wrote 156 bytes to the client.
Sep 17 17:39:51 localhost pptpd[889]: CTRL: Sent packet to client
Sep 17 17:39:51 localhost pptpd[889]: CTRL: Received PPTP Control Message (type: 7)
Sep 17 17:39:51 localhost pptpd[889]: CTRL: Set parameters to 1525 maxbps, 64 window size
Sep 17 17:39:51 localhost pptpd[889]: CTRL: Made a OUT CALL RPLY packet
Sep 17 17:39:51 localhost pptpd[889]: CTRL: Starting call (launching pppd, opening GRE)
Sep 17 17:39:51 localhost pptpd[889]: CTRL: pty_fd = 5
Sep 17 17:39:51 localhost pptpd[889]: CTRL: tty_fd = 6
Sep 17 17:39:51 localhost pptpd[890]: CTRL (PPPD Launcher): Connection speed = 115200
Sep 17 17:39:51 localhost pptpd[889]: CTRL: I wrote 32 bytes to the client.
Sep 17 17:39:51 localhost pptpd[890]: CTRL (PPPD Launcher): local address = x.x.x.x
Sep 17 17:39:51 localhost pptpd[889]: CTRL: Sent packet to client
Sep 17 17:39:51 localhost pptpd[890]: CTRL (PPPD Launcher): remote address = x.x.x.x
Sep 17 17:39:51 localhost pptpd[889]: CTRL: Received PPTP Control Message (type: 15)
Sep 17 17:39:51 localhost pptpd[889]: CTRL: Got a SET LINK INFO packet with standard ACCMs
Sep 17 17:39:51 localhost pptpd[889]: GRE: read(fd=5,buffer=804d580,len=8196) from PTY failed: status = -1 error = Input/output error
Sep 17 17:39:51 localhost pptpd[889]: CTRL: PTY read or GRE write failed (pty,gre)=(5,6)
Sep 17 17:39:51 localhost pptpd[889]: CTRL: Closing child BCrelay with pid 0
Sep 17 17:39:51 localhost pptpd[889]: CTRL: Closing child ppp with pid 890
Sep 17 17:39:51 localhost pptpd[889]: CTRL: Client x.x.x.x control connection finished
Sep 17 17:39:51 localhost pptpd[889]: CTRL: Exiting now
Sep 17 17:39:51 localhost pptpd[668]: MGR: Reaped child 889

Ой, от pppd нету нифига, хотя у него и debug есть. Жалко-то как. Ладно. Есть strace:
[root@kicker root]# /etc/init.d/pptpd stop
Shutting down pptpd:                                       [  OK  ]
[root@kicker root]# strace pptpd -f -d
(много пропущено, но тут повисаем на select, который ждет входящего коннекта)

accept(5, {sa_family=AF_INET, sin_port=htons(3408), sin_addr=inet_addr("x.x.x.x")}, [16]) = 6
getpid()                                = 1048
getpeername(6, {sa_family=AF_INET, sin_port=htons(3408), sin_addr=inet_addr("x.x.x.x")}, [16]) = 0
getsockname(6, {sa_family=AF_INET, sin_port=htons(1723), sin_addr=inet_addr("x.x.x.x")}, [16]) = 0
open("/etc/hosts.allow", O_RDONLY)      = 7
fstat64(7, {st_mode=S_IFREG|0644, st_size=161, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x40017000
read(7, "#\n# hosts.allow\tThis file descri"..., 4096) = 161
read(7, "", 4096)                       = 0
close(7)                                = 0
munmap(0x40017000, 4096)                = 0
open("/etc/hosts.deny", O_RDONLY)       = 7
fstat64(7, {st_mode=S_IFREG|0644, st_size=347, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x40017000
read(7, "#\n# hosts.deny\tThis file describ"..., 4096) = 347
read(7, "", 4096)                       = 0
close(7)                                = 0
munmap(0x40017000, 4096)                = 0
select(7, [6], NULL, NULL, {10, 0})     = 1 (in [6], left {10, 0})
recv(6, "\0\234\0\1\32+
[Error: Irreparable invalid markup ('<m\0\1\0\0",>') in entry. Owner must fix manually. Raw contents below.]

(всхлипнув) Какие все умные, аж завидно. Один я идиот.
<lj-cut text="Логи и прочее для bobuk'а">
Итак, все равно пока я на продакшн не вышел, посему, грохнул свой ppp и поставил родной. Затем перезагрузился в родное ядро.
<pre>[root@kicker root]# uname -a && rpm -qa|grep ppp
Linux kicker 2.4.20-20.9asp #1 Thu Aug 21 18:17:37 EEST 2003 i686 i686 i386 GNU/Linux
ppp-2.4.2-0.20030420asp</pre>

смотрим на /etc/ppp/options.pptpd (тут я только переставил буковки ms вперед):

<pre>[root@kicker root]# cat /etc/ppp/options.pptpd
lock
proxyarp
auth
+chap
-pap
ms-dns 172.31.0.1
ms-wins 10.0.1.6
+mschap
+mschap-v2
nodefaultroute
+mppe-40
+mppe-128
debug

[root@kicker root]# cat /etc/pptpd.conf |grep debug
# TAG: debug
# Turns on (more) debugging to syslog
debug</pre>

Как видим, дебуг включен и там и там. Пытаемся взлететь на <i>гарантированно рабочих</i> конфигах, адреса я поменял на x.x.x.x

<pre>Sep 17 17:39:51 localhost pptpd[889]: MGR: Launching /usr/sbin/pptpctrl to handle client
Sep 17 17:39:51 localhost pptpd[889]: CTRL: local address = х.х.х.х
Sep 17 17:39:51 localhost pptpd[889]: CTRL: remote address = х.х.х.х
Sep 17 17:39:51 localhost pptpd[889]: CTRL: pppd options file = /etc/ppp/options.pptpd
Sep 17 17:39:51 localhost pptpd[889]: CTRL: Client x.x.x.x control connection started
Sep 17 17:39:51 localhost pptpd[889]: CTRL: Received PPTP Control Message (type: 1)
Sep 17 17:39:51 localhost pptpd[889]: CTRL: Made a START CTRL CONN RPLY packet
Sep 17 17:39:51 localhost pptpd[889]: CTRL: I wrote 156 bytes to the client.
Sep 17 17:39:51 localhost pptpd[889]: CTRL: Sent packet to client
Sep 17 17:39:51 localhost pptpd[889]: CTRL: Received PPTP Control Message (type: 7)
Sep 17 17:39:51 localhost pptpd[889]: CTRL: Set parameters to 1525 maxbps, 64 window size
Sep 17 17:39:51 localhost pptpd[889]: CTRL: Made a OUT CALL RPLY packet
Sep 17 17:39:51 localhost pptpd[889]: CTRL: Starting call (launching pppd, opening GRE)
Sep 17 17:39:51 localhost pptpd[889]: CTRL: pty_fd = 5
Sep 17 17:39:51 localhost pptpd[889]: CTRL: tty_fd = 6
Sep 17 17:39:51 localhost pptpd[890]: CTRL (PPPD Launcher): Connection speed = 115200
Sep 17 17:39:51 localhost pptpd[889]: CTRL: I wrote 32 bytes to the client.
Sep 17 17:39:51 localhost pptpd[890]: CTRL (PPPD Launcher): local address = x.x.x.x
Sep 17 17:39:51 localhost pptpd[889]: CTRL: Sent packet to client
Sep 17 17:39:51 localhost pptpd[890]: CTRL (PPPD Launcher): remote address = x.x.x.x
Sep 17 17:39:51 localhost pptpd[889]: CTRL: Received PPTP Control Message (type: 15)
Sep 17 17:39:51 localhost pptpd[889]: CTRL: Got a SET LINK INFO packet with standard ACCMs
Sep 17 17:39:51 localhost pptpd[889]: GRE: read(fd=5,buffer=804d580,len=8196) from PTY failed: status = -1 error = Input/output error
Sep 17 17:39:51 localhost pptpd[889]: CTRL: PTY read or GRE write failed (pty,gre)=(5,6)
Sep 17 17:39:51 localhost pptpd[889]: CTRL: Closing child BCrelay with pid 0
Sep 17 17:39:51 localhost pptpd[889]: CTRL: Closing child ppp with pid 890
Sep 17 17:39:51 localhost pptpd[889]: CTRL: Client x.x.x.x control connection finished
Sep 17 17:39:51 localhost pptpd[889]: CTRL: Exiting now
Sep 17 17:39:51 localhost pptpd[668]: MGR: Reaped child 889</pre>
Ой, от pppd нету нифига, хотя у него и debug есть. Жалко-то как. Ладно. Есть strace:
<pre>[root@kicker root]# /etc/init.d/pptpd stop
Shutting down pptpd: [ OK ]
[root@kicker root]# strace pptpd -f -d
<i>(много пропущено, но тут повисаем на select, который ждет входящего коннекта)</i>

accept(5, {sa_family=AF_INET, sin_port=htons(3408), sin_addr=inet_addr("x.x.x.x")}, [16]) = 6
getpid() = 1048
getpeername(6, {sa_family=AF_INET, sin_port=htons(3408), sin_addr=inet_addr("x.x.x.x")}, [16]) = 0
getsockname(6, {sa_family=AF_INET, sin_port=htons(1723), sin_addr=inet_addr("x.x.x.x")}, [16]) = 0
open("/etc/hosts.allow", O_RDONLY) = 7
fstat64(7, {st_mode=S_IFREG|0644, st_size=161, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x40017000
read(7, "#\n# hosts.allow\tThis file descri"..., 4096) = 161
read(7, "", 4096) = 0
close(7) = 0
munmap(0x40017000, 4096) = 0
open("/etc/hosts.deny", O_RDONLY) = 7
fstat64(7, {st_mode=S_IFREG|0644, st_size=347, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x40017000
read(7, "#\n# hosts.deny\tThis file describ"..., 4096) = 347
read(7, "", 4096) = 0
close(7) = 0
munmap(0x40017000, 4096) = 0
select(7, [6], NULL, NULL, {10, 0}) = 1 (in [6], left {10, 0})
recv(6, "\0\234\0\1\32+<M\0\1\0\0", 12, MSG_PEEK) = 12
rt_sigprocmask(SIG_BLOCK, [CHLD], NULL, 8) = 0
clone(child_stack=0, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|0x11, <ignored>, <ignored>, 0x40040748) = 1049
close(6) = 0
rt_sigprocmask(SIG_UNBLOCK, [CHLD], NULL, 8) = 0
<b>select(6, [5], NULL, NULL, NULL
)</b> = ? ERESTARTNOHAND (To be restarted)
--- SIGCHLD (Child exited) @ 0 (0) ---
wait4(-1, [WIFEXITED(s) && WEXITSTATUS(s) == 1], WNOHANG, NULL) = 1049
brk(0) = 0x8051000
brk(0x8053000) = 0x8053000
time([1063807194]) = 1063807194
getpid() = 1048
rt_sigaction(SIGPIPE, {0x420db220, [], SA_RESTORER, 0x420277f8}, {SIG_DFL}, 8) = 0
send(4, "<31>Sep 17 17:59:54 pptpd[1048]:"..., 55, 0) = 55
rt_sigaction(SIGPIPE, {SIG_DFL}, NULL, 8) = 0
wait4(-1, 0xbfffda00, WNOHANG, NULL) = -1 ECHILD (No child processes)
rt_sigaction(SIGCHLD, {0x804a1c0, [CHLD], SA_RESTORER|SA_RESTART, 0x420277f8}, {0x804a1c0, [], SA_RESTORER, 0x420277f8}, 8) = 0
sigreturn() = ? (mask now [])</pre>
А что в логах? То же самое.
<pre>
Sep 16 17:00:15 localhost pptpd[1048]: MGR: Launching /usr/sbin/pptpctrl to handle client
Sep 16 17:00:15 localhost pptpd[1048]: CTRL: local address = х.х.х.х
Sep 16 17:00:15 localhost pptpd[1048]: CTRL: remote address = х.х.х.х
Sep 16 17:00:15 localhost pptpd[1048]: CTRL: pppd options file = /etc/ppp/options.pptpd
Sep 16 17:00:15 localhost pptpd[1048]: CTRL: Client х.х.х.х control connection started
Sep 16 17:00:15 localhost pptpd[1048]: CTRL: Received PPTP Control Message (type: 1)
Sep 16 17:00:15 localhost pptpd[1048]: CTRL: Made a START CTRL CONN RPLY packet
Sep 16 17:00:15 localhost pptpd[1048]: CTRL: I wrote 156 bytes to the client.
Sep 16 17:00:15 localhost pptpd[1048]: CTRL: Sent packet to client
Sep 16 17:00:15 localhost pptpd[1048]: CTRL: Received PPTP Control Message (type: 7)
Sep 16 17:00:15 localhost pptpd[1048]: CTRL: Set parameters to 1525 maxbps, 64 window size
Sep 16 17:00:15 localhost pptpd[1048]: CTRL: Made a OUT CALL RPLY packet
Sep 16 17:00:15 localhost pptpd[1048]: CTRL: Starting call (launching pppd, opening GRE)
Sep 16 17:00:15 localhost pptpd[1048]: CTRL: pty_fd = 5
Sep 16 17:00:15 localhost pptpd[1048]: CTRL: tty_fd = 6
Sep 16 17:00:15 localhost pptpd[1048]: CTRL: I wrote 32 bytes to the client.
Sep 16 17:00:15 localhost pptpd[1048]: CTRL: Sent packet to client
Sep 16 17:00:15 localhost pptpd[1048]: GRE: read(fd=5,buffer=804d580,len=8196) from PTY failed: status = -1 error = Input/output error
Sep 16 17:00:15 localhost pptpd[1048]: CTRL: PTY read or GRE write failed (pty,gre)=(5,6)
Sep 16 17:00:15 localhost pptpd[1048]: CTRL: Closing child BCrelay with pid 0
Sep 16 17:00:15 localhost pptpd[1048]: CTRL: Closing child ppp with pid 1049
Sep 16 17:00:15 localhost pptpd[1048]: CTRL: Client х.х.х.х control connection finished
Sep 16 17:00:15 localhost pptpd[1048]: CTRL: Exiting now
Sep 16 17:00:15 localhost pptpd[1040]: MGR: Reaped child 1048
Sep 17 17:59:46 localhost pptpd[1048]: MGR: Manager process started
Sep 17 17:59:46 localhost pptpd[1048]: MGR: Maximum of 11 connections available
Sep 17 17:59:54 localhost pptpd[1048]: MGR: Reaped child 1049

[root@kicker root]# ldd /usr/sbin/pppd
libutil.so.1 => /lib/libutil.so.1 (0x40022000)
libcrypt.so.1 => /lib/libcrypt.so.1 (0x40025000)
libpam.so.0 => /lib/libpam.so.0 (0x40069000)
libdl.so.2 => /lib/libdl.so.2 (0x40072000)
libc.so.6 => /lib/tls/libc.so.6 (0x42000000)
/lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000)
[root@kicker root]# lsmod
Module Size Used by Tainted: P
ppp_mppe 13752 0 (autoclean)
ppp_async 9440 0 (autoclean)
ppp_generic 24572 0 (autoclean) [ppp_mppe ppp_async]
slhc 6756 0 (autoclean) [ppp_generic]
ipt_REJECT 4312 17 (autoclean)
iptable_filter 2412 1 (autoclean)
ipt_MASQUERADE 2200 0 (autoclean)
ip_nat_pptp 2764 0 (unused)
iptable_nat 22136 1 [ipt_MASQUERADE ip_nat_pptp]
ip_tables 15776 6 [ipt_REJECT iptable_filter ipt_MASQUERADE iptable_nat]
ip_conntrack_pptp 3824 1
ip_conntrack_proto_gre 4436 0 [ip_nat_pptp ip_conntrack_pptp]
ip_conntrack 28360 3 [ipt_MASQUERADE ip_nat_pptp iptable_nat ip_conntrack_pptp ip_conntrack_proto_gre]
3c59x 31088 3
keybdev 2976 0 (unused)
mousedev 5556 0 (unused)
hid 22244 0 (unused)
input 5888 0 [keybdev mousedev hid]
usb-uhci 26412 0 (unused)
usbcore 79360 1 [hid usb-uhci]
ext3 70976 1
jbd 51924 1 [ext3]
[root@kicker root]#
</pre>

Усе. Абзац мартышке. В логах - пусто. От pppd получаем очень информативный \n - я его выделил болдом. Зашибический дебуг. Надоело. Хочу интернету, а вы разбирайтесь, чего куда не туда втыкается и в какой файлик какое волшебное слово воткнуть. Мне - надоело. Я больше на эту тему не реагирую. У вас работает - радуйтесь. Я не буду, ибо у меня - не работает.
</lj-cut>
Subscribe
  • Post a new comment

    Error

    default userpic

    Your IP address will be recorded 

    When you submit the form an invisible reCAPTCHA check will be performed.
    You must follow the Privacy Policy and Google Terms of use.
  • 4 comments