We study hydrodynamic slowing down of a particle moving in a temperature gradient perpendicular to a wall. At distances much smaller than the particle radius, h≪a, the lubrication approximation leads to the reduced velocity u/u_{0}=3(h/a)[ln(a/h)-9/4], where u_{0} is the velocity in the bulk. With Brenner's result for confined diffusion, we find that the trapping efficiency, or effective Soret coefficient, increases logarithmically as the particle gets very close to the wall. Our results provide a quantitative explanation for the recently observed enhancement of thermophoretic trapping at short distances. Our discussion of parallel and perpendicular thermophoresis in a capillary reveals a good agreement with experiments on charged polystyrene particles, and sheds some light on a controversy concerning the size dependence and the nonequilibrium nature of the Soret effect.