No, he never got that close to the city itself.
Hannibal brought a knife to attack Rome. This is from a love story.
Attack the city of Rome.
Hannibal Barca.
Hannibal
Who was hannibal
Hannibal did not attempt to attack the City of Rome - he defeated the Roman army three times in Italy. The elephants he brought from Spain mostly died en route and so were not used in the battles.
Hannibal.
Hannibal attempted to isolate Rome. He did not have a siege train to attack the city itself, but organised other cities in Italy to join him, attempted to alienate Roman allies who had been poorly treated by Rome, and defeated any force which Rome sent out against him. Rome had no direct counter to this, but reversed the situation by sending a force to North Africa to threaten Carthage and force Hannibal's withdrawal to there to defend his home base.
Rome itself was secure as Hannibal did not have a siege train to capture it. it became a contest to keeping its allies from going over to Hannibal and so maintaining a source of food and soldiers to replace the losses. Rome was able to maintain this, Hannibal was frustrated and Rome launched an attack on the Carthaginian homeland which resulted in his recall from Italy to defend it. Strategy - Hannibal attacking Rome at its heartland, responded to by a similar attack by Rome at his heartland.
Hannibal Barca.
Hannibal
Hannibal lead the Carthaginian attack against Rome in 218BC.