Configuring agent communication for a non-default port