This episode covers GRE as PPTP's data carrier: the structure of the GRE version 1 header, how PPP frames are encapsulated, the added overhead, MTU considerations and MSS clamping, and the limitations of GRE being stateless and not NAT-friendly.

If the control channel is the brain of PPTP, then GRE is its backbone. All the data you send through the tunnel is carried by GRE, and GRE's characteristics determine PPTP's speed, compatibility, and notorious NAT problems.
Episode 5 dissects Generic Routing Encapsulation: its header structure, how PPP frames are wrapped, the overhead you must account for in MTU, MSS clamping techniques, and GRE's fundamental limitations.
GRE (Generic Routing Encapsulation) is a tunneling protocol defined in RFC 2784. Its job is simple: wrap a packet or frame inside another IP packet, so the two networks appear to be directly connected.
PPTP uses GRE version 1, defined specifically in RFC 2637. This GRE version 1 header adds the Call ID and sequence number fields that do not exist in standard GRE — this is what distinguishes PPTP's GRE from other VPN GREs.
sudo tcpdump -i any proto 47 -ntcpdump -i any proto 47 -n shows all GRE packets. When a PPTP tunnel is active with data flowing, you will see a stream of protocol 47 packets carrying PPP frames.
Standard GRE is defined in RFC 2784 and is generic: it can wrap any protocol inside IP. PPTP uses a special variant documented in RFC 2637, with two additional fields: a Call ID to identify the tunnel and a sequence number to preserve packet order.
As a consequence, firewall packet filters cannot simply look at protocol 47 alone. To distinguish PPTP GRE from other GRE, you need to inspect the GRE header version — something generally handled automatically by the PPTP conntrack module discussed in episode 16.
When an application sends data, the encapsulation order is: the payload is wrapped in a PPP frame, the PPP frame is trimmed to the PPP MTU, then placed as the GRE payload. The GRE packet is then given the destination IP header.
The PPTP GRE header contains the version, flags, a Call ID to distinguish tunnels, and a sequence number to detect packet loss in stateful MPPE mode. Without the Call ID, the server could not distinguish multiple clients on a single connection.
Each layer adds bytes:
Total PPTP overhead is typically in the 50-80 byte range depending on options. That means if the network MTU is 1500, the maximum payload you can send is around 1400 bytes.
To prevent packets from fragmenting, the PPP interface MTU must be reduced. In the pppd options file:
mtu 1400
mru 1400The mtu 1400 and mru 1400 lines limit the frame size to fit PPTP's overhead. 1400 is a common starting point; on networks with a smaller MTU, you will need to lower it further.
MSS (Maximum Segment Size) is negotiated during the TCP handshake. If an application sets MSS 1460 for MTU 1500, packets inside the PPTP tunnel will exceed the limit and fragment. The solution is MSS clamping at the firewall.
sudo iptables -t mangle -A FORWARD -p tcp --tcp-flags SYN,RST SYN -j TCPMSS --clamp-mss-to-pmtuThe rule iptables -t mangle -A FORWARD -p tcp --tcp-flags SYN,RST SYN -j TCPMSS --clamp-mss-to-pmtu adjusts the MSS of every passing TCP connection based on the path MTU. This is often the lifesaver when websites feel slow or refuse to load through the tunnel.
The correct MSS value follows a simple formula: the tunnel MTU minus the size of the TCP and IP headers. For a tunnel MTU of 1400, the result is about 1360:
If automatic clamping is not available on your firewall, set an explicit value with --set-mss 1360 on the TCPMSS rule. Make sure this value is consistent with the MTU configured in the pppd options file, and adjust it again whenever the tunnel MTU changes.
GRE is a stateless protocol: it does not track connection state, offers no retransmission, and has no concept of congestion control. All of that is left to the TCP layer above it.
GRE also has no built-in encryption. The security of data in a PPTP tunnel depends entirely on MPPE, which is optional. If MPPE is not active, all data crosses the GRE tunnel in plaintext — a risk we will discuss in episode 13.
Because GRE only uses a protocol number without ports, NAT routers cannot distinguish between different GRE sessions. This causes many PPTP connections to fail behind NAT. The details and solutions are covered fully in episode 16.
PPTP GRE has its own sequence numbers, and fragmentation at the IP level can complicate the tunnel. When GRE packets fragment on the network, their order can get scrambled and performance drops drastically. That is why the tunnel MTU must always be smaller than the physical path MTU.
The rule of thumb: start from the physical path MTU (for example 1500), subtract PPTP's overhead (about 80 bytes), then add a small margin. The result is usually around 1400. For PPPoE paths that already use an MTU of 1492, the tunnel value needs to drop again to about 1300.
After changing the MTU, always test with a large file transfer and a ping at maximum size. If performance drops, recheck the overhead calculation and make sure the MSS clamping rule is installed on the firewall.
Episode 5 mapped PPTP's data layer: the GRE version 1 header with Call ID and sequence number, 50-80 bytes of overhead that forces a lower MTU, MSS clamping techniques, and GRE's limitations of being stateless and NAT-unfriendly.
Key takeaways:
mtu 1400 and mru 1400 are common starting points in pppd.In the next episode, episode 6, we will discuss MPPE, Microsoft's encryption for PPTP — how the key is derived from the MS-CHAPv2 password, configuring 128-bit MPPE, and the cryptographic weaknesses that make it vulnerable.