The dipole anisotropy of ultra-high energy cosmic rays above 8 EeV detected by the Pierre Auger Observatory indicates an extragalactic origin of these particles. However, both the direction and the amplitude of the dipole of cosmic rays outside our Galaxy might be different than the one observed on Earth due to the effects of the Galactic magnetic field. We present an analysis of effects of the Galactic magnetic field on arrival directions of cosmic rays using numerical simulations within the CRpropa3 package. Jansson-Farrar model of the Galactic magnetic field is used to propagate particles inside the Galaxy. We investigate possible directions and amplitudes of the dipole outside the Galaxy for different mass composition scenarios so that the final direction and amplitude on Earth is compatible with the measured dipole.