The 'Iron Curtain' Active Protection System is mounted to the roof and hood of a suitable vehicle. When activated by an approaching projectile, the Iron Curtain takes it out. Remarkable DARPA video below.
(DARPA's 'Iron Curtain' Active Protection System)
DARPA in November 2009 awarded Mustang Technologies a contract to integrate Iron Curtain with its Crosshairs counter-shooter system for tests on an MRAP. Cued by the corner-mounted Crosshairs' radar, an optical sensor classifies the incoming threat and selects the aimpoint. When the RPG is just inches from the vehicle, the roof-mounted countermeasure fires straight down, deflagrating the warhead before it can detonate.
Fans of Russian defense tech may recall the Arena Active Protection System (in Russian that's "активная система защиты" or "Арена"). It uses a Doppler radar to detect incoming warheads. Upon detection, a defensive rocket is fired that detonates near the inbound threat, destroying it before it hits the vehicle.
Fans of Israeli defense tech may recall the (in Hebrew מעיל רוח, lit. "Wind Coat"):
"The system has been integrated onto Israeli Merkava main battle tanks in the Israeli Army. The design includes an F/G band fire-control radar with four flat-panel antennas mounted on the vehicle, with a 360-degree field of view. When a weapon is fired at the vehicle, the internal computer uses the signal from the incoming weapon and calculates an approach vector. Once the incoming weapon is fully classified, the computers calculate the optimal time and angle to fire the neutralizers. The response comes from two rotating launchers installed on the sides of the vehicle. The launchers fire the neutralizing agents, which are usually small metal pellets like shotgun shot. The system is designed to have a very small kill zone, so as not to endanger troops adjacent to the protected vehicle."
A similar science-fictional system is in David Drake's "Hammer's Slammers" novels. The close-in defense system is triggered by hostile incoming "buzz-bombs" that target the tank you are in.