Значит начну заново :)
Есть локальная сетка в ней несколько подсеток ....195.9.44.0\24 и 194.135.17.0\23 ....гейтвей для выхода в инет 194.135.17.193(это через провайдера), сервер vpn 195.9.44.40.......
Стоит FreeBsd 4.8 с адресом 194.135.17.252(внешний) и 10.1.1.1/24(внутренний)....работает как маршрутизатор с натом , за ней стоит winXP(10.1.1.2) ....настраиваю на winxp , клиента pptp настройки такие :
ip сервера: 195.9.44.40
стоит галочка чтобы он запрашивал логин и пароль.
Type PPTN VPN
No encryption allowed
Aythentication MD5 CHAP
Compression NO
ppp multilink off
когда законекчусь то мне выдаётся ip 192.168.0.93 а сервер 192.168.0.1
И всё прекрасно работает, хочу сделать чтобы на FreeBsd был инет и он уже давал инет виндузам.
Итак в прошлой серии я ставил pptpclient
это ppp.conf
PIT:
set authname mylogin
set authkey mypasw
enable dns
enable chap
accept chap
disable MSCHAPv2
deny MSCHAPv2
set timeout 5
set reconnect timeout 10
set ifaddr 0 0
set mtu 1500
set mru 1500
set log LCP
add default HISADDR
alias enable yes
не работает , отваливается через секунд 10-15 смотрю логи и из логов понимаю что аутентификация не проходит как должна и причем ступор весь на уровне lcp
из ppp.log
Apr 24 01:46:52 saler ppp[928]: Phase: Using interface: tun0
Apr 24 01:46:52 saler ppp[928]: Phase: deflink: Created in closed state
Apr 24 01:46:52 saler ppp[928]: Warning: The alias command is deprecated
Apr 24 01:46:53 saler ppp[928]: LCP: FSM: Using "deflink" as a transport
Apr 24 01:46:53 saler ppp[928]: LCP: deflink: State change Initial --> Closed
Apr 24 01:46:53 saler ppp[928]: LCP: deflink: State change Closed --> Stopped
Apr 24 01:46:54 saler ppp[928]: LCP: deflink: LayerStart
Apr 24 01:46:54 saler ppp[928]: LCP: deflink: SendConfigReq(1) state = Stopped
Apr 24 01:46:54 saler ppp[928]: LCP: ACFCOMP[2]
Apr 24 01:46:54 saler ppp[928]: LCP: PROTOCOMP[2]
Apr 24 01:46:54 saler ppp[928]: LCP: ACCMAP[6] 0x00000000
Apr 24 01:46:54 saler ppp[928]: LCP: MRU[4] 1500
Apr 24 01:46:54 saler ppp[928]: LCP: MAGICNUM[6] 0xa0b189f1
Apr 24 01:46:54 saler ppp[928]: LCP: AUTHPROTO[5] 0xc223 (CHAP 0x05)
Apr 24 01:46:54 saler ppp[928]: LCP: deflink: State change Stopped --> Req-Sent
Apr 24 01:46:54 saler ppp[928]: LCP: deflink: RecvConfigRej(1) state = Req-Sent
Apr 24 01:46:54 saler ppp[928]: LCP: AUTHPROTO[5] 0xc223 (CHAP 0x05)
Apr 24 01:46:54 saler ppp[928]: LCP: deflink: SendConfigReq(2) state = Req-Sent
так он стучится 14 раз и на 14ый закрывает коннект
Apr 24 01:46:58 saler ppp[928]: LCP: deflink: SendConfigReq(14) state = Req-Sent
Apr 24 01:46:58 saler ppp[928]: LCP: ACFCOMP[2]
Apr 24 01:46:58 saler ppp[928]: LCP: PROTOCOMP[2]
Apr 24 01:46:58 saler ppp[928]: LCP: ACCMAP[6] 0x00000000
Apr 24 01:46:58 saler ppp[928]: LCP: MRU[4] 1500
Apr 24 01:46:58 saler ppp[928]: LCP: MAGICNUM[6] 0xa0b189f1
Apr 24 01:46:58 saler ppp[928]: LCP: AUTHPROTO[5] 0xc223 (CHAP 0x05)
Apr 24 01:46:58 saler ppp[928]: LCP: deflink: RecvConfigRej(14) state = Req-Sent
Apr 24 01:46:58 saler ppp[928]: LCP: AUTHPROTO[5] 0xc223 (CHAP 0x05)
Apr 24 01:46:58 saler ppp[928]: LCP: deflink: SendTerminateReq(15) state = Req-Sent
Apr 24 01:46:58 saler ppp[928]: LCP: deflink: State change Req-Sent --> Closing
Apr 24 01:46:58 saler ppp[928]: LCP: deflink: RecvTerminateAck(15) state = Closing
Apr 24 01:46:58 saler ppp[928]: LCP: deflink: LayerFinish
Apr 24 01:46:58 saler ppp[928]: LCP: deflink: State change Closing --> Closed
Apr 24 01:46:58 saler ppp[928]: LCP: deflink: State change Closed --> Initial
то есть сервер помоему почему то шлёт reject на протокол аутентификации :((
в messages пишет:
Apr 24 01:46:51 saler pptp[931]: log[pptp_dispatch_ctrl_packet:pptp_ctrl.c:580]: Client connection established.
Apr 24 01:46:52 saler pptp[931]: log[pptp_dispatch_ctrl_packet:pptp_ctrl.c:708]: Outgoing call established (call ID 0, peer's call ID 0).
Apr 24 01:46:52 saler ppp[928]: Warning: The alias command is deprecated
Apr 24 01:46:58 saler pptp[929]: log[decaps_hdlc:pptp_gre.c:129]: short read (0): Invalid argument
Apr 24 01:46:58 saler pptp[931]: log[callmgr_main:pptp_callmgr.c:245]: Closing connection
Apr 24 01:46:58 saler pptp[931]: log[pptp_conn_close:pptp_ctrl.c:307]: Closing PPTP connection
Apr 24 01:47:00 saler pptp[931]: log[call_callback:pptp_callmgr.c:88]: Closing connection
и еще не понял почему The alias command is deprecated
ЧТО НЕ ПРАВИЛЬНО?????? У сервера точно аутентификация по CHAP , да и я вроде chap шлю.
Ладно как посоветовали ставлю из портов MPD.
в mpd.conf
config:
new -i ng0 pit vpn
set iface idle 60
set iface route 192.168.0.1/24
set link yes acfcomp protocomp
set bundle enable compression
set bundle enable multilink
set bundle authname "mylogin"
set bundle password "mypasswd"
set link no pap
set link yes chap
set link mtu 1500
set link mru 1500
set iface enable proxy-arp
set iface disable on-demand
set ipcp dns 195.9.44.40
set ipcp yes vjcomp
set iface mtu 1500
В mpd.links
vpn:
set link type pptp
set pptp self 194.135.17.252
set pptp peer 195.9.44.40
set pptp enable originate outcall
запускаю
# mpd config
он пишет
Apr 24 00:58:42 saler mpd: mpd: pid 760, version 3.13 (root@saler.pikenet.ru 21:08 23-Apr-2003)
Apr 24 00:58:42 saler mpd: [pit] ppp node is "mpd760-pit"
Apr 24 00:58:42 saler mpd: [pit] using interface ng0
вроде нормально
в интерактивном режими ставлю
log PPTP2 чтобы подробно писал логи про pptp
и вот что он пишёт.....
pr 24 01:04:51 saler mpd: [pit] IFACE: Open event
Apr 24 01:04:51 saler mpd: [pit] IPCP: Open event
Apr 24 01:04:51 saler mpd: [pit] IPCP: state change Initial --> Starting
Apr 24 01:04:51 saler mpd: [pit] IPCP: LayerStart
Apr 24 01:04:51 saler mpd: [pit] bundle: OPEN event in state CLOSED
Apr 24 01:04:51 saler mpd: [pit] opening link "vpn"...
Apr 24 01:04:51 saler mpd: [vpn] link: OPEN event
Apr 24 01:04:51 saler mpd: [vpn] LCP: Open event
Apr 24 01:04:51 saler mpd: [vpn] LCP: state change Initial --> Starting
Apr 24 01:04:51 saler mpd: [vpn] LCP: LayerStart
Apr 24 01:04:51 saler mpd: [vpn] device: OPEN event in state DOWN
Apr 24 01:04:51 saler mpd: pptp0: ctrl state FREE --> IDLE
Apr 24 01:04:51 saler mpd: pptp0: connecting to 195.9.44.40:1723
Apr 24 01:04:51 saler mpd: pptp0-0: chan state FREE --> WAIT_CTRL
Apr 24 01:04:51 saler mpd: [vpn] device is now in state OPENING
Apr 24 01:04:51 saler mpd: pptp0: connected to 195.9.44.40:1723
Apr 24 01:04:51 saler mpd: pptp0: attached to connection with 195.9.44.40:1723
Apr 24 01:04:51 saler mpd: pptp0: ctrl state IDLE --> WAIT_CTL_REPLY
Apr 24 01:04:51 saler mpd: pptp0: send StartCtrlConnRequest msg
Apr 24 01:04:51 saler mpd: len=0x9c msgType=1 magic=0x1a2b3c4d type=1
Apr 24 01:04:51 saler mpd: vers=0x100 frameCap=2 bearCap=3 maxChan=0 firm=0x101
Apr 24 01:04:51 saler mpd: host="saler.pikenet.ru" vend="FreeBSD mpd-3.13"
Apr 24 01:04:51 saler mpd: pptp0: recv StartCtrlConnReply
Apr 24 01:04:51 saler mpd: vers=0x100 result=1 err=0 frameCap=0 bearCap=0 maxChan=1 firm=1
Apr 24 01:04:51 saler mpd: host="local" vend="MoretonBay"
Apr 24 01:04:51 saler mpd: pptp0: ctrl state WAIT_CTL_REPLY --> ESTABLISHED
Apr 24 01:04:51 saler mpd: pptp0-0: chan state WAIT_CTRL --> WAIT_OUT_REPLY
Apr 24 01:04:51 saler mpd: pptp0: send OutCallRequest msg
Apr 24 01:04:51 saler mpd: len=0xa8 msgType=1 magic=0x1a2b3c4d type=7
Apr 24 01:04:51 saler mpd: cid=0x9f34 serno=0x9f34 minBPS=0xdac0 maxBPS=0xfa00 frameType=2
Apr 24 01:04:51 saler mpd: bearType=3 recvWin=16 ppd=1 numLen=0 phone="" subaddr=""
Apr 24 01:04:52 saler mpd: pptp0: recv OutCallReply
Apr 24 01:04:52 saler mpd: cid=0 peerCid=0x9f34 result=1 err=0 cause=0 speed=0xfa00
Apr 24 01:04:52 saler mpd: recvWin=32 ppd=0 channel=0
Apr 24 01:04:52 saler mpd: pptp0-0: outgoing call connected at 64000 bps
Apr 24 01:04:52 saler mpd: pptp0-0: chan state WAIT_OUT_REPLY --> ESTABLISHED
Apr 24 01:04:52 saler mpd: [vpn] PPTP call successful
Apr 24 01:04:52 saler mpd: [vpn] device: UP event in state OPENING
Apr 24 01:04:52 saler mpd: [vpn] device is now in state UP
Apr 24 01:04:52 saler mpd: [vpn] link: UP event
Apr 24 01:04:52 saler mpd: [vpn] link: origination is local
Apr 24 01:04:52 saler mpd: [vpn] LCP: Up event
Apr 24 01:04:52 saler mpd: [vpn] LCP: state change Starting --> Req-Sent
Apr 24 01:04:52 saler mpd: [vpn] LCP: phase shift DEAD --> ESTABLISH
Apr 24 01:04:52 saler mpd: [vpn] LCP: SendConfigReq #1
Apr 24 01:04:52 saler mpd: ACFCOMP
Apr 24 01:04:52 saler mpd: PROTOCOMP
Apr 24 01:04:52 saler mpd: MRU 1500
Apr 24 01:04:52 saler mpd: MAGICNUM d7d91a10
Apr 24 01:04:52 saler mpd: AUTHPROTO CHAP MSOFTv2
Apr 24 01:04:52 saler mpd: MP MRRU 1600
Apr 24 01:04:52 saler mpd: ENDPOINTDISC [802.1] 00 50 04 54 e4 19
Apr 24 01:04:52 saler mpd: [vpn] LCP: rec'd Configure Request #1 link 0 (Req-Sent)
Apr 24 01:04:52 saler mpd: ACCMAP 0x00000000
Apr 24 01:04:52 saler mpd: AUTHPROTO CHAP MD5
Apr 24 01:04:52 saler mpd: MAGICNUM 644d90c4
Apr 24 01:04:52 saler mpd: PROTOCOMP
Apr 24 01:04:52 saler mpd: ACFCOMP
Apr 24 01:04:52 saler mpd: [vpn] LCP: SendConfigAck #1
Apr 24 01:04:52 saler mpd: ACCMAP 0x00000000
Apr 24 01:04:52 saler mpd: AUTHPROTO CHAP MD5
Apr 24 01:04:52 saler mpd: MAGICNUM 644d90c4
Apr 24 01:04:52 saler mpd: PROTOCOMP
Apr 24 01:04:52 saler mpd: ACFCOMP
Apr 24 01:04:52 saler mpd: [vpn] LCP: state change Req-Sent --> Ack-Sent
Apr 24 01:04:52 saler mpd: [vpn] LCP: rec'd Configure Reject #1 link 0 (Ack-Sent)
Apr 24 01:04:52 saler mpd: AUTHPROTO CHAP MSOFTv2
Apr 24 01:04:52 saler mpd: MP MRRU 1600
и так далее несколько раз
Apr 24 01:04:56 saler mpd: [vpn] LCP: rec'd Configure Reject #9 link 0 (Ack-Sent)
Apr 24 01:04:56 saler mpd: AUTHPROTO CHAP MSOFTv2
Apr 24 01:04:56 saler mpd: [vpn] LCP: SendConfigReq #10
Apr 24 01:04:56 saler mpd: ACFCOMP
Apr 24 01:04:56 saler mpd: PROTOCOMP
Apr 24 01:04:56 saler mpd: MRU 1500
Apr 24 01:04:56 saler mpd: MAGICNUM d7d91a10
Apr 24 01:04:56 saler mpd: AUTHPROTO CHAP MSOFTv2
Apr 24 01:04:56 saler mpd: [vpn] LCP: rec'd Configure Reject #10 link 0 (Ack-Sent)
Apr 24 01:04:56 saler mpd: AUTHPROTO CHAP MSOFTv2
Apr 24 01:04:56 saler mpd: [vpn] LCP: not converging
Apr 24 01:04:56 saler mpd: [vpn] LCP: parameter negotiation failed
Apr 24 01:04:56 saler mpd: [vpn] LCP: state change Ack-Sent --> Stopped
Apr 24 01:04:56 saler mpd: [vpn] LCP: LayerFinish
Apr 24 01:04:56 saler mpd: [vpn] device: CLOSE event in state UP
Apr 24 01:04:56 saler mpd: pptp0-0: clearing call
Apr 24 01:04:56 saler mpd: pptp0-0: chan state ESTABLISHED --> WAIT_DISCONNECT
Apr 24 01:04:56 saler mpd: pptp0: send CallClearRequest msg
Apr 24 01:04:56 saler mpd: len=16 msgType=1 magic=0x1a2b3c4d type=12
Apr 24 01:04:56 saler mpd: cid=0x9f34
Apr 24 01:04:56 saler mpd: [vpn] device is now in state CLOSING
Apr 24 01:04:56 saler mpd: [vpn] device: DOWN event in state CLOSING
Apr 24 01:04:56 saler mpd: [vpn] device is now in state DOWN
Apr 24 01:04:56 saler mpd: [vpn] link: DOWN event
Apr 24 01:04:56 saler mpd: [vpn] LCP: Down event
Apr 24 01:04:56 saler mpd: [vpn] LCP: state change Stopped --> Starting
Apr 24 01:04:56 saler mpd: [vpn] LCP: phase shift ESTABLISH --> DEAD
Apr 24 01:04:56 saler mpd: [vpn] LCP: LayerStart
Apr 24 01:04:56 saler mpd: [vpn] device: OPEN event in state DOWN
Apr 24 01:04:56 saler mpd: [vpn] pausing 7 seconds before open
Apr 24 01:04:56 saler mpd: [vpn] device is now in state DOWN
Apr 24 01:04:56 saler mpd: [vpn] device: OPEN event in state DOWN
Apr 24 01:04:56 saler mpd: [vpn] device is now in state DOWN
Apr 24 01:04:56 saler mpd: pptp0: recv CallDiscNotify
Apr 24 01:04:56 saler mpd: cid=0 result=4 err=0 cause=0 stats=""
Apr 24 01:04:56 saler mpd: pptp0-0: peer call disconnected res=disconnect request err=none
Apr 24 01:04:56 saler mpd: pptp0-0: killing channel
Apr 24 01:04:56 saler mpd: pptp0-0: chan state WAIT_DISCONNECT --> FREE
Apr 24 01:04:56 saler mpd: pptp0: closing connection with 195.9.44.40:1723
Apr 24 01:04:56 saler mpd: pptp0: ctrl state ESTABLISHED --> WAIT_STOP_REPLY
Apr 24 01:04:56 saler mpd: pptp0: send StopCtrlConnRequest msg
Apr 24 01:04:56 saler mpd: len=16 msgType=1 magic=0x1a2b3c4d type=3
Apr 24 01:04:56 saler mpd: reason=3
Apr 24 01:04:56 saler mpd: pptp0: read: Connection reset by peer
Apr 24 01:04:56 saler mpd: pptp0: killing connection with 195.9.44.40:1723
Apr 24 01:04:56 saler mpd: pptp0: ctrl state WAIT_STOP_REPLY --> FREE
Apr 24 01:05:02 saler mpd: mpd: caught fatal signal int
Apr 24 01:05:02 saler mpd: mpd: fatal error, exiting
Apr 24 01:05:02 saler mpd: [pit] IPCP: Down event
Apr 24 01:05:02 saler mpd: [pit] IFACE: Close event
Apr 24 01:05:02 saler mpd: [pit] IPCP: Close event
Apr 24 01:05:02 saler mpd: [pit] IPCP: state change Starting --> Initial
Apr 24 01:05:02 saler mpd: [pit] IPCP: LayerFinish
То есть мой клиент почему то шлёт авторизацию CHAP MSOFTv2 , хотя должен слать CHAP, прочитал manual по mpd
там написано:
chap
CHAP style authentication. This style of authentication is safer than PAP, because only a hash of the password is passed over the link. Mpd supports MD5 style CHAP and Microsoft style CHAP versions 1 and 2. Mpd will prefer MD5 CHAP over Microsoft CHAP, unless MPPE encryption is compiled in, as Microsoft CHAP is required for MPPE encryption to work.
Default disable and accept.
но я просто ставил из портов make install clean и никакую поддержку MPPE шифрования не включал :(((
Уважаемый Алл подскажите пожалуйста ,хоть совет какой, а то блин я скоро мониторразобью помоему :) в какую сторону копать?
К серверу VPN претензий нет, так как из винды я в инете сижу.