DBack1321You can't really blame a single nation. Many areas of that part of the world are lawless and places that aren't can largely be bought off. The only way to prevent stuff like this is completely shut down borders, which is impossible. Even then, with modern technology, you can recruit and train people extremly easily with out ever setting foot outside of your living room.
You can blame Turkey for the ease at which they allow ISIS members in and out of their country. It was a well documented fact that they did nothing to the ISIS members moving in and out of the country for treatment, sale of weapons, and sale of oil. I am not saying they are responsible for this attack, but they certainly were foolish early on with ISIS due to their hatred of the Kurds.
But yes, to completely stop this, you would need a police state. Not just closed borders, but monitored electronics, government censorship, etc.
Apparently the police raid is over