Most municipalities have ordinances about discharging firearms inside their city limits. If yours does, I would imagine you'll find an officer at your door sooner or later.
Plenty of indoor ranges are inside of city limits, so it's obviously doable, he's asking if it's possible for a private individual to get permission.
I know you would have a ventilation problem in a basement. I am a retired officer and I had to shoot in the winter time on a range that was under the police station. It had to have the ventilation pull the smoke down range so it didn't come back in your face and you inhale it. The sound would be another problem like some else said. I feel even a 22 would be a sound problem and the neighbors would call the police for sure.