Some governments do exactly that where and when it is believed to be necessary. France, for instance, forbade people from travelling further than 100 km from home at one time.
In fact, we implemented local travel restrictions before closing and monitoring national borders (because nashion and bordeuh is fasciiiism maaaan!!)