Type of gun
The difficulties of "over the shoulder shooting" have been well described.
I think a far better solution is to have a rearward facing blunderbus fixed to the cockpit coaming with a string linking the trigger to the cockpit door - what could be simpler and or more effective?
I am sure that suitable weapons could be unearthed from military museums etc. Just sharpen the flint and they will be ready to go. Instead of carrying guns pilots would only need to carry a little black powder to refil the priming pan every day or so - it could be part of the copilot's preflight checks.