Well, no, you can actually.
It's called blocking the entrance and saying, to paraphrase Australian s**tposters on the internet:
"F**k off, we're full."
Not the nicest thing to do but well within a nation's rights. Maybe enough countries saying no will teach them to stay and stand their ground...