Korea, Vietnam, Afghanistan, Iraq, Iran, Yemen
Korea has a border with China which allowed soldiers and material to flow to N. Korea. Short of a war with China, N. Korea couldn’t be defeated in the Korean War.
Vietnam has a border with China; if the North had needed it, it might have received support from China. Vietnam has a more significant border with Laos. The Ho Chi Minh trail through Laos allowed N. Vietnam to support fighters in the south. Short of invasion of N. Vietnam, an independent S. Vietnam was doomed.
Afghanistan has borders with Pakistan, Iran, and former Soviet Republics to the North. Support for the Taliban from Pakistan was important for its success. American support for the Afghan Govt. came via a long road thru Pakistan. Had it been necessary, support for pro-Russian factions might have come from the north.
Iraq has borders with Syria, Turkey, Jordan, Kuwait and Iran. The American invasion was marshaled in Kuwait in part because Turkey was uncooperative. Iran supported the Shiite resistance and eventually came to dominate the government there.
Iran has borders with Afghanistan, Iraq and former Soviet Republics to the North. It is unlikely that an American invasion of Iran could be staged in Iraq or Afghanistan; it would likely have to come from the sea. As much support for Iran could come overland from Russia as Putin wished to provide.
Yemen has borders only with Saudi Arabia and Oman. How Iran supports the Yemeni insurgents (if it does) is unclear to me. If it can’t be by land, it must be by air or by sea.