Multipath TCP (MPTCP) with Socat

This document is valid for Linux only.

Linux syscalls/API provide a way to establish MPTCP connections using TCP based programs with only minimal modifications: It is sufficient to replace the IPPROTO_TCP (6) value for the third (protocol) parameter of the socket() system call with IPPROTO_MPTCP (262).

Socat provides the protocol address option that allows to set this parameter to an arbitrary int value. Thus, start a simple MPTCP echo server:

WARNING: do not use an MPTCP listener when your computer is exposed to the internet (or any other network with untrusted devices) and not patched against CVE-2026-98432 !

socat -d -d TCP-L:1234,protocol=262,fork PIPE

Connect with a client:

socat -d -d STDIO TCP:<your-server>:1234,protocol=262

For errors, malfunction, verification, and configuration of MPTCP search the Internet or ask your favorite AI.

Copyright: Gerhard Rieger 2026
License: GNU Free Documentation License (FDL)