added support for dynamically allocated port in port for tunneling