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 188.8.131.52) snoopy is 192.168.128.2 router sends port 80 on 184.108.40.206 to 192.168.128.2 LAN B - is 192.168.130.x (with external IP 220.127.116.11) charlie is 192.168.130.4 router sends port 80 on 18.104.22.168 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
22.214.171.124. 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.