This question is related to this one but with a twist. I have many LANs that I manage and would like to have DNS entries for the machines in those LANs. For example, let's assume:
LAN A - is 192.168.128.X (with external IP 18.104.22.168) snoopy is 192.168.128.2 router sends port 80 on 22.214.171.124 to 192.168.128.2 LAN B - is 192.168.130.x (with external IP 126.96.36.199) charlie is 192.168.130.4 router sends port 80 on 188.8.131.52 to 192.168.130.4
The DNS would be for
mydomain.com (outside all LANs) and I would like to register
charlie.mydomain.com. Whenever I'm in LAN A the DNS for
snoopy.mydomain.com would resolve to
192.168.128.2 and whenever I'm not it would resolve to
184.108.40.206. Same for LAN B.
The problem is that the DNS server will be outside all LANs and yet it must know if the request is coming from inside any of the LANs.