Настраиваю mpd не как сервер впн, а только в роли клиента. То есть хочю, чтобы через комп с mpd
люди моей локальной сети просто выходили в интернет. В данный момент только на стадии создания
самого соединнения с впн сервером.
Итак:
ВПН сервер - 10.0.0.1 (обязательное требование - отсутствие шифрования)
Внешний интерфейс - хх.хх.хх.хх и его маска 255.255.255.0 (ed0)
Внутренний интерфейс - уу.уу.уу.уу и его маска 255.255.255.0 (rl0)
Route default zz.zz.zz.zz
**ip** - это статический ip который выделяет мне впн сервер.
Настройки mpd:
------------mpd.conf---------
default:
load work
work:
new -i ng0 work work
set log +auth +bund +ccp +ccp2 +ccp3 +chat +chat2 +console +echo +frame +fsm +iface +ipcp +lcp +link +mp +mp2 +phys +pptp +pptp2 +pptp3
set ipcp ranges 0.0.0.0/0 0.0.0.0/0
set ipcp enable req-pri-dns req-sec-dns
set link disable chap pap
set link accept chap
set iface idle 0
set bundle authname "******"
set bundle password "******"
set iface disable on-demand
set iface route default
open
-----------mpd.links---------
work:
set link type pptp
set pptp self хх.хх.хх.хх
set pptp peer 10.0.0.1
set pptp enable originate outcall incoming
Получаю вот такой mpd.log:
Feb 15 20:20:50 khome mpd: mpd: pid 348, version 3.16 (root@freebsd.org 05:19 22-Jan-2004)
Feb 15 20:20:50 khome mpd: [work] ppp node is "mpd348-work"
Feb 15 20:20:50 khome mpd: mpd: local IP address for PPTP is хх.хх.хх.хх
Feb 15 20:20:50 khome mpd: mpd: warning: line too long, truncated
Feb 15 20:20:50 khome mpd: [work] using interface ng0
Feb 15 20:20:50 khome mpd: [work] IPCP: peer address cannot be zero
Feb 15 20:20:50 khome mpd: [work] IFACE: Open event
Feb 15 20:20:50 khome mpd: [work] IPCP: Open event
Feb 15 20:20:50 khome mpd: [work] IPCP: state change Initial --> Starting
Feb 15 20:20:50 khome mpd: [work] IPCP: LayerStart
Feb 15 20:20:50 khome mpd: mpd: warning: line too long, truncated
Feb 15 20:20:50 khome mpd: [work] bundle: OPEN event in state CLOSED
Feb 15 20:20:50 khome mpd: [work] opening link "work"...
Feb 15 20:20:50 khome mpd: [work] link: OPEN event
Feb 15 20:20:50 khome mpd: [work] LCP: Open event
Feb 15 20:20:50 khome mpd: [work] LCP: state change Initial --> Starting
Feb 15 20:20:50 khome mpd: [work] LCP: LayerStart
Feb 15 20:20:50 khome mpd: [work] device: OPEN event in state DOWN
Feb 15 20:20:50 khome mpd: pptp0: connecting to 10.0.0.1:1723
Feb 15 20:20:50 khome mpd: [work] device is now in state OPENING
Feb 15 20:20:50 khome mpd: pptp0: connected to 10.0.0.1:1723
Feb 15 20:20:50 khome mpd: pptp0: attached to connection with 10.0.0.1:1723
Feb 15 20:20:50 khome mpd: pptp0-0: outgoing call connected at 64000 bps
Feb 15 20:20:50 khome mpd: [work] PPTP call successful
Feb 15 20:20:50 khome mpd: [work] device: UP event in state OPENING
Feb 15 20:20:50 khome mpd: [work] device is now in state UP
Feb 15 20:20:50 khome mpd: [work] link: UP event
Feb 15 20:20:50 khome mpd: [work] link: origination is local
Feb 15 20:20:50 khome mpd: [work] LCP: Up event
Feb 15 20:20:50 khome mpd: [work] LCP: state change Starting --> Req-Sent
Feb 15 20:20:50 khome mpd: [work] LCP: phase shift DEAD --> ESTABLISH
Feb 15 20:20:50 khome mpd: [work] LCP: SendConfigReq #1
Feb 15 20:20:50 khome mpd: ACFCOMP
Feb 15 20:20:50 khome mpd: PROTOCOMP
Feb 15 20:20:50 khome mpd: MRU 1500
Feb 15 20:20:50 khome mpd: MAGICNUM 6d2b5d34
Feb 15 20:20:50 khome mpd: MP MRRU 1600
Feb 15 20:20:50 khome mpd: MP SHORTSEQ
Feb 15 20:20:50 khome mpd: ENDPOINTDISC [802.1] 00 80 48 c7 91 08
Feb 15 20:20:51 khome mpd: [work] LCP: rec'd Configure Request #1 link 0 (Req-Sent)
Feb 15 20:20:51 khome mpd: AUTHPROTO CHAP MSOFT
Feb 15 20:20:51 khome mpd: MAGICNUM 864300e9
Feb 15 20:20:51 khome mpd: [work] LCP: SendConfigAck #1
Feb 15 20:20:51 khome mpd: AUTHPROTO CHAP MSOFT
Feb 15 20:20:51 khome mpd: MAGICNUM 864300e9
Feb 15 20:20:51 khome mpd: [work] LCP: state change Req-Sent --> Ack-Sent
Feb 15 20:20:51 khome mpd: [work] LCP: rec'd Configure Reject #1 link 0 (Ack-Sent)
Feb 15 20:20:51 khome mpd: MP MRRU 1600
Feb 15 20:20:51 khome mpd: MP SHORTSEQ
Feb 15 20:20:51 khome mpd: [work] LCP: SendConfigReq #2
Feb 15 20:20:51 khome mpd: ACFCOMP
Feb 15 20:20:51 khome mpd: PROTOCOMP
Feb 15 20:20:51 khome mpd: MRU 1500
Feb 15 20:20:51 khome mpd: MAGICNUM 6d2b5d34
Feb 15 20:20:51 khome mpd: [work] LCP: rec'd Configure Ack #2 link 0 (Ack-Sent)
Feb 15 20:20:51 khome mpd: ACFCOMP
Feb 15 20:20:51 khome mpd: PROTOCOMP
Feb 15 20:20:51 khome mpd: MRU 1500
Feb 15 20:20:51 khome mpd: MAGICNUM 6d2b5d34
Feb 15 20:20:51 khome mpd: [work] LCP: state change Ack-Sent --> Opened
Feb 15 20:20:51 khome mpd: [work] LCP: phase shift ESTABLISH --> AUTHENTICATE
Feb 15 20:20:51 khome mpd: [work] LCP: auth: peer wants CHAP, I want nothing
Feb 15 20:20:51 khome mpd: [work] LCP: LayerUp
Feb 15 20:20:51 khome mpd: [work] CHAP: rec'd CHALLENGE #1
Feb 15 20:20:51 khome mpd: Name: "pptp-1 "
Feb 15 20:20:51 khome mpd: Using authname "********"
Feb 15 20:20:51 khome mpd: [work] CHAP: sending RESPONSE
Feb 15 20:20:51 khome mpd: [work] CHAP: rec'd SUCCESS #1
Feb 15 20:20:51 khome mpd: [work] LCP: authorization successful
Feb 15 20:20:51 khome mpd: [work] LCP: phase shift AUTHENTICATE --> NETWORK
Feb 15 20:20:51 khome mpd: [work] setting interface ng0 MTU to 1500 bytes
Feb 15 20:20:51 khome mpd: [work] up: 1 link, total bandwidth 64000 bps
Feb 15 20:20:51 khome mpd: [work] IPCP: Up event
Feb 15 20:20:51 khome mpd: [work] IPCP: state change Starting --> Req-Sent
Feb 15 20:20:51 khome mpd: [work] IPCP: SendConfigReq #1
Feb 15 20:20:51 khome mpd: IPADDR 0.0.0.0
Feb 15 20:20:51 khome mpd: COMPPROTO VJCOMP, 16 comp. channels, no comp-cid
Feb 15 20:20:51 khome mpd: PRIDNS 0.0.0.0
Feb 15 20:20:51 khome mpd: SECDNS 0.0.0.0
Feb 15 20:20:51 khome mpd: [work] IPCP: rec'd Configure Request #1 link 0 (Req-Sent)
Feb 15 20:20:51 khome mpd: IPADDR 10.0.0.1
Feb 15 20:20:51 khome mpd: 10.0.0.1 is OK
Feb 15 20:20:51 khome mpd: [work] IPCP: SendConfigAck #1
Feb 15 20:20:51 khome mpd: IPADDR 10.0.0.1
Feb 15 20:20:51 khome mpd: [work] IPCP: state change Req-Sent --> Ack-Sent
Feb 15 20:20:51 khome mpd: [work] IPCP: rec'd Configure Reject #1 link 0 (Ack-Sent)
Feb 15 20:20:51 khome mpd: COMPPROTO VJCOMP, 16 comp. channels, no comp-cid
Feb 15 20:20:51 khome mpd: [work] IPCP: SendConfigReq #2
Feb 15 20:20:51 khome mpd: IPADDR 0.0.0.0
Feb 15 20:20:51 khome mpd: PRIDNS 0.0.0.0
Feb 15 20:20:51 khome mpd: SECDNS 0.0.0.0
Feb 15 20:20:51 khome mpd: [work] IPCP: rec'd Configure Nak #2 link 0 (Ack-Sent)
Feb 15 20:20:51 khome mpd: IPADDR **ip**
Feb 15 20:20:51 khome mpd: **ip** is OK
Feb 15 20:20:51 khome mpd: PRIDNS 212.188.4.10
Feb 15 20:20:51 khome mpd: SECDNS 195.34.32.10
Feb 15 20:20:51 khome mpd: [work] IPCP: SendConfigReq #3
Feb 15 20:20:51 khome mpd: IPADDR **ip**
Feb 15 20:20:51 khome mpd: PRIDNS 212.188.4.10
Feb 15 20:20:51 khome mpd: SECDNS 195.34.32.10
Feb 15 20:20:51 khome mpd: [work] IPCP: rec'd Configure Ack #3 link 0 (Ack-Sent)
Feb 15 20:20:51 khome mpd: IPADDR **ip**
Feb 15 20:20:51 khome mpd: PRIDNS 212.188.4.10
Feb 15 20:20:51 khome mpd: SECDNS 195.34.32.10
Feb 15 20:20:51 khome mpd: [work] IPCP: state change Ack-Sent --> Opened
Feb 15 20:20:51 khome mpd: [work] IPCP: LayerUp
Feb 15 20:20:51 khome mpd: **ip** -> 10.0.0.1
Feb 15 20:20:51 khome mpd: [work] IFACE: Up event
Feb 15 20:20:51 khome mpd: [work] setting interface ng0 MTU to 1500 bytes
Feb 15 20:20:51 khome mpd: [work] exec: /sbin/ifconfig ng0 **ip** 10.0.0.1 netmask 0xffffffff -link0
Feb 15 20:20:51 khome mpd: [work] exec: /sbin/route add **ip** -iface lo0
Feb 15 20:20:51 khome mpd: [work] exec: /sbin/route add 0.0.0.0 10.0.0.1
Feb 15 20:20:51 khome mpd: [work] exec: command returned 256
Feb 15 20:20:51 khome mpd: [work] IFACE: Up event
Feb 15 20:20:52 khome mpd: [work] error writing len 16 frame to bypass: Resource deadlock avoided
[work] error writing len 12 frame to bypass: Resource deadlock avoided
[work] LCP: no reply to 1 echo request(s)
[work] LCP: no reply to 2 echo request(s)
.....
и так до 6 после чего соединение перезапускается.
В этот момент интерфейсы:
ifconfig -a
ng0: flags=88d1<UP,POINTOPOINT,RUNNING,NOARP,SIMPLEX,MULTICAST> mtu 1500
inet **ip** --> 10.0.0.1 netmask 0xffffffff
inet6 fe80::280:48ff:fec7:9108%ng0 prefixlen 64 scopeid 0x8
---------------------------------------------------------
netstat -nr
Routing tables
Internet:
Destination Gateway Flags Refs Use Netif Expire
default aa.aa.aa.aa UGSc 2 6 ed0
10.0.0.1 **ip** UH 1 1 ng0
**ip** lo0 UHS 0 0 lo0
127.0.0.1 127.0.0.1 UH 0 8 lo0
На сервере в этот момент фиксируется установка соединения и пишется 300 / 97 - принято/отправлено
Пингуются: обе мои карточки(ed0 и rl0) и сервер впн(10.0.0.1). ... более ничего
Думаю вся беда в том как организовываются маршруты, а именно странно, что выделяемый мне **ip**
привязывается к lo0.
Подскажите почему и что не работает ??? И что это за фраза error writing len 16 frame to bypass: Resource deadlock avoided ??
К чему она относится ??