Interesting..once CAN use synthetic food but that is costly and time consuming...not to mention that you have to have large quantites of various chemichals compounds.. and I doubt you can find all of them readily available on the Moon or Mars. All planets don't have the same composition..nor does the atmosphere (or lack thereof).
You could import the needed chemichals tough, probably from a friendly colony (assuming it has enough or at all)
That said my concern was about such a large population. Feeding millions that way is a big problem.
And one more thing...couldn't you just trash any moon colony from Earth? We can shoot lasers at the Moon with 1m precision today, hell in 300 years you could make a hole in a structure/dome without any problems.
Lasers obey the inverse square law. The yield of a laser dissipates to the square of the distance to the target, which means that you won't be delivering much energy to the Moon (the same goes for particle beams). Firing weapons at such ranges would be useless.
Also, attacking a colony, especially with the kind of weapons of mass destruction you'd need to pierce an armored colony dome, would be a serious war crime and political suicide. To take the colony, you would have to land troops on the surface, invade the colony, and physically occupy it. All the while they're fighting back with ships, plasma turrets, missiles, lasers, etc.
The Moon doesn't strike me as a good place to have a rebellious colony. Mars, the asteroid belt, and Jupiter would, however, be excellent locations, with lots of natural resources, a reasonable distance from Earth, and strategic importance.
Keep in mind that Earth itself would likely be fragmented, so there would be infighting among the Earth factions that would hamper their ability to take the colonies. It would kind of suck for for the US to launch a fleet against Mars and be intercepted by a Chinese fleet.
Also, keep in mind that space colonies will have to be largely self-sufficient at first because with the rocket technology available in the conceivable future, it will take an entire year to get to Mars!