Add ip option to mongodb code