Vietnam was the US standing to a foreign power trying to take over. It is not a war on the nation, but a war on an aggressive faction. Same for Korea really.
The Vietnamese fought for freedom from colonialism. The got that from the French, almost, until the US intervened. The only aggressive factions were the French and the US.
Korea was different, and also backed by the UN. But even there things aren't as clear cut as you imply. North Korea had yet to turn into the Kim-led hard core Stalinist regime.