Allow to have different port for internal and public endpoint

Hi,

This pull request allow to have different port for internal and public endpoint


Cheers