I know hand guns are banned in Chicago buy can you have a shot gun or rifle for home defense in the city?

If so are there any restrictions such as barrel length?