Estou tentando instalar uma VPN novamente em um servidor Mac OSX e parece ter se deparado com um MPPE. Quando tento conectar-me à VPN do meu laptop na mesma rede local, recebo as seguintes mensagens em /var/log/ppp/vpnd.log
2015-07-14 17:01:45 MDT Incoming call... Address given to client = xx.xxx.xx.xxx
Tue Jul 14 17:01:45 2015 : Directory Services Authentication plugin initialized
Tue Jul 14 17:01:45 2015 : Directory Services Authorization plugin initialized
Tue Jul 14 17:01:45 2015 : PPTP incoming call in progress from '192.168.1.154'...
Tue Jul 14 17:01:46 2015 : PPTP connection established.
Tue Jul 14 17:01:46 2015 : using link 0
Tue Jul 14 17:01:46 2015 : Using interface ppp0
Tue Jul 14 17:01:46 2015 : Connect: ppp0 <--> socket[34:17]
Tue Jul 14 17:01:46 2015 : sent [LCP ConfReq id=0x1 <asyncmap 0x0> <auth chap MS-v2> <magic 0x4c905d23> <pcomp> <accomp>]
Tue Jul 14 17:01:46 2015 : rcvd [LCP ConfReq id=0x1 <asyncmap 0x0> <magic 0x5dd17fa9> <pcomp> <accomp>]
Tue Jul 14 17:01:46 2015 : lcp_reqci: returning CONFACK.
Tue Jul 14 17:01:46 2015 : sent [LCP ConfAck id=0x1 <asyncmap 0x0> <magic 0x5dd17fa9> <pcomp> <accomp>]
Tue Jul 14 17:01:46 2015 : rcvd [LCP ConfAck id=0x1 <asyncmap 0x0> <auth chap MS-v2> <magic 0x4c905d23> <pcomp> <accomp>]
Tue Jul 14 17:01:46 2015 : sent [LCP EchoReq id=0x0 magic=0x4c905d23]
Tue Jul 14 17:01:46 2015 : sent [CHAP Challenge id=0x43 <2a596a4a75602b4946642a2d1b12050b>, name = "server"]
Tue Jul 14 17:01:46 2015 : rcvd [LCP EchoRep id=0x0 magic=0x5dd17fa9]
Tue Jul 14 17:01:46 2015 : rcvd [CHAP Response id=0x43 <afb93f9351af212c460cf851eaf6d0580000000000000000e1bda0d312f0542755399c6ca465b7a8878439608d30f16100>, name = "admin"]
Tue Jul 14 17:01:46 2015 : sent [CHAP Success id=0x43 "S=3B614827970F82512A68E1022EF6F7FC0AF4FA3F M=Access granted"]
Tue Jul 14 17:01:46 2015 : CHAP peer authentication succeeded for admin
Tue Jul 14 17:01:46 2015 : DSAccessControl plugin: User 'admin' authorized for access
Tue Jul 14 17:01:46 2015 : sent [CCP ConfReq id=0x1 <mppe +H -M +S +L -D -C>]
Tue Jul 14 17:01:46 2015 : rcvd [CCP ConfReq id=0x1 <deflate 15> <deflate(old#) 15> <bsd v1 15>]
Tue Jul 14 17:01:46 2015 : MPPE required but peer negotiation failed
Tue Jul 14 17:01:46 2015 : sent [LCP TermReq id=0x2 "MPPE required but peer negotiation failed"]
Tue Jul 14 17:01:46 2015 : Connection terminated.
Tue Jul 14 17:01:46 2015 : sent [CCP ConfRej id=0x1 <deflate 15> <deflate(old#) 15> <bsd v1 15>]
Tue Jul 14 17:01:46 2015 : Connect time 0.0 minutes.
Tue Jul 14 17:01:46 2015 : Sent 0 bytes, received 0 bytes.
Tue Jul 14 17:01:46 2015 : PPTP disconnecting...
Tue Jul 14 17:01:46 2015 : PPTP disconnected
2015-07-14 17:01:46 MDT --> Client with address = xx.xxx.xx.xxx has hungup
O que eu recebo da pesquisa online (particularmente aqui ) é que há uma incompatibilidade de criptografia entre o cliente e servidor. Eu não consigo abrir um ambiente gráfico no meu servidor, então eu tenho configurado sobre o ssh. O arquivo aplicável no servidor parece ser /Library/Preferences/SystemConfiguration/com.apple.RemoteAccessServers.plist
, que possui as seguintes linhas relacionadas ao MPPE
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>ActiveServers</key>
<array>
<string>com.apple.ppp.pptp</string>
</array>
<key>Servers</key>
...
<key>com.apple.ppp.pptp</key>
<dict>
...
<key>PPP</key>
<dict>
...
<key>CCPProtocols</key>
<array>
<string>MPPE</string>
</array>
...
<key>MPPEKeySize128</key>
<integer>1</integer>
<key>MPPEKeySize40</key>
<integer>1</integer>
...
</dict>
...
</dict>
</dict>
</dict>
</plist>
Parece que ele deve ser configurado para funcionar com tamanhos de chave MPPE de 40 bits e 128 bits. No meu servidor, não há arquivos em /etc/ppp/
. No cliente, eu tenho arquivos em /etc/ppp/
, mas tudo relacionado ao MPPE parece ser comentado em /etc/ppp/options.pptp
# Encryption
# (There have been multiple versions of PPP with encryption support,
# choose with of the following sections you will use. Note that MPPE
# requires the use of MSCHAP-V2 during authentication)
# http://ppp.samba.org/ the PPP project version of PPP by Paul Mackarras
# ppp-2.4.2 or later with MPPE only, kernel module ppp_mppe.o
# {{{
# Require MPPE 128-bit encryption
#require-mppe-128
# }}}
# http://polbox.com/h/hs001/ fork from PPP project by Jan Dubiec
# ppp-2.4.2 or later with MPPE and MPPC, kernel module ppp_mppe_mppc.o
# {{{
# Require MPPE 128-bit encryption
#mppe required,stateless
# }}}
Eu tentei descomentar as várias linhas mppe (mesmo com e sem as triplas chaves, que eu não conseguia discernir se elas significavam alguma coisa). O início das conexões VPN recebeu a mesma mensagem MPPE required but peer negotiation failed
todas as vezes.
No meu cliente estou executando o pppd versão 2.4.5. No servidor, tentar executar qualquer opção com o pppd me dá a mensagem
pppd: Can't open options file /etc/ppp/options: No such file or directory
Por isso, não sei qual versão está sendo executada no servidor.
Alguma idéia do que mais eu deveria estar tentando?