Normal bombers didnt had range to attack Gibraltar. Only Piaggios 108(only 24 made), SM 81(obsolete) and i think they tried with Cant Z1007.
For Decima Flotilla Special Forces:
[*]
September 24, 1940: The Italian submarine
Sciré, commanded by Commander
Junio Valerio Borghese, departs La Spezia carrying three manned torpedoes and four crews, for a planned attack on the British naval base at
Gibraltar. However, this operation is canceled as the British fleet leaves the harbor before the submarine arrives.
[*]
September 10, 1941: The
Sciré departs La Spezia carrying three manned torpedoes. At Cadiz, Spain, it secretly loads eight crewmen for them. At Gibraltar, the manned torpedoes sink three ships: the
tankers Denbydale and
Fiona Shell and the
cargo ship Durham. All six crewmen swim to Spain and return safely to Italy, where they are decorated, as are the crew of the
Sciré. Borghese is promoted to the rank of captain and is confirmed as the unit commander.
[*]July 1942: Italian frogmen set up in a secret base in the Italian tanker
Olterra which was
interned in
Algeciras near Gibraltar. All materials had to be moved secretly through Spain and this limited operations.
July 13, 1942: Twelve Italian frogmen swam from the
Olterra into Gibraltar harbor and set explosives, and then returned safely. They sank four ships.
[*]
December 17, 1942: Six Italians on three torpedoes left the
Olterra to attack the three British warships
HMS Nelson,
HMS Formidable, and
HMS Furious in Gibraltar. A British patrol boat killed one torpedo's crew (Lt. Visintini and Petty Officer Magro) with a
depth charge. Their bodies were recovered, and their
swimfins were taken and used by two of Gibraltar's British guard divers (who dived with
Davis Escape Sets and (up to here)
breast stroke swimming and no fins) (
Sydney Knowles and Commander
Lionel Crabb). Another British patrol boat spotted another torpedo, and chased and shot at it and captured its two crewmen. The remaining torpedo returned to the
Olterra without its rear rider.
May 8, 1943: Three Italian manned torpedoes left the tanker
Olterra to attack Gibraltar in bad weather and sank three British ships. All returned safely to the
Olterra.
[*]
August 3, 1943: In the evening, three Italian manned torpedoes left the
Olterra to attack Gibraltar and sank three ships and returned to the
Olterra, but one of their men was captured.
[*]
September 8, 1943: The new Badoglio government of Italy signed an armistice with the Allies and changed sides. The
Olterra was towed into Gibraltar, and the British found what had happened in it.
October 2, 1943: An attack on Gibraltar using the new and larger replacement for the SLC (the
Siluro San Bartolomeo type) is called off due to the Italian surrender.
Great Circle Map Website shows 745nm between Ajaccio(Corsica)-Gibraltar
http://gc.kls2.com/cgi-bin/gc?PATH=GIB-AJA going over Spain. Which means to be completely safe a range of over 3000km is needed.