Enables or disables main system ports and sets the port numbers.