Alllow remoteport handling

Also rename local_port input to port