Try if request().remoteAddress() works.