Not exactly legal either.
Fine—hire a lawyer to argue with any armed guards you see at the checkpoint.