The correct answer is
by passing the Espionage and Sedition Acts
These acts silenced opposition because they were conceived in such manner that criticizing your government for its war involvement could be considered treason or espionage for the enemy and so you could go to jail. People didn't want this so they kept their opposition to themselves.