Добрый всем день!
Решил в виртуалке настроить сетку.
В реальной моей сети инет раздается через pptp.
В виртуалке поставил FreeBSD. Поставил по статье с www.lissyara.su связку MPD + FreeRADIUS + MySQL. Все вроде работает, клиент (тоже с виртуалки WinXP подключается, в логах все ок) но интернета просто нет.
Я думаю может надо как то в mpd указывать какой интерфейс смотрит в инет...но что то ничего подобного в дефолтном конфиге не увидел...
DNS есть, все резолвится (DNS поднят на этом же FreeBSD серваке).С сервака ifconfig:
================================================================================
lnc0: flags=108843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST,NEEDSGIANT> mtu 1500
inet 10.4.2.35 netmask 0xffff0000 broadcast 10.4.255.255
ether 00:16:d4:15:7c:1b
lnc1: flags=108843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST,NEEDSGIANT> mtu 1500
inet 192.168.0.1 netmask 0xffffff00 broadcast 192.168.0.255
ether 00:0c:29:13:27:5a
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> mtu 16384
inet 127.0.0.1 netmask 0xff000000
ng0: flags=88d1<UP,POINTOPOINT,RUNNING,NOARP,SIMPLEX,MULTICAST> mtu 1396
inet 192.168.1.1 --> 192.168.1.13 netmask 0xffffffff
ng1: flags=8890<POINTOPOINT,NOARP,SIMPLEX,MULTICAST> mtu 1500
ng2: flags=8890<POINTOPOINT,NOARP,SIMPLEX,MULTICAST> mtu 1500
ng3: flags=8890<POINTOPOINT,NOARP,SIMPLEX,MULTICAST> mtu 1500
ng4: flags=8890<POINTOPOINT,NOARP,SIMPLEX,MULTICAST> mtu 1500
tun0: flags=8051<UP,POINTOPOINT,RUNNING,MULTICAST> mtu 1500
inet 192.168.11.146 --> 192.168.11.250 netmask 0xffffffff
Opened by PID 1257
================================================================================
Здесь lnc0 смотрит в реальную сеть, через которую через pptp подключается инет на сервак (интерфейс tun0)
lnc1 смотрит в виртуальную подсеть в которой находится клиент WinXP
соотв. ngx это интерфейсы поднимаемые mpd.
На самом серваке инет работает, с ним проблем нет.
Вот /usr/local/etc/mpd4/mpd.conf
================================================================================
startup:
# configure the console
set console port 777
set console ip 127.0.0.1
set console user gosha xxx
set console open
# configure the web server
set web port 666
set web ip 192.168.0.1
set web user gosha xxx
set web open
default:
load pptp0
load pptp1
load pptp2
load pptp3
load pptp4
pptp0:
new -i ng0 pptp0 pptp0
load pptp_all
pptp1:
new -i ng1 pptp1 pptp1
load pptp_all
pptp2:
new -i ng2 pptp2 pptp2
load pptp_all
pptp3:
new -i ng3 pptp3 pptp3
load pptp_all
pptp4:
new -i ng4 pptp4 pptp4
load pptp_all
pptp_all:
set ipcp ranges 192.168.1.1/32 192.168.1.0/24
set iface disable on-demand
set bundle enable multilink
set link yes acfcomp protocomp
set link no pap chap
set link enable chap
set link keep-alive 60 180
set ipcp yes vjcomp
set ipcp dns 192.168.0.1
set ccp yes mppc
set ccp yes mpp-e40
set ccp yes mpp-e56
set ccp yes mpp-e128
set bundle enable compression
set ccp yes mpp-stateless
set bundle yes crypt-reqd
set pptp enable incoming
set pptp disable originate
set iface enable tcpmssfix
set radius server 127.0.0.1 yyyxxxzzz 1812 1813
set radius timeout 10
set radius config /usr/local/etc/mpd4/radius.conf
set radius retries 3
set auth acct-update 300
set auth enable radius-auth
set auth enable radius-acct
================================================================================
Вот лог подключения клиента mpd.log
================================================================================
Oct 31 01:17:01 dc mpd: PPTP: Incoming control connection from 192.168.0.250 1030 to 192.168.0.1 1723
Oct 31 01:17:01 dc mpd: pptp0: attached to connection with 192.168.0.250 1030
Oct 31 01:17:01 dc mpd: [pptp0] Accepting PPTP connection
Oct 31 01:17:01 dc mpd: [pptp0] opening link "pptp0"...
Oct 31 01:17:01 dc mpd: [pptp0] link: OPEN event
Oct 31 01:17:01 dc mpd: [pptp0] LCP: Open event
Oct 31 01:17:01 dc mpd: [pptp0] LCP: state change Initial --> Starting
Oct 31 01:17:01 dc mpd: [pptp0] LCP: LayerStart
Oct 31 01:17:01 dc mpd: [pptp0] PPTP: attaching to peer's outgoing call
Oct 31 01:17:01 dc mpd: [pptp0] link: UP event
Oct 31 01:17:01 dc mpd: [pptp0] link: origination is remote
Oct 31 01:17:01 dc mpd: [pptp0] LCP: Up event
Oct 31 01:17:01 dc mpd: [pptp0] LCP: state change Starting --> Req-Sent
Oct 31 01:17:01 dc mpd: [pptp0] LCP: SendConfigReq #1
Oct 31 01:17:01 dc mpd: ACFCOMP
Oct 31 01:17:01 dc mpd: PROTOCOMP
Oct 31 01:17:01 dc mpd: MRU 1500
Oct 31 01:17:01 dc mpd: MAGICNUM 9540430c
Oct 31 01:17:01 dc mpd: AUTHPROTO CHAP MSOFTv2
Oct 31 01:17:01 dc mpd: MP MRRU 1600
Oct 31 01:17:01 dc mpd: MP SHORTSEQ
Oct 31 01:17:01 dc mpd: ENDPOINTDISC [802.1] 00 0c 29 13 27 50
Oct 31 01:17:01 dc mpd: [pptp0] LCP: rec'd Configure Request #0 (Req-Sent)
Oct 31 01:17:01 dc mpd: MRU 1400
Oct 31 01:17:01 dc mpd: MAGICNUM 55926025
Oct 31 01:17:01 dc mpd: PROTOCOMP
Oct 31 01:17:01 dc mpd: ACFCOMP
Oct 31 01:17:01 dc mpd: CALLBACK 6
Oct 31 01:17:01 dc mpd: [pptp0] LCP: SendConfigRej #0
Oct 31 01:17:01 dc mpd: CALLBACK 6
Oct 31 01:17:01 dc mpd: [pptp0] LCP: rec'd Configure Request #1 (Req-Sent)
Oct 31 01:17:01 dc mpd: MRU 1400
Oct 31 01:17:01 dc mpd: MAGICNUM 55926025
Oct 31 01:17:01 dc mpd: PROTOCOMP
Oct 31 01:17:01 dc mpd: ACFCOMP
Oct 31 01:17:01 dc mpd: [pptp0] LCP: SendConfigAck #1
Oct 31 01:17:01 dc mpd: MRU 1400
Oct 31 01:17:01 dc mpd: MAGICNUM 55926025
Oct 31 01:17:01 dc mpd: PROTOCOMP
Oct 31 01:17:01 dc mpd: ACFCOMP
Oct 31 01:17:01 dc mpd: [pptp0] LCP: state change Req-Sent --> Ack-Sent
Oct 31 01:17:03 dc mpd: [pptp0] LCP: SendConfigReq #2
Oct 31 01:17:03 dc mpd: ACFCOMP
Oct 31 01:17:03 dc mpd: PROTOCOMP
Oct 31 01:17:03 dc mpd: MRU 1500
Oct 31 01:17:03 dc mpd: MAGICNUM 9540430c
Oct 31 01:17:03 dc mpd: AUTHPROTO CHAP MSOFTv2
Oct 31 01:17:03 dc mpd: MP MRRU 1600
Oct 31 01:17:03 dc mpd: MP SHORTSEQ
Oct 31 01:17:03 dc mpd: ENDPOINTDISC [802.1] 00 0c 29 13 27 50
Oct 31 01:17:03 dc mpd: [pptp0] LCP: rec'd Configure Reject #2 (Ack-Sent)
Oct 31 01:17:03 dc mpd: MP MRRU 1600
Oct 31 01:17:03 dc mpd: MP SHORTSEQ
Oct 31 01:17:03 dc mpd: ENDPOINTDISC [802.1] 00 0c 29 13 27 50
Oct 31 01:17:03 dc mpd: [pptp0] LCP: SendConfigReq #3
Oct 31 01:17:03 dc mpd: ACFCOMP
Oct 31 01:17:03 dc mpd: PROTOCOMP
Oct 31 01:17:03 dc mpd: MRU 1500
Oct 31 01:17:03 dc mpd: MAGICNUM 9540430c
Oct 31 01:17:03 dc mpd: AUTHPROTO CHAP MSOFTv2
Oct 31 01:17:03 dc mpd: [pptp0] LCP: rec'd Configure Ack #3 (Ack-Sent)
Oct 31 01:17:03 dc mpd: ACFCOMP
Oct 31 01:17:03 dc mpd: PROTOCOMP
Oct 31 01:17:03 dc mpd: MRU 1500
Oct 31 01:17:03 dc mpd: MAGICNUM 9540430c
Oct 31 01:17:03 dc mpd: AUTHPROTO CHAP MSOFTv2
Oct 31 01:17:03 dc mpd: [pptp0] LCP: state change Ack-Sent --> Opened
Oct 31 01:17:03 dc mpd: [pptp0] LCP: auth: peer wants nothing, I want CHAP
Oct 31 01:17:03 dc mpd: [pptp0] CHAP: sending CHALLENGE len:17
Oct 31 01:17:03 dc mpd: [pptp0] LCP: LayerUp
Oct 31 01:17:03 dc mpd: [pptp0] LCP: rec'd Ident #2 (Opened)
Oct 31 01:17:03 dc mpd: [pptp0] LCP: rec'd Ident #3 (Opened)
Oct 31 01:17:03 dc mpd: [pptp0] CHAP: rec'd RESPONSE #1
Oct 31 01:17:03 dc mpd: Name: "abigor"
Oct 31 01:17:03 dc mpd: [pptp0] AUTH: Auth-Thread started
Oct 31 01:17:03 dc mpd: [pptp0] AUTH: Trying RADIUS
Oct 31 01:17:03 dc mpd: [pptp0] RADIUS: RadiusAuthenticate for: abigor
Oct 31 01:17:03 dc mpd: [pptp0] RADIUS: rec'd RAD_ACCESS_ACCEPT for user abigor
Oct 31 01:17:03 dc mpd: [pptp0] AUTH: RADIUS returned authenticated
Oct 31 01:17:03 dc mpd: [pptp0] AUTH: Auth-Thread finished normally
Oct 31 01:17:03 dc mpd: [pptp0] CHAP: ChapInputFinish: status authenticated
Oct 31 01:17:03 dc mpd: Reply message: S=292859A6A5C1C1095B12CC8637CE41991C5BAA75
Oct 31 01:17:03 dc mpd: [pptp0] CHAP: sending SUCCESS len:42
Oct 31 01:17:03 dc mpd: [pptp0] LCP: authorization successful
Oct 31 01:17:03 dc mpd: [pptp0] Bundle up: 1 link, total bandwidth 64000 bps
Oct 31 01:17:03 dc mpd: [pptp0] IPCP: Open event
Oct 31 01:17:03 dc mpd: [pptp0] IPCP: state change Initial --> Starting
Oct 31 01:17:03 dc mpd: [pptp0] IPCP: LayerStart
Oct 31 01:17:03 dc mpd: [pptp0] CCP: Open event
Oct 31 01:17:03 dc mpd: [pptp0] CCP: state change Initial --> Starting
Oct 31 01:17:03 dc mpd: [pptp0] CCP: LayerStart
Oct 31 01:17:03 dc mpd: [pptp0] IPCP: Up event
Oct 31 01:17:03 dc mpd: [pptp0] IPCP: state change Starting --> Req-Sent
Oct 31 01:17:03 dc mpd: [pptp0] IPCP: SendConfigReq #1
Oct 31 01:17:03 dc mpd: IPADDR 192.168.1.1
Oct 31 01:17:03 dc mpd: COMPPROTO VJCOMP, 16 comp. channels, no comp-cid
Oct 31 01:17:03 dc mpd: [pptp0] CCP: Up event
Oct 31 01:17:03 dc mpd: [pptp0] CCP: state change Starting --> Req-Sent
Oct 31 01:17:03 dc mpd: [pptp0] CCP: SendConfigReq #1
Oct 31 01:17:03 dc mpd: MPPC
Oct 31 01:17:03 dc mpd: 0x010000e0:MPPE(40, 56, 128 bits), stateless
Oct 31 01:17:03 dc mpd: [pptp0] CCP: rec'd Configure Request #4 (Req-Sent)
Oct 31 01:17:03 dc mpd: MPPC
Oct 31 01:17:03 dc mpd: 0x010000e1:MPPC, MPPE(40, 56, 128 bits), stateless
Oct 31 01:17:03 dc mpd: [pptp0] CCP: SendConfigNak #4
Oct 31 01:17:03 dc mpd: MPPC
Oct 31 01:17:03 dc mpd: 0x01000040:MPPE(128 bits), stateless
Oct 31 01:17:03 dc mpd: [pptp0] IPCP: rec'd Configure Request #5 (Req-Sent)
Oct 31 01:17:03 dc mpd: IPADDR 0.0.0.0
Oct 31 01:17:03 dc mpd: NAKing with 192.168.1.13
Oct 31 01:17:03 dc mpd: PRIDNS 0.0.0.0
Oct 31 01:17:03 dc mpd: NAKing with 192.168.0.1
Oct 31 01:17:03 dc mpd: PRINBNS 0.0.0.0
Oct 31 01:17:03 dc mpd: SECDNS 0.0.0.0
Oct 31 01:17:03 dc mpd: SECNBNS 0.0.0.0
Oct 31 01:17:03 dc mpd: [pptp0] IPCP: SendConfigRej #5
Oct 31 01:17:03 dc mpd: PRINBNS 0.0.0.0
Oct 31 01:17:03 dc mpd: SECDNS 0.0.0.0
Oct 31 01:17:03 dc mpd: SECNBNS 0.0.0.0
Oct 31 01:17:03 dc mpd: [pptp0] IPCP: rec'd Configure Reject #1 (Req-Sent)
Oct 31 01:17:03 dc mpd: COMPPROTO VJCOMP, 16 comp. channels, no comp-cid
Oct 31 01:17:03 dc mpd: [pptp0] IPCP: SendConfigReq #2
Oct 31 01:17:03 dc mpd: IPADDR 192.168.1.1
Oct 31 01:17:03 dc mpd: [pptp0] CCP: rec'd Configure Nak #1 (Req-Sent)
Oct 31 01:17:03 dc mpd: MPPC
Oct 31 01:17:03 dc mpd: 0x01000040:MPPE(128 bits), stateless
Oct 31 01:17:03 dc mpd: [pptp0] CCP: SendConfigReq #2
Oct 31 01:17:03 dc mpd: MPPC
Oct 31 01:17:03 dc mpd: 0x01000040:MPPE(128 bits), stateless
Oct 31 01:17:03 dc mpd: [pptp0] CCP: rec'd Configure Request #6 (Req-Sent)
Oct 31 01:17:03 dc mpd: MPPC
Oct 31 01:17:03 dc mpd: 0x01000040:MPPE(128 bits), stateless
Oct 31 01:17:03 dc mpd: [pptp0] CCP: SendConfigAck #6
Oct 31 01:17:03 dc mpd: MPPC
Oct 31 01:17:03 dc mpd: 0x01000040:MPPE(128 bits), stateless
Oct 31 01:17:03 dc mpd: [pptp0] CCP: state change Req-Sent --> Ack-Sent
Oct 31 01:17:03 dc mpd: [pptp0] IPCP: rec'd Configure Request #7 (Req-Sent)
Oct 31 01:17:03 dc mpd: IPADDR 0.0.0.0
Oct 31 01:17:03 dc mpd: NAKing with 192.168.1.13
Oct 31 01:17:03 dc mpd: PRIDNS 0.0.0.0
Oct 31 01:17:03 dc mpd: NAKing with 192.168.0.1
Oct 31 01:17:03 dc mpd: [pptp0] IPCP: SendConfigNak #7
Oct 31 01:17:03 dc mpd: IPADDR 192.168.1.13
Oct 31 01:17:03 dc mpd: PRIDNS 192.168.0.1
Oct 31 01:17:03 dc mpd: [pptp0] IPCP: rec'd Configure Ack #2 (Req-Sent)
Oct 31 01:17:03 dc mpd: IPADDR 192.168.1.1
Oct 31 01:17:03 dc mpd: [pptp0] IPCP: state change Req-Sent --> Ack-Rcvd
Oct 31 01:17:03 dc mpd: [pptp0] CCP: rec'd Configure Ack #2 (Ack-Sent)
Oct 31 01:17:03 dc mpd: MPPC
Oct 31 01:17:03 dc mpd: 0x01000040:MPPE(128 bits), stateless
Oct 31 01:17:03 dc mpd: [pptp0] CCP: state change Ack-Sent --> Opened
Oct 31 01:17:03 dc mpd: [pptp0] CCP: LayerUp
Oct 31 01:17:03 dc mpd: Compress using: mppc (MPPE(128 bits), stateless)
Oct 31 01:17:03 dc mpd: Decompress using: mppc (MPPE(128 bits), stateless)
Oct 31 01:17:03 dc mpd: [pptp0] IPCP: rec'd Configure Request #8 (Ack-Rcvd)
Oct 31 01:17:03 dc mpd: IPADDR 192.168.1.13
Oct 31 01:17:03 dc mpd: 192.168.1.13 is OK
Oct 31 01:17:03 dc mpd: PRIDNS 192.168.0.1
Oct 31 01:17:03 dc mpd: [pptp0] IPCP: SendConfigAck #8
Oct 31 01:17:03 dc mpd: IPADDR 192.168.1.13
Oct 31 01:17:03 dc mpd: PRIDNS 192.168.0.1
Oct 31 01:17:03 dc mpd: [pptp0] IPCP: state change Ack-Rcvd --> Opened
Oct 31 01:17:03 dc mpd: [pptp0] IPCP: LayerUp
Oct 31 01:17:03 dc mpd: 192.168.1.1 -> 192.168.1.13
Oct 31 01:17:03 dc mpd: [pptp0] IFACE: Up event
Oct 31 01:17:03 dc mpd: [pptp0] AUTH: Accounting-Thread started
Oct 31 01:17:03 dc mpd: [pptp0] RADIUS: RadiusAccount for: abigor (Type: 1)
Oct 31 01:17:03 dc mpd: [pptp0] RADIUS: rec'd RAD_ACCOUNTING_RESPONSE for user abigor
Oct 31 01:17:03 dc mpd: [pptp0] RADIUS: RadiusGetParams: WARNING no MPPE-Keys received, MPPE will not work
Oct 31 01:17:03 dc mpd: [pptp0] AUTH: Accounting-Thread finished normally
Oct 31 01:22:03 dc mpd: [pptp0] AUTH: Sending Accounting Update
Oct 31 01:22:03 dc mpd: [pptp0] AUTH: Accounting-Thread started
Oct 31 01:22:03 dc mpd: [pptp0] RADIUS: RadiusAccount for: abigor (Type: 3)
Oct 31 01:22:03 dc mpd: [pptp0] RADIUS: rec'd RAD_ACCOUNTING_RESPONSE for user abigor
Oct 31 01:22:03 dc mpd: [pptp0] RADIUS: RadiusGetParams: WARNING no MPPE-Keys received, MPPE will not work
Oct 31 01:22:03 dc mpd: [pptp0] AUTH: Accounting-Thread finished normally
================================================================================
У клиента IP:192.168.0.250