Who owns land?
In general, the question of ownership is fairly simple. If you make something yourself, it's yours. If you give it or sell it to someone, it's his.
Land doesn't fit well into this system. No-one made it: it was just there. Furthermore, most available land in the world has been repeatedly taken by force since it was first discovered, and can thus be regarded as stolen property. There is little land in the world to which anyone has a sound moral claim.
The real-world situation
Traditionally, governments have acquired land mainly by conquest; occasionally by purchase or barter; very occasionally by pure discovery (Madeira was uninhabited when the Portuguese discovered it). The normal practice of acquisition by conquest follows from the absence of any effective international law, and has the following implications:
Obviously this way of carrying on is neither moral nor economically efficient, but it's what we're stuck with until we get an effective system of international law: which means not only an agreed body of law but some way of enforcing it on all governments. It's not yet clear how that can be achieved.
At present, arguments about land ownership are rather futile, because there's no internationally agreed legal basis for the concept, and in practice ownership is still achieved and maintained by military force.
The ideal situation
Clearly, in a hypothetical law-abiding world, land shouldn't be acquired by military conquest.
Somewhat less clearly, I don't think there should be any attempt to right the wrongs of the past, because the wrongs of the past are so many and so complicated, and extend so far back in time, that it would be an impossible problem to untangle them. Any attempt to do so would probably create more injustice than justice for living people. Furthermore, I think retroactive law is not normally considered a good idea.
However, to attempt to fix the present national boundaries in place for all time would be undesirable and unsuccessful. So there must be agreed and peaceful methods for land to pass from one country to another and for countries to split and merge. This is not a simple matter because there are violent differences of opinion in the world about who should make such decisions.
I believe that those decisions should be made by the people most directly affected. In other words, in effect, I believe that land should be owned and its national allegiance decided by people and not by governments. But I'm not sure what the exact rules should be.
In the very long run, I like to think that governments will cease to exist, land will be owned only by companies and individuals, and its national allegiance may be of little or no importance. But I doubt that any of us will be there to see it happen.