Allow weapon possession only to people with a real weapong training : police/army active/veteran (honorable veterans, obviously) and sport shooter/hunter with X years of membership on a legally certified club/hunting federation.
Automatic weapons are unallowed to civilan, except specific professions.
Possession permit is tied with rules : being having a gun safe, full registration of every gun owned and others I may not think about.
For guns allready in circulation : a buyback period of 1-2 years where every certified people/association and the state can buy the weapons in circulation.
And after that and HEAVY PUNISHEMENT for any illegal possession (really heavy, from 30-50k to a 2-5 years jail depending on how clean your record is, specific punishement is up to the judge. Obviously won't punish the same 83yr granpa who forgot he had a hunting rifle and a 27yr who still has a gun for "reasons")
You may have a "grace" period after the buyout one, where every people caught with a gun would simply see their guns ceased, their home searched, but nothing more, no arrest, no writing on their records.
And carry for civilan is 100% illegal, except most specific situation. Some civil profession need a gun bank security guards, bodyguards, etc. will need torough examination and proof of knowledgeable usage. Illegal carry is automatic 5+ years jail time.