Realistic effective interactions for halo nuclei