In this paper, a set of two-dimensional simulations for resistive magnetohydrodynamical equations are performed to investigate the interaction between a solar-wind filament and the magnetosphere when the filament is obliquely oriented with respect to the direction of the magnetospheric field. Detailed pictures for the interaction are given. For typical parameters near the magnetopause, a filament with a sufficiently large excess flow velocity will penetrate into the magnetosphere, and will then be repelled back towards the magnetopause by the highly compressed and bent magnetospheric field. Finally, the filament will be smeared along the magnetospheric field near the magnetopause. When the angle is small, the filament will penetrate deeply into the magnetosphere before it is repelled back. Therefore there is a maximum depth a penetrated filament may reach into the magnetosphere. The effect of spontaneous reconnections behind a penetrating filament on the penetration appears to be negligible.