In theory this is what the second amendment is for. Police raid you house, pump em with bullets. In practice this only works as deterrence -- you always hear of cops confronting drug dealers etc calmly in public places, where they are away from their trove of weapons, whereas no-knock raids and home invasions are for the poors.