Iran, Turkmenistan and Kazakhstan celebrated being connected by a new railway line in December last year. The connection avoids Uzbekistan, where cross border train travel (at least for individuals) hasn't been possible for years. This means that, just maybe, with Turkey completing the tunnel under the Bosphorus this year, it will be possible to circumvent the Black and Caspian seas by train without every leaving a train or train station. Well, or the train ferry on lake Van in Turkey.
Sadly, it's not possible to circumvent either sea by train, individually, as there are no tracks crossing the Caucasus.
So, here's how to do it. Just because we have to start somewhere, let's start in Istanbul and go clockwise.
A. Istanbul to Moscow
1. Istanbul Sirkeci to Budapest Keleti. I took this train in the other direction in 2006. Back then, the connection was direct. Now, according to bahn.de (link to the website, their search results expire), it's a 35 hour journey and requires three changes, in Kapikule, Plovdiv and Sofia.
2. Budapest Keleti to Moskva Belorusskaja. There several connections for this journey. The fastest takes about 28 hours and only requires two changes, in Breclav and in Warszawa Wschodnia. This connection will go through Belorus, where the longer journeys actually go through Ukraine, which currently probably isn't the best of ideas, anyway.
Back in 1999, I traveled the Warsaw to Moscow connection.
B. Moscow to Tehran
This stretch involves the newly constructed Uzen (Kazakhstan) – Kyzylgaya (Turkmenistan) – Bereket (Turkmenistan) – Etrek (Turkmenistan) – Gorgan (Iran) line. However, whether this new line will also be open for people as opposed to only for goods is not yet really clear. It does seem that Kazakhstan Temir Zholy, Kazakhstan national railway company, does not provide scheduled services between Aktau and Uzen, a distance of some 120km.
Nor are there any timetables available, currently, for the newly constructed line.
3. Moscow (Kasanskaja or Kurskaja) to Aktau. Connections take about 60 to 85 hours, depending on Moscow station you start at. From Belorusskaja, the fastest connection takes about 70 hours and requires two changes. The fastest connection starts elsewhere but require three changes.
4. Aktau to Uzen. Perhaps hop a freight train, as it seems there's currently no scheduled service between the two.
5. Uzen to Gorgan. This is the newly finished connection between Kazakhstan and Iran. For this connection, too, it seems there are currently no scheduled services. Perhaps you have to hitch a ride on a freight train here as well.
6. Gorgan to Tehran. An 11 hour connection that runs about twice a day.
C. Tehran to Istanbul
Turkey is introducing high speed trains, meaning this journey has shortened considerably.
7. Tehran to Ankara. This train used to go all the way Istanbul (which is the one I took in 2006), but now takes some 36 hours to travel as far as Ankara, which includes a switch to a ferry on lake Van and then on to another train on the other side of the lake.
8. Ankara to Istanbul. Currently, high speed trains cover the distance between Ankara and Istanbul Pendik (on the Asian side) in about 4 hours. This year, the Bosphorus tunnel is expected to open, which should see the high speed trains go all the way to the European side of Istanbul in a mere three hours.
Awesome. Time to pack the bags.
The existing alternative route
It was of course already possible to circumvent the two seas in a more roundabout manner. However, this involves going through Uzbekistan, which hasn't allowed people to travel across borders by train for a while now.
Below what this would involve, replacing section B, above.
a. Moscow to Tashkent. Amazingly, there's a 65 hour direct connection between these two cities.
b. Tashkent to Bokhara. Takes about 6 hours. Here, you'd have to cross the border into Uzbekistan, probably by car, as the distance is a bit too much to walk. You would have to make your way to Turkmenabad.
c. Turkmenabad to Ashgabat. Both in Turkmenistan, this trip takes about 15 hours.
d. Ashgabat to Serakhs. Currently, it appears, for freight only. Which is a pity, as Serakhs, in Uzbekistan, and Sarakhs, in Iran, are within walking distance of each other. And there is a railway connecting the two cities.
e. Sarakhs to Mashhad. A few trains a day take about three hours to cover the distance between the two cities.
f. Mashhad to Tehran. Several trains a day connect these two cities, taking between 8 and 12 hours.
So there you have it.