GUANGZHOU, China — One person was turned away by hotel after hotel after he showed his ID card. Another was expelled by fearful local villagers. A third found his most sensitive personal information leaked online after registering with the authorities.

These outcasts are from Wuhan, the capital of Hubei Province, which is at the center of a rapidly spreading viral outbreak that has killed more than 420 people in China and sent fear rippling around the world. They are pariahs in China, among the millions unable to go home and feared as potential carriers of the mysterious coronavirus.

All across the country, despite China’s vast surveillance network with its facial recognition systems and high-end cameras that is increasingly used to track its 1.4 billion people, the government has turned to familiar authoritarian techniques — like setting up dragnets and asking neighbors to inform on one another — as it tries to contain the outbreak.

It took the authorities about five days to contact Harmo Tang, a college student studying in Wuhan, after he returned to his hometown, Linhai, in eastern Zhejiang Province. Mr. Tang said he had already been under self-imposed isolation when local officials asked for his personal information, including name, address, phone number, identity card number and the date he returned from Wuhan. Within days, the information began to spread online, along with a list of others who returned to Linhai from Wuhan.