Over the years, I have consulted with many people who were disqualified from possessing a gun due to a criminal conviction, a protective order, etc. Some of those people have told me that they knew themselves to be prohibited, but tried to buy a gun anyway to see what would happen. Doing so is a very bad idea.
The issues of what crimes should bar a person from gun ownership, how long such a ban on gun ownership should last, and when a person should be able to have their gun rights restored are often hotly debated.
In Illinois, 720 ILCS 5/24-1.1 makes it a crime for a person who has been convicted of a felony in Illinois or another state to possess a firearm or ammunition: