Компьютерный форум OSzone.net  

Компьютерный форум OSzone.net (http://forum.oszone.net/index.php)
-   Общий по FreeBSD (http://forum.oszone.net/forumdisplay.php?f=10)
-   -   FreeBSD VPN connect (http://forum.oszone.net/showthread.php?t=79893)

zhz 24-02-2007 17:21 554712

FreeBSD VPN connect
 
Ситуация такова, гдето крутится сервер на FreeBSD 5.4, на нем mpd, к нему спокойно подключаюсь из под винды(когда она напрямую подключена к инету), и спокойно юзаю локальную сеть за которой следить как раз тот сервак с Free, необходимо тоже самое реализовать, при условии что винда будет сидеть за НАТ под FreeBSD 6.2, тоесть такая схема нужна

LAN----FreeBSDRouterWithMPD|--{INTERNET}--|MYFREEBSDROUTER----MUSTDIEXP
начал с малого, пытаюсь подключится к FreeBSDRouterWithMPD изпод MYFREEBSDROUTER, установил pptpclient навалял в /etc/ppp/ppp.conf следующее:
default:
set log Phase Chat LCP IPCP CCP tun command
ident user-ppp VERSION (built COMPILATIONDATE)

# Ensure that "device" references the correct serial port
# for your modem. (cuad0 = COM1, cuad1 = COM2)
#
set device /dev/cuad1

set speed 115200
set dial "ABORT BUSY ABORT NO\\sCARRIER TIMEOUT 5 \
\"\" AT OK-AT-OK ATE1Q0 OK \\dATDT\\T TIMEOUT 40 CONNECT"
set timeout 180 # 3 minute idle timer (the default)
enable dns # request DNS info (for resolv.conf)


vpn:

set log Phase Chat LCP IPCP CCP tun command
set authname username
set authkey password
set timeout 0
set ifaddr 0 0
add default HISADDR

запускаю это хозяйсвто:
root@:/usr/share/doc> /usr/local/sbin/pptp A.B.C.D vpn &
получаю:
[1] 2337
root@:/usr/share/doc>
[1] + done /usr/local/sbin/pptp A.B.C.D vpn
и следующую кухню в варлогмессаджес:
Feb 16 23:39:28 pptp[2325]: anon log[main:pptp.c:276]: The synchronous pptp option is NOT activated
Feb 16 23:39:28 pptp[2328]: anon log[ctrlp_rep:pptp_ctrl.c:251]: Sent control packet type is 1 'Start-Control-Connection-Request'
Feb 16 23:39:28 pptp[2328]: anon log[ctrlp_disp:pptp_ctrl.c:740]: Received Start Control Connection Reply
Feb 16 23:39:28 pptp[2328]: anon log[ctrlp_disp:pptp_ctrl.c:774]: Client connection established.
Feb 16 23:39:29 pptp[2328]: anon log[ctrlp_rep:pptp_ctrl.c:251]: Sent control packet type is 7 'Outgoing-Call-Request'
Feb 16 23:39:29 pptp[2328]: anon log[ctrlp_disp:pptp_ctrl.c:859]: Received Outgoing Call Reply.
Feb 16 23:39:29 pptp[2328]: anon log[ctrlp_disp:pptp_ctrl.c:898]: Outgoing call established (call ID 0, peer's call ID 23365).
Feb 16 23:39:31 pptp[2328]: anon log[callmgr_main:pptp_callmgr.c:231]: Closing connection (unhandled)
Feb 16 23:39:31 pptp[2328]: anon log[ctrlp_rep:pptp_ctrl.c:251]: Sent control packet type is 12 'Call-Clear-Request'
Feb 16 23:39:31 pptp[2328]: anon log[call_callback:pptp_callmgr.c:78]: Closing connection (call state)
ифконфиг дает
tun0: flags=8010<POINTOPOINT,MULTICAST> mtu 1500

На этом все заканчивается, как я понял коннекта нет Sad
Что я делаю неправильно? Может я не то юзаю? если надо другое, то что и как? уровень дебага в ответах на тему прошу выставить на максимум!
на всяк:
FreeBSDRouterWithMPD с адресом A.B.C.D
MYFREEBSDROUTER - D.C.E.F(externeal) 192.168.10.1(internal)
MUSTDIEXP 192.168.10.10
FreeBSDRouterWithMPD - F.G.H.J(external) 192.168.10.80(internal)

Еще один момент! на удаленном серваке ничего делать не могу! доступ есть только на свой!

ну я ужу на самом деле не знаю что делать.... решил юзать mpd:
mpd.conf
vpn:
new -i ng1 vpn vpn
set iface disable on-demand
set iface addrs 192.168.11.1 192.168.10.89
set iface idle 0
# disconnect the client after 8 hours
set iface session 28800
set iface route 192.168.10.0/24
set bundle disable multilink
set bundle authname "name"
set bundle password "pass"
set link yes acfcomp protocomp
set link no pap
set link yes chap
set link mtu 1460
# If remote machine is NT you need this..
# set link enable no-orig-auth
set link keep-alive 10 75
set ipcp yes vjcomp
set ipcp ranges 192.168.11.1/32 192.168.10.85/32
#
# The five lines below enable Microsoft Point-to-Point encryption
# (MPPE) using the ng_mppc(Cool netgraph node type.
#
# set bundle enable compression
set ccp yes mppc
set ccp yes mpp-e40
set ccp yes mpp-e128
set bundle enable crypt-reqd
set ccp yes mpp-stateless
open
192.168.11.1 - это адрес внутреннего интерфейса машины с которой подключаюсь, 192,168,10,85 это идин из внутренних интерфейсов удаленного VPN сервера(на нем много адресов вообще, vlan там всякие, но этот основной), специально закомментировал set bundle enable compression т.к. по слухам сервер не поддерживает сжатие.
mpd.links
vpn:
set link type pptp
set pptp self D.C.E.F
set pptp peer F.G.H.J
set pptp enable originate incoming outcall



при запуске mpd шипит:
root@:~> mpd
Multi-link PPP for FreeBSD, by Archie L. Cobbs.
Based on iij-ppp, by Toshiharu OHNO.
mpd: pid 2559, version 3.18 (root@ 23:26 22-Feb-2007)
[vpn] ppp node is "mpd2559-vpn"
mpd: local IP address for PPTP is 85.28.248.77
[vpn] using interface ng1
[vpn] IFACE: Open event
[vpn] IPCP: Open event
[vpn] IPCP: state change Initial --> Starting
[vpn] IPCP: LayerStart
[vpn:vpn] [vpn] bundle: OPEN event in state CLOSED
[vpn] opening link "vpn"...
[vpn] link: OPEN event
[vpn] LCP: Open event
[vpn] LCP: state change Initial --> Starting
[vpn] LCP: LayerStart
[vpn] device: OPEN event in state DOWN
pptp0: connecting to 85.28.217.202:1723
[vpn] device is now in state OPENING
pptp0: connected to 85.28.217.202:1723
pptp0: attached to connection with 85.28.217.202:1723
pptp0-0: outgoing call connected at 64000 bps
[vpn] PPTP call successful
[vpn] device: UP event in state OPENING
[vpn] device is now in state UP
[vpn] link: UP event
[vpn] link: origination is local
[vpn] LCP: Up event
[vpn] LCP: state change Starting --> Req-Sent
[vpn] LCP: phase shift DEAD --> ESTABLISH
[vpn] LCP: SendConfigReq #1
ACFCOMP
PROTOCOMP
MRU 1500
MAGICNUM fd08e306
AUTHPROTO CHAP MSOFTv2
[vpn] LCP: SendConfigReq #2
ACFCOMP
PROTOCOMP
MRU 1500
MAGICNUM fd08e306
AUTHPROTO CHAP MSOFTv2
[vpn] LCP: SendConfigReq #3
ACFCOMP
PROTOCOMP
MRU 1500
MAGICNUM fd08e306
AUTHPROTO CHAP MSOFTv2
[vpn] LCP: SendConfigReq #4
ACFCOMP
PROTOCOMP
MRU 1500
MAGICNUM fd08e306
AUTHPROTO CHAP MSOFTv2
[vpn] LCP: SendConfigReq #5
ACFCOMP
PROTOCOMP
MRU 1500
MAGICNUM fd08e306
AUTHPROTO CHAP MSOFTv2
[vpn] LCP: SendConfigReq #6
ACFCOMP
PROTOCOMP
MRU 1500
MAGICNUM fd08e306
AUTHPROTO CHAP MSOFTv2
[vpn] LCP: SendConfigReq #7
ACFCOMP
PROTOCOMP
MRU 1500
MAGICNUM fd08e306
AUTHPROTO CHAP MSOFTv2
[vpn] LCP: SendConfigReq #8
ACFCOMP
PROTOCOMP
MRU 1500
MAGICNUM fd08e306
AUTHPROTO CHAP MSOFTv2
[vpn] LCP: SendConfigReq #9
ACFCOMP
PROTOCOMP
MRU 1500
MAGICNUM fd08e306
AUTHPROTO CHAP MSOFTv2
[vpn] LCP: SendConfigReq #10
ACFCOMP
PROTOCOMP
MRU 1500
MAGICNUM fd08e306
AUTHPROTO CHAP MSOFTv2
[vpn] LCP: state change Req-Sent --> Stopped
[vpn] LCP: LayerFinish
[vpn] LCP: parameter negotiation failed
[vpn] LCP: LayerFinish
[vpn] device: CLOSE event in state UP
pptp0-0: clearing call
[vpn] device is now in state CLOSING
[vpn] device: CLOSE event in state CLOSING
[vpn] device is now in state CLOSING
[vpn] device: DOWN event in state CLOSING
[vpn] device is now in state DOWN
[vpn] link: DOWN event
[vpn] LCP: Down event
[vpn] LCP: state change Stopped --> Starting
[vpn] LCP: phase shift ESTABLISH --> DEAD
[vpn] LCP: LayerStart
[vpn] device: OPEN event in state DOWN
[vpn] pausing 9 seconds before open
[vpn] device is now in state DOWN
[vpn] device: OPEN event in state DOWN
[vpn] device is now in state DOWN
pptp0: got StopCtrlConnRequest: reason=local shutdown
pptp0: killing connection with 85.28.217.202:1723
pptp0-0: killing channel
^Cmpd: caught fatal signal int
mpd: fatal error, exiting
[vpn] IPCP: Down event
[vpn] IFACE: Close event
[vpn] IPCP: Close event
[vpn] IPCP: state change Starting --> Initial
[vpn] IPCP: LayerFinish

Igor_I 24-02-2007 19:58 554773

Мне кажется конфиг должен быть такой

...............

set device устройство (скорее всего - сетевая карта)

set timeout 180 # 3 minute idle timer (the default)
enable dns # request DNS info (for resolv.conf)


vpn:

set log Phase Chat LCP IPCP CCP tun command
set authname username
set authkey password
set timeout 0
set ifaddr 192.168.10.10 A.B.C.D
add default 192.168.10.1
set dial

http://www.freebsd.org/doc/ru_RU.KOI...ook/pppoe.html
но не факт.


Время: 02:26.

Время: 02:26.
© OSzone.net 2001-