Networking Noob here in some dire need for help!
Say I have only one public IP (let's say 54.0.0.1
) I want to use and several servers in a domain locally.
I have created and registered a domain example.com
.
Now I would like to have one server with the public IP 54.0.0.1
that administers the traffic coming in from people entering example.com
into their browser, and redirects the traffic to different servers in the local network, depending what subdomain they entered.
E.g. if someone types shop.example.com the DNS recognizes example.com, resolves the request to 54.0.0.1
at which point the server redirects the traffic to the shop server with the address 172.0.0.3
in the same network as the Public Server but with no direct internet access.
And then if someone enters contact.example.com
they get redirected to a 3rd server with the local address 172.0.0.4
etc.
Is this scenario even possible with only one Public IP? And if yes, any tips on how to accomplish this in Amazon Webservice would be appreciated. I have informed myself about NAT-Gateways, Proxys and DNS but I can't seem to put it all together.