Mordor was probably created during the War of Wrath
This is a footnote from one of Tolkien's late texts:
[Orodruin and its eruptions] were a relic of the devastating works of Melkor in the long First Age.
The History of Middle-Earth Volume 12: The Peoples of Middle-earth, note 14, p. 390
There are no other texts about the creation of Mordor, but we can piece its history from various sources with a few educated guesses.
When exactly?
The First Age is longer than the two other. Its exact length is unclear because Tolkien never really settled on a date, but we know it cannot start before the Elves are born and that it ends after the War of Wrath, when Morgoth is captured and removed from Arda.
During the whole First Age, the area where Mordor is situated is underwater. The water drains during the War of Wrath, which ended the First age. Therefore, Mordor must have been a side-effect of the war.
Karen Wynn Fonstad, in The Atlas of Middle-Earth says this:
Although no text supports my conclusions, Mordor might have appeared as part of a worldwide upheaval during the destruction of the Iron Mountains [during the War of Wrath] in the area where the Great Gulf partially drained the Inland Sea - the volcanic processes in the formation of that land would allow relatively rapid mountain-building processes.
The Atlas of Middle-Earth, p. 37
Discrepancies
The quote above mentions "devastating works". I would not have called the War of Wrath a "work" of Melkor. It was more of an invasion by the Valar and a brutal war which saw the Northwestern part of Middle-Earth destroyed. I also find "in the long First Age" dubious as the War of Wrath marks the end of the First Age.
Side note: natural or not?
Note that asking whether something is "natural" or not is somewhat misleading. The major features of Arda were created, directly through intervention or indirectly through wars, by the Valar. They built the world with their hands.
History of Mordor
In the following, I go through the history of the region where Mordor is situated to try to figure out the period during which it is underwater.
Early Arda
Early in Arda's history, the Valar built two lamps and put them on pillars:
Then Varda filled the lamps and Manwë hallowed them, and the Valar set them upon high pillars, more lofty far than are any mountains of the later days. One lamp they raised near to the north of Middle-earth, and it was named Illuin; and the other was raised in the south, and it was named Ormal; and the light of the Lamps of the Valar flowed out over the Earth, so that all was lit as it were in a changeless day.
ibid.
Melkor then destroyed the pillars, creating two inland seas: the Sea of Helcar and the Sea of Ringol. The shape of the lands was also changed:
In the overthrow of the mighty pillars lands were broken and
seas arose in tumult; and when the lamps were spilled destroying flame was poured out over the Earth. And the shape of Arda and the symmetry of its waters and its lands was marred in that time, so that the first designs of the Valar were never after restored.
ibid., p. 29
At this point, the location of Mordor is underwater, covered by the Sea of Helcar. The First Age hasn't begun yet.
The Second Great Battle
After the Valar discover the Elves, they fight Melkor yet again and break the lands even more. Mountains are raised and seas are created. The western region of the Sea of Helcar sees many permanent features that will be present in the Third Age, such as the Anduin (the Great River) and Greenwood the Great (from the Hobbit). But Mordor is still underwater.
The western region of the Sea of Helcar. In the Third Age, this area would be called Gondor. Mordor is underwater.
At this point, the First Age has begun.
The War of Wrath
At the end of the First Age, the Valar fight their final war on Middle-Earth, capture Melkor and thrust him out of the world. This war is devastating to Middle-Earth: the entire northwestern region is destroyed. A new gulf in the south drains the Sea of Helcar, finally revealing Mordor. The remnants of the Sea of Helcar in Mordor is renamed the Sea of Nurnen.
The same region as above, but with the Sea of Helcar gone. Mordor is now revealed.
The two images above side by side. On the left, the Sea of Helcar before the War of Wrath. On the right, the same region after the War of Wrath, with Mordor uncovered.
After the Sea of Helcar is drained, Mordor is present. The only possibility then is that Mordor's mountain chain and volcanoes were part of the reshaping that was caused by the fighting.
Shape
Mordor's boxy shape may look unnatural, but Tolkien said it corresponded to a volcanic arc. As a comparison, here is a map of the Lesser Antilles, in the Caribbean:
Map of the Caribbean - Lesser Antilles, from user Uniongreen113
Now, these are volcanic islands, but they clearly form a Mordor-like pattern. Since there is no water around Mordor, all the mountains between the volcanoes are visible. Volcanic arcs are typically rounded, with an open side, much like Mordor.
Weakness in the East
It is true that an army could walk around the mountains and enter Mordor from the East. This would be unlikely for various reasons.
In the North are lands that would be very difficult to pass:
The northern lands were swept by bitter eastern winds carrying fumes from the slag mounds and from the increasingly active Mt. Doom. The climate became arid, and the landscape was slowly denuded of its growing things. As the lands became more barren, the little rain that fell ran off the surface of the nearby highlands and more and more water into the bracken swamps [of the Dead Marshes.]
The Atlas of Middle-Earth, p. 90
In the South are Near Harad and Khand. Near Harad is probably a desert, based on what Gollum says:
And further still there are more lands, they say, but the Yellow Face is very hot there, and there are seldom any clouds, and the men are fierce and
have dark faces.
The Lord of the Rings: The Two Towers, The Black Gate is Closed, p. 206
There is little to no information on the geography of Khand.
Men from both Near Harad and Khand were once allied with the Wainriders and attacked Gondor during the Second Age:
Many of the Wainriders now passed south of Mordor and made alliance with men of Khand and of Near Harad; and in this great assault from north and south, Gondor came near to destruction.
The Lord of the Rings: The Return of the King, Appendices A: Annals of the Kings and Rulers, p. 402
Finally, in the East is Rhûn, where the Easterlings are. They are allied with Sauron and are part of Sauron's army during the battle at the Black Gate in The Lord of the Rings. Easterlings are descendants of an early group of Men that proved to be traitors during the First Age: they attacked Maedhros during Nirnaeth Arnoediad, they invaded Hithlum after Turin is sent away as a boy, etc.
So, could an army walk all the way around and attack Mordor from the East? Probably not: it would be passing through arid, deserted and hostile regions with no chance of finding food or water.
As for whether Mordor has ever been attacked from the East, the answer is no. The Easterlings and Mordor have been allied since Sauron's occupation and nobody has ever gone around the mountains to attack.