I don't see the question as simple as the OP stated. We already have a huge mass of confusing laws surrounding firearms and the context of the question isn't clearly laid out. Are we assuming the current states of both Fed and State laws? Are we assuming future changes? And what level of details are you considering.
Let's start with, is there anyone that should not have access to firearm. I would say yes. The mentally ill and dangerous, and those who have shown though their violent actions that they can not be trusted with a firearm.
Now you can say "2a" or if your not locked up you should be able to have a gun. And there is some logic in this. But historically we have never permanently confined everyone who should not have a gun. Way back, in the days surrounding the creation of our Constitution, communities were smaller and people more reasonable, and everyone knew who the local crazies and violent people were, and they just didn't give them guns. We didn't need laws to do this, this is not the situation today, and this difference is key.
So the days of self regulation are gone and we have to come up with laws that objectively account for ever situation, this is fundamentally impossible since exact situations are infinite, so the laws will be flawed and we need to hope and try to do the best we can.
So for the sake of discussion lets say there are people that should not have guns. How do we define them. You can say we just keep them locked up but that just shifts the discussion to what is the criteria for keeping people locked up so they can't get a gun. You can think of it either way, but we still need to define the criteria. These are mine;
1. Those properly adjudicated a danger to the community due to mental illness. This requires a process, with expert witnesses, and most importantly, the individual being allowed a defence.
2. Those that through their own actions show that they are a danger to the community. The easiest way to define this would be those who have been convicted of a significant violent act, or multiple lesser acts of violence. Perhaps for lesser acts it's just X number years PP, but after repeated or significant acts it is permanent PP.
Now you may say these people should just be locked up. I just don't see it as practical to lock up everyone who is convicted of A&B when it may have been a isolated incident. Instead a year with no guns to see if this is a start of a pattern or not. The term or permanent MUST be clearly laid out in the law, no discretion, everyone knows the consequences.
Before I go further lets address the "they will just get guns illegally", this is obviously true. But as an argument against a law it just isn't absolute, unless your position is that all laws and government should be abolished. Because, after all, none of the laws stop anyone from breaking them, and neither government or law can exist without the other. Laws establish lines of what is legally right and what is legally wrong, and provides deturents and punishments. And it's a fine line as to whether a law is helpful or hurtful, but that's another discussion. Back to the assumptions that laws have meaning.
So we have our criteria. And we live in a modern age where nobody knows everyone. So the local gun shop can't say "Hi crazy Joe from Eastnowhere, no I won't sell you a gun, because you are crazy" Instead, they need a tool to make sure the person doesn't fit #1 or #2. Now this could be called many things, but it is essentially a background check similar to what is required for a new gun sale.
Now I can see a system where this can be done for both private and commercial sales, can be done without creatings a list of gun ownership, without exposing this information to the general public. It wouldn't be perfect, nothing ever is. But it would require such an overhaul of laws and attitudes (both sides), that I doubt it could ever happen.
Let the flaming begin.
And for those that say "2a, any restriction is infringement, no exceptions" let's be clear, you are OK with the dangerously mentally ill having guns, and those who have repeatedly been convicted of serious violent crimes should have legal access to guns. Don't be a hypocrite, come out and say it.