You must be a UK or other European Economic Area national, a Commonwealth citizen, a British Protected Person or a citizen of British Dependent Territories.
The Civil Service Recruitment Gateway provides further details on nationality requirements.