use symfony IP method. cc @cmfcmf