This problem does indeed look insurmountable.
They continue to flood into Europe in uncontrollable numbers and most governments don't know what to do. There are exceptions, of course, in Eastern Europe where the governments have taken a hard line and refuse to let them in.
As we, and many other countries, seem unable to effectively control our borders, I believe the best defence would be deterrence. By this I mean primarily refusal of any help whatsoever unless the claimants can prove beyond doubt that they are, in fact, fleeing a war zone. No more 'lost passports' I suspect. It won't happen, of course.
Another possibility, however unbelievable, is that a neo-National Socialist Party might arise in Germany and win the support of the people. Perhaps not so unbelievable, actually, bearing in mind what is happening there. If this should happen, I can imagine immediate flight out of Germany by all of these people, just as happened with the Jews in the late 1930s. No prizes for guessing where they'd fly to, though.