VPN Client-to-host (pptpd) [RESOLVIDO]

1. VPN Client-to-host (pptpd) [RESOLVIDO]

Frederico Inácio de Oliveira
frajolitzz

(usa Slackware)

Enviado em 30/04/2009 - 12:59h

Salve comunidade ...

Moçada, tô precisando liberar um acesso VPN e como nunca fiz isso, tô levando uma surra monstra. Tô googlando a algum tempo, mas não achei solução pro meu problema, apesar de ter achado muita gente com o mesmo problema.

O erro que aparece quando o cliente tenta conectar é o seguinte:

Apr 30 11:36:12 zangao pptpd[18154]: CTRL: PTY read or GRE write failed (pty,gre)=(6,7)
Apr 30 11:36:12 zangao pptpd[18154]: CTRL: Client XXX.XXX.XXX.XXX control connection finished
Apr 30 11:37:12 zangao pptpd[18176]: CTRL: Client XXX.XXX.XXX.XXX control connection started
Apr 30 11:37:13 zangao pptpd[18176]: CTRL: Starting call (launching pppd, opening GRE)
Apr 30 11:37:13 zangao pppd[18177]: pppd 2.4.4 started by root, uid 0
Apr 30 11:37:13 zangao pppd[18177]: Using interface ppp0
Apr 30 11:37:13 zangao pppd[18177]: Connect: ppp0 <--> /dev/pts/1
Apr 30 11:37:43 zangao pppd[18177]: LCP: timeout sending Config-Requests
Apr 30 11:37:43 zangao pppd[18177]: Connection terminated.
Apr 30 11:37:43 zangao pppd[18177]: Modem hangup
Apr 30 11:37:43 zangao pppd[18177]: Exit.
Apr 30 11:37:43 zangao pptpd[18176]: GRE: read(fd=6,buffer=804e5a0,len=8196) from PTY failed: status = -1 error = Input/output error, usually caused by unexpected termination of pppd, check option syntax and pppd logs
Apr 30 11:37:43 zangao pptpd[18176]: CTRL: PTY read or GRE write failed (pty,gre)=(6,7)
Apr 30 11:37:43 zangao pptpd[18176]: CTRL: Client XXX.XXX.XXX.XXX control connection finished

Esse é o log do servidor.
O erro acontece justamente na hora em que o cliente tenta autenticar o usuário.

Segue abaixo minha configuração:

./etc/pptpd.conf
option /etc/ppp/options.pptpd
debug
localip 10.0.0.1-205,10.0.0.230-254
remoteip 10.0.0.206-210

./etc/ppp/options
debug
auth
proxyarp

./etc/ppp/options.pptpd
name pptpd
lock
auth
require-chap
nodefaultroute
nodeflate
nobsdcomp
nomppe

./etc/ppp/chap-secrets
wpd * wpd123 *

./etc/ppp/pap-secrets
wpd * wpd123 *

Bom, é isso. Idéias do que pode tá acontecendo?
Desde já agradeço a atenção de todos.

Abraço.







  


2. Re: VPN Client-to-host (pptpd) [RESOLVIDO]

Valdir Júnior
juniorvrsj

(usa RedHat)

Enviado em 04/05/2009 - 00:21h

Caro amigo add essas regras no seu Firewall

#Porta do PPTPD

iptables -A INPUT -i ppp+ -j ACCEPT
iptables -A FORWARD -i ppp+ -j ACCEPT

iptables -A INPUT -p udp --dport 1723 -j ACCEPT
iptables -A OUTPUT -p udp --sport 1723 -j ACCEPT
iptables -A INPUT -p 47 -j ACCEPT

Atenciosamente
Valdir Junior


3. Re: VPN Client-to-host (pptpd) [RESOLVIDO]

Frederico Inácio de Oliveira
frajolitzz

(usa Slackware)

Enviado em 08/05/2009 - 19:06h

Olá Valdir,

Já havia adicionado as regras, com exceção de uma. Mas o problema persiste.

De qualquer forma, muito obrigado pela ajuda.




4. Re: VPN Client-to-host (pptpd) [RESOLVIDO]

Valdir Júnior
juniorvrsj

(usa RedHat)

Enviado em 11/05/2009 - 01:36h

Caro amigo

Qual sua Distro?
Quando vc estarta o serviço da erro?

Manda os novos logs.

Atenciosamente
Valdir Júnior


5. Re: VPN Client-to-host (pptpd) [RESOLVIDO]

Frederico Inácio de Oliveira
frajolitzz

(usa Slackware)

Enviado em 14/05/2009 - 17:41h

Opa ... demorei mas voltei :]

Tô usando o Red Hat 5.

Quando inicio o serviço aparece o seguinte:
May 14 16:24:27 zangao pptpd[27423]: MGR: Maximum of 100 connections reduced to 3, not enough IP addresses given
May 14 16:24:27 zangao pptpd[27424]: MGR: Manager process started
May 14 16:24:27 zangao pptpd[27424]: MGR: Maximum of 3 connections available

Quando tento conectar, o log é esse:
May 12 12:09:32 zangao pptpd[18561]: MGR: Launching /usr/sbin/pptpctrl to handle client
May 12 12:09:32 zangao pptpd[18561]: CTRL: local address = 10.0.0.254
May 12 12:09:32 zangao pptpd[18561]: CTRL: remote address = 10.0.0.206
May 12 12:09:32 zangao pptpd[18561]: CTRL: pppd speed = 115200
May 12 12:09:32 zangao pptpd[18561]: CTRL: pppd options file = /etc/ppp/options.pptpd
May 12 12:09:32 zangao pptpd[18561]: CTRL: Client 200.163.100.128 control connection started
May 12 12:09:32 zangao pptpd[18561]: CTRL: Received PPTP Control Message (type: 1)
May 12 12:09:32 zangao pptpd[18561]: CTRL: Made a START CTRL CONN RPLY packet
May 12 12:09:32 zangao pptpd[18561]: CTRL: I wrote 156 bytes to the client.
May 12 12:09:32 zangao pptpd[18561]: CTRL: Sent packet to client
May 12 12:09:32 zangao pptpd[18561]: CTRL: Received PPTP Control Message (type: 7)
May 12 12:09:32 zangao pptpd[18561]: CTRL: Set parameters to 100000000 maxbps, 64 window size
May 12 12:09:32 zangao pptpd[18561]: CTRL: Made a OUT CALL RPLY packet
May 12 12:09:32 zangao pptpd[18561]: CTRL: Starting call (launching pppd, opening GRE)
May 12 12:09:32 zangao pptpd[18561]: CTRL: pty_fd = 6
May 12 12:09:32 zangao pptpd[18561]: CTRL: tty_fd = 7
May 12 12:09:32 zangao pptpd[18562]: CTRL (PPPD Launcher): program binary = /usr/sbin/pppd
May 12 12:09:32 zangao pptpd[18562]: CTRL (PPPD Launcher): local address = 10.0.0.254
May 12 12:09:32 zangao pptpd[18562]: CTRL (PPPD Launcher): remote address = 10.0.0.206
May 12 12:09:33 zangao pppd[18562]: pppd 2.4.4 started by root, uid 0
May 12 12:09:33 zangao pppd[18562]: using channel 36
May 12 12:09:33 zangao pppd[18562]: Using interface ppp0
May 12 12:09:33 zangao pppd[18562]: Connect: ppp0 <--> /dev/pts/1
May 12 12:09:33 zangao pppd[18562]: sent [LCP ConfReq id=0x1 <asyncmap 0x0> <auth eap> <magic 0x14427bc> <pcomp> <accomp>]
May 12 12:09:33 zangao pptpd[18561]: CTRL: I wrote 32 bytes to the client.
May 12 12:09:33 zangao pptpd[18561]: CTRL: Sent packet to client
May 12 12:09:33 zangao pptpd[18561]: CTRL: Received PPTP Control Message (type: 15)
May 12 12:09:33 zangao pptpd[18561]: CTRL: Got a SET LINK INFO packet with standard ACCMs
May 12 12:09:36 zangao pppd[18562]: sent [LCP ConfReq id=0x1 <asyncmap 0x0> <auth eap> <magic 0x14427bc> <pcomp> <accomp>]
May 12 12:10:00 zangao last message repeated 8 times
May 12 12:10:03 zangao pppd[18562]: LCP: timeout sending Config-Requests
May 12 12:10:03 zangao pppd[18562]: Connection terminated.
May 12 12:10:03 zangao pppd[18562]: Modem hangup
May 12 12:10:03 zangao pppd[18562]: using channel 37
May 12 12:10:03 zangao pppd[18562]: Using interface ppp0
May 12 12:10:03 zangao pppd[18562]: Connect: ppp0 <--> /dev/pts/1
May 12 12:10:03 zangao pppd[18562]: sent [LCP ConfReq id=0x2 <asyncmap 0x0> <auth eap> <magic 0xb6fdef34> <pcomp> <accomp>]
May 12 12:10:09 zangao last message repeated 2 times
May 12 12:10:09 zangao pptpd[18561]: CTRL: Received PPTP Control Message (type: 12)
May 12 12:10:09 zangao pptpd[18561]: CTRL: Made a CALL DISCONNECT RPLY packet
May 12 12:10:09 zangao pptpd[18561]: CTRL: Received CALL CLR request (closing call)
May 12 12:10:09 zangao pptpd[18561]: CTRL: Reaping child PPP[18562]
May 12 12:10:09 zangao pppd[18562]: Modem hangup
May 12 12:10:09 zangao pppd[18562]: Connection terminated.
May 12 12:10:09 zangao pppd[18562]: Failed to open /dev/pts/1: No such file or directory
May 12 12:10:09 zangao last message repeated 7 times
May 12 12:10:09 zangao pppd[18562]: Exit.
May 12 12:10:09 zangao pptpd[18561]: CTRL: Client 200.163.100.128 control connection finished
May 12 12:10:09 zangao pptpd[18561]: CTRL: Exiting now
May 12 12:10:09 zangao pptpd[14117]: MGR: Reaped child 18561

Abraço.


6. Re: VPN Client-to-host (pptpd) [RESOLVIDO]

Frederico Inácio de Oliveira
frajolitzz

(usa Slackware)

Enviado em 22/05/2009 - 16:46h

Consegui ... a configuração do servidor estava 100%.
O problema é que no modem eu havia liberado apenas a 47 e 1723 ... ainda não sei que porta estava faltando, mas liberei da 22 a 5900 e passou :D

Agora uma coisa, como faço pra visualizar quem está conectado na vpn?

Abraço


7. Re: VPN Client-to-host (pptpd) [RESOLVIDO]

Josué Valtrick
valtrick

(usa openSUSE)

Enviado em 22/05/2009 - 18:24h

Utiliza o comando:

#pppstats


Abraço.


8. Também preciso de ajuda

George Jales
georgejales

(usa Fedora)

Enviado em 13/07/2009 - 01:05h

Bom dia, li seus comentários sobre o problema com a VPN e estou com o mesmo problema. Estou usando o Fedora 8 com kernel 2.6.23. O Servidor é Windows 2003. Eu instalei o client da vpn e estou executando o seguinte comando:
"pptpsetup --create VPN_CLIENT --server IP_SERVER --username USER --password PASSWD --encrypt --start" e o log é o seguinte:
pppd[801]: pppd 2.4.4 started by inadmin, uid 0
pptp[802]: anon log[main:pptp.c:314]: The synchronous pptp option is NOT activated
pppd[801]: Using interface ppp0
pppd[801]: Connect: ppp0 <--> /dev/pts/2
pptp[813]: anon log[ctrlp_rep:pptp_ctrl.c:251]: Sent control packet type is 1 'Start-Control-Connection-Request'
pptp[813]: anon log[ctrlp_disp:pptp_ctrl.c:739]: Received Start Control Connection Reply
pptp[813]: anon log[ctrlp_disp:pptp_ctrl.c:773]: Client connection established.
pptp[813]: anon log[ctrlp_rep:pptp_ctrl.c:251]: Sent control packet type is 7 'Outgoing-Call-Request'
pppd[801]: LCP: timeout sending Config-Requests
pppd[801]: Connection terminated.
pppd[801]: Modem hangup
pppd[801]: Exit.
pptp[813]: anon log[callmgr_main:pptp_callmgr.c:234]: Closing connection (unhandled)
pptp[813]: anon log[ctrlp_rep:pptp_ctrl.c:251]: Sent control packet type is 12 'Call-Clear-Request'
pptp[813]: anon log[call_callback:pptp_callmgr.c:79]: Closing connection (call state)

Já zerei o firewall, liberei portas 1723 e protocolo GRE (47) tanto nas tabelas filter e nat.
Se tento conectar de dentro da rede usando Windows XP conecta que é uma maravilha, comprovando que o servidor esta ok, mas o meu Proxy usando linux não conecta. Ja configurei o options.pptp de tudo que é jeito e nada também.
Por favor me envie os comandos e configurações que você usou.
Abração.
George Jales
e-mail: georgejales@gmail.com


9. Re: VPN Client-to-host (pptpd) [RESOLVIDO]

Frederico Inácio de Oliveira
frajolitzz

(usa Slackware)

Enviado em 14/07/2009 - 09:36h

Fala cara, bom?

Me baseei no artigo do site http://www.guiadohardware.net/artigos/vpn-pptp/

Abraço.







Patrocínio

Site hospedado pelo provedor RedeHost.
Linux banner

Destaques

Artigos

Dicas

Tópicos

Top 10 do mês

Scripts