Sane solution to automatic port allocation.