Borders cannot be altered by war anymore. The acquisition of territory by war is absolutely forbidden in modern international law. Territory can only be exchanged by treaty. This is why Israel cannot lawfully annex the 1967 territories it won by conquest absent a bilateral agreement with the Palestinians.
As well, war is not one of the ways the UN Charter prescribes for settling boundary disputes.