The UK government is prepared to defend against threats after Iran declared British bases as targets, amid ongoing US-Iran tensions.