I'm looking in to starting my own hosting company; even if I'm only paid in experience.
At first, I thought I'd create shell scripts to automate the creation of OpenVZ containers. But then I realized I'd also need custom IpTables rules set for each container, and play with DNAT/SNAT to give each container access to the outside world.
However, that would mean each container would have to operate and run services over un-conventional port numbers. How is it that a hosting provider can have a single public IP address for a multitude of containers, and all of them can access a service--like ssh for example--over port 22?
More so, the IPtables rules would have to be created statically. What is someone logged in, and wanted to run their own service? How would they typically account for that?
I can only assume I'm missing something crucial to understanding the big picture.