Title XVII, Section 1702, of the Crime Control Act of 1990 (Public Law 101-647), the Gun-Free School Zones Act of 1990, makes it illegal for any individual to knowingly possess a firearm in a school zone, which encompasses a distance of 1,000 feet from school grounds.
Umm, US V. Lopez struck that “law” down.
https://en.wikipedia.org/wiki/United_States_v._Lopez
Some states have passed similar laws.