I've got a dynamic IP from my ISP so I'm using a free DynDNS service to redirect traffic to my server. I just bought a Raspberry Pi and would like to reach it from the outside too, preferrably with another subdomain. Can I use multiple CNAME records pointing at the DynDNS domain and then put a VHOSTS file in the servers to direct traffic to the right server depending on the subdomain called?
Or is it the DynDNS subdomain that calls the server rather than my own subdomain, i.e. showing the same id to the server independent of the subdomain called by the user? I'd rather not use different ports for different servers handling the same protocol.
Today:
server.example.com -> CNAME -> server.dyndns.com -> 1.2.3.4 -> home server
Future:
server.example.com -> CNAME -> server.dyndns.com -> 1.2.3.4 -> home server
rpi.example.com -> CNAME -> server.dyndns.com -> 1.2.3.4 -> raspberry pi