We study the three-dimensional Kasteleyn transition in both nearest neighbours and dipolar spin ice models using an algorithm that conserves the number of excitations. We first limit the interactions range to nearest neighbours to test the method in the presence of a field applied along [Formula: see text], and then focus on the dipolar spin ice model. The effect of dipolar interactions, which is known to be greatly self screened at zero field, is particularly strong near full polarization. It shifts the Kasteleyn transition to lower temperatures, which decreases ≈0.4 K for the parameters corresponding to the best known spin ice materials, [Formula: see text] and [Formula: see text]. This shift implies effective dipolar fields as big as 0.05 T opposing the applied field, and thus favouring the creation of 'strings' of reversed spins. We compare the reduction in the transition temperature with results in previous experiments, and study the phenomenon quantitatively using a simple molecular field approach. Finally, we relate the presence of the effective residual field to the appearance of string-ordered phases at low fields and temperatures, and we check numerically that for fields applied along [Formula: see text] there are only three different stable phases at zero temperature.