How are China & Russia ancient foes? Before the Cold War, the 2 hardly had any contact with each other. Rather, it was the Mongols who had a lot of interaction with both, but not of a nature that would bring Russia & China together.
China today has the same policies as Russia on Iran, Syria and North Korea: how are they not allies? In China's case, they have a lot more to gain by supporting their biggest trading partner - the US, than antagonizing us over these 3. In Russia's case, I understand their desperation - Iran and Syria are the only markets for their Soviet era weaponry, but in China's case, it's a lot broader.
As for Russia-China's border today, their only border is in the east, in Manchuria. Otherwise, Russia, Mongolia, China & Kazakhstan have a common point where their borders meet, ensuring that there's no border b/w Russia and China west of Mongolia. If you are referring to China's borders w/ the 'stans', China has a good reason for having them closed: they have a restive Uyghur population in Xinxiang, which has ties to Jihadi campaigns in the stans, particularly in Kyrgyzstan.
In case of India, few Indians notice these things when they come up in the news: people are a lot more interested in events within the country. India's reason here is legit - absense this, they'd have Jihadis cross the borders into India via Kashmir, and would have little control on intercepting them