The Lancaster, like most British bombers of that period, was designed to have a ventral turret sighted with a polariscopic sight that was not up to the task and generally removed. The is is the turret https://eu-browse.startpage.com/av/...e3ad5e59b93adbd8ccbbd2c3e9200f21897377554d6fc and it was fitted to a number of Lancaster II's for some reason. The opening in the fuselage structure remained and was used to mount the H2S scanner subsequently which precluded fitting the turret when the German upward firing guns were know about. Aircraft without H2S did sometime have a hand operated gun there on an improvised mounting. An offical mounting was devised called the Preston Green https://eu-browse.startpage.com/av/...48618520760b7a51d42a5834688f675222d8163d9f72f The provision for the turret was also used for dropping parachutists from Whitley's and Stirling's.
This shows the Preston Green fitted to a Halifax. One otherr option was an add on to the H2S called Fishpond that showed aircraft below the bomber giving warning of a possible attack.
Apparently, the scope of the problem was recognized only very late. The RAF specialists may be able to answer this question better on the basis of original documents. But it is proven that a lot of night fighters achieved their kills almost exclusively with upward firing weapons.