Modified from a bomber's tail gun?! What was the point of expending fuel to launch such a heavy thing into orbit? The Soviet space program lost its mind after the US beat them to the Moon.
There is a gun onboard the ISS.
A gun port, but not an actual gun, AFAIK.
Soyuz crafts contain a survival kit that includes a handgun, but it's not easily accessible until landing.