Re: problem getting client to connect via pptpd

[email protected] Mon, 07 Jan 2013 09:03:10 +0000
Newsgroups gmane.network.poptop
Message-ID <[email protected]>
Some comments below and logs attached at the bottom.

> Something seems fishy here.  This looks like you're somehow mixing PPTP
> and OpenVPN.  Why the references to UDP port 1194?  And device tun0 and
> tun1?  Those are OpenVPN ports and pseudo-devices.  What did the tcpdump
> trace James suggested you try look like?

Yes, I have OpenVPN and squid running on the server and now I want to  
add PPTP as well so that iOS devices can connect.

> You're setting up a PopTop PPTP Server, right?  Or maybe this is a PPTP
> client?

I installed pptpd but am trying to connect with a pptp client.

>
> This also doesn't look right:
>
>> Nov 25 22:50:41 jason pppd[26073]: Warning: can't open options file
>> /root/.ppprc: Permission denied
> What's up with the Permission denied error and the old date?

I got this when trying to look for that file:
Not sure about the date, I just rechecked the logs and it seems fine.
# cd /root/.ppprc
-bash: cd: /root/.ppprc: No such file or directory
[root@jason ~]# locate .ppprc

> On your firewall rules - if it were me, I'd change:
>
>> -A FORWARD -i ppp+ -o eth0 -j ACCEPT
>> -A FORWARD -i eth0 -o ppp+ -j ACCEPT
>> -A OUTPUT -o tun+ -j ACCEPT
>
> to something like,
>
> -A INPUT -i ppp+ -j ACCEPT
> -A INPUT -i tun+ -j ACCEPT
> -A FORWARD -i ppp+ -j ACCEPT
> -A FORWARD -i tun+ -j ACCEPT
> -A OUTPUT -o tun+ -j ACCEPT
> -A OUTPUT -o ppp+ -j ACCEPT
> -A OUTPUT -o eth0 -j ACCEPT
> -A OUTPUT -o {all your devices} -j ACCEPT
>
> You really don't need any ppp+ FORWARD rules; all that traffic should
> end at your PPTP server and then be unpacked and forwarded on over
> "regular" ethnn interfaces.  The ppp+ stuff is between this PPTP server
> and remote PPTP clients.
>
> I don't think you want to masquerade your 10.8.nnn traffic.  This is
> traffic in your OpenVPN tunnels and presumably you'll want systems on
> both sides to know where the streams are really coming from.
>
> This DNAT rule looks strange:
>
>> add port 1723
>> -A PREROUTING -d 88.xxx.xxx.xx9 -p tcp -m tcp --dport 1723 -j DNAT
>> --to-destination 88.xxx.xxx.xx9:1723
>
> Why are you DNATing to the same public IP Address and same port?  Well
> wait a second - why DNAT at all?  This *is* your PPTP server, right?  If
> so you don't need any DNAT rules for TCP 1723 or GRE.  And if this is a
> PPTP client, you still don't need any DNAT rules for this.  Unless you
> have another PPTP server behind this one for some reason.
>
Changed those.
messages log now:
Jan  7 09:36:58 jason pptpd[20824]: CTRL: Client 86.15.42.109 control  
connection started
Jan  7 09:36:59 jason pptpd[20824]: CTRL: Starting call (launching  
pppd, opening GRE)
Jan  7 09:36:59 jason pppd[20825]: Plugin  
/usr/lib64/pptpd/pptpd-logwtmp.so loaded.
Jan  7 09:36:59 jason pppd[20825]: pptpd-logwtmp: $Version$
Jan  7 09:36:59 jason pptpd[20824]: GRE: Bad checksum from pppd.
Jan  7 09:37:29 jason pptpd[20824]: GRE:  
read(fd=6,buffer=611860,len=8196) from PTY failed: status = -1 error =  
Input/output error, usually caused by unexpected termination of pppd,  
check option syntax and pppd logs
Jan  7 09:37:29 jason pptpd[20824]: CTRL: PTY read or GRE write failed  
(pty,gre)=(6,7)
Jan  7 09:37:29 jason pptpd[20824]: CTRL: Client 86.15.42.109 control  
connection finished
Jan  7 09:45:49 jason pptpd[20926]: CTRL: Client 86.15.42.109 control  
connection started
Jan  7 09:45:49 jason pptpd[20926]: CTRL: Starting call (launching  
pppd, opening GRE)
Jan  7 09:45:49 jason pptpd[20926]: GRE: Bad checksum from pppd.
Jan  7 09:46:19 jason pptpd[20926]: GRE:  
read(fd=6,buffer=611860,len=8196) from PTY failed: status = -1 error =  
Input/output error, usually caused by unexpected termination of pppd,  
check option syntax and pppd logs
Jan  7 09:46:19 jason pptpd[20926]: CTRL: PTY read or GRE write failed  
(pty,gre)=(6,7)
Jan  7 09:46:19 jason pptpd[20926]: CTRL: Client 86.15.42.109 control  
connection finished

RSYSLOG attached:
grep 'pptp' /var/log/ppp.log
8349.200661216:7f48abcd2700: MsgSetTAG in: len 13, pszBuf: pptpd[20926]:
8349.200683183:7f48abcd2700: MsgSetTAG exit: pMsg->iLenTAG 13,  
pMsg->TAG.szBuf: pptpd[20926]:
8349.231429737:7f48abcd2700: MsgSetTAG in: len 13, pszBuf: pptpd[20926]:
8349.231460884:7f48abcd2700: MsgSetTAG exit: pMsg->iLenTAG 13,  
pMsg->TAG.szBuf: pptpd[20926]:
8349.258987855:7f48abcd2700: MsgSetTAG in: len 13, pszBuf: pptpd[20926]:
8349.259015504:7f48abcd2700: MsgSetTAG exit: pMsg->iLenTAG 13,  
pMsg->TAG.szBuf: pptpd[20926]:
8379.308250605:7f48abcd2700: MsgSetTAG in: len 13, pszBuf: pptpd[20926]:
8379.308282904:7f48abcd2700: MsgSetTAG exit: pMsg->iLenTAG 13,  
pMsg->TAG.szBuf: pptpd[20926]:
8379.308769854:7f48abcd2700: MsgSetTAG in: len 13, pszBuf: pptpd[20926]:
8379.308800533:7f48abcd2700: MsgSetTAG exit: pMsg->iLenTAG 13,  
pMsg->TAG.szBuf: pptpd[20926]:
8379.309117457:7f48abcd2700: MsgSetTAG in: len 13, pszBuf: pptpd[20926]:
8379.309144664:7f48abcd2700: MsgSetTAG exit: pMsg->iLenTAG 13,  
pMsg->TAG.szBuf: pptpd[20926]:
8379.309688935:7f48abcd2700: MsgSetTAG in: len 13, pszBuf: pptpd[20926]:
8379.309725761:7f48abcd2700: MsgSetTAG exit: pMsg->iLenTAG 13,  
pMsg->TAG.szBuf: pptpd[20926]:





------------------------------------------------------------------------------
Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
MVPs and experts. SALE $99.99 this month only -- learn more at:
http://p.sf.net/sfu/learnmore_122412