Actually r4di0fly3r's motion-tracking turret probably won't keep intruders out. But it will startle them. And it will probably keep cats and dogs out from sheer terror of "OH GOD WHAT IS THAT."
You can download the software for your PC or Mac, or just run it off of the deviantART page since that didn't seem to work for me.
Interactive Portal Turret [deviantART via Reddit]