We present an ideal MHD theory to describe for the first time the “magnetic barrier” (or “depletion layer”) of that class of interplanetary ejecta called magnetic clouds. By “magnetic barrier” we mean that region of the sheath where the magnetic pressure is comparable to, or larger than, the gas pressure and where, therefore, the effects of the magnetic field on the flow are substantial. We model magnetic clouds as cylindrical flux ropes. We consider three cases: one steady state and two nonsteady situations. The two nonsteady situations correspond to (1) a self‐similarly expanding magnetic cloud, and (2) to a nonexpanding magnetic cloud which has a net bulk motion with respect to the medium at infinity. In all cases the cloud drives an interplanetary shock ahead of it. We describe an algorithm to integrate the MHD equations in which the behavior of the sum of the magnetic and plasma pressure is prescribed. We assume here that the sum of the magnetic and plasma pressure is constant along any line normal to the magnetic cloud boundary. We find that in steady state the cloud boundary cannot be a tangential discontinuity, that is, a finite magnetic barrier thickness can only be obtained with a reconnecting cloud boundary. In general, the magnetic barriers of magnetic clouds are thick, that is, they are a substantial fraction of the cloud's sheath. In steady state and the nonsteady case (situation 2, above), their width depends inversely on the Alfvén Mach number. The non‐steady state (situation 1) has similarities with the problem of solar wind flow around the terrestrial magnetosphere. In particular, the barrier thickness in this case is proportional to the inverse square of the Alfvén Mach number. This work should be useful in the interpretation of data from the sheath region ahead of magnetic clouds driving interplanetary shocks.