The war in Ukraine needs "concessions on both sides" if it is to come to an end, Nigel Farage has said.