I want to log PPTP traffic until I encounter one or more failed vpn connection attempts; see the Background Story. This morning I spent a couple of hours reading the tcpdump man page and related how-to pages on the web. tcpdump is truly a complex utility offering many options that I do not understand. I am learning but could use a bit of help.
Can anyone offer a suggestion or example of using tcpdump capture only packets those relating to PPTP?
TIA.
The Background Story:
I am slouching my way to greater understanding about VPN connections. The basic problem of my ignorance continues to be an obstacle.
The setup: a Mac OS X, v10.5.8, (OSX) client running behind SME Server/Gateway (SME). SME is set to allow incoming VPN and the OSX needs to connect to external VPN's frequently. The outbound connection attempts succeed about 1 in 10 times. The inbound connections by remote users are successful 1 out 20 attempts. Occasionally, clients seem to get "stuck", lose connection and cannot re-connect. A client reboot clears that problem.
Back in April, Charlie Brady was kind enough to offer this answer to my question "What might be causing outbound VPN connects to fail?".
There are quiet a few possible reasons. I think the most likely one is that a GRE packet from the VPN server is arriving SME WAN interface before your VPN client has sent one through the SME server. Because you have inbound VPN clients, the iptables firewall is configured to allow inbound GRE. If your MAC client is setting up a PPTP connection to an external server, the external server and the MAC client will start to send each other GRE packets. The GRE packets contain LCP negotiation traffic. If a GRE packet from MAC client to remote PPTP server is the first to pass through SME server, all is good. When the server to MAC client packet arrives, it will be forwarded to the MAC client. If the remote server to MAC client packet arrives first, SME server will not know to forward it to the MAC client, so will try to process it. Because there is no process waiting for that packet, it will be rejected - an ICMP packet will be sent back to the remote VPN server.
To test this theory, disable inbound PPTP, and try again. Or just do packet capture and see exactly what is happening.
Disabling the inbound PPTP traffic did allow the outbound connections to succeed with two different external servers. BTW, one was another SME install and one was some other brand of vpn gateway.
So looking into the ippp log on SME I don't see anything particularly interesting.
Here is a snippet of the Mac OS X 10.5.8 client's ppp.log
Fri Nov 6 06:42:43 2009 : PPTP connecting to server 'xxx.xxx.xxx.xxx' (xxx.xxx.xxx.xxx)...
Fri Nov 6 06:42:44 2009 : PPTP connection established.
Fri Nov 6 06:42:44 2009 : Using interface ppp0
Fri Nov 6 06:42:44 2009 : Connect: ppp0 <--> socket[34:17]
Fri Nov 6 06:43:14 2009 : LCP: timeout sending Config-Requests
Fri Nov 6 06:43:14 2009 : Connection terminated.
Fri Nov 6 06:43:14 2009 : PPTP disconnecting...
Fri Nov 6 06:43:14 2009 : PPTP disconnected