Score:-1

Access Internal IP by Sub-domains

cn flag

I'm trying to access applications with internal IPs via subdomains from outside.

From my research, when it comes to http running apache, it seems feasible with a DNS server inside.

How to point sub-domains to different local IP

However, what if the application is other than the website without using apache?

what I'm trying to do is

if port 8000 requested on abc.mydomain.com, it points to 192.168.0.1:8000

if port 8000 requested on def.mydomain.com, it points to 192.168.0.2:8000

I have been using public IP addresses instead of the internal address and it has been working fine however now I can't afford the public IP addresses and looking for a solution. Thanks!

Score:0
cn flag

DNS's typical use case of resolving names into IP addresses will not help when the IP addresses is the same. The different A records resolve to the same IP address, which from an IP layer perspective have the same destination.

Use a load balancer that is application aware to do name based virtual hosting. Like the link you cited, in which Apache httpd uses the http Hosts header. Distinguishing requests at layer 7.

The solution is ultimately IPv6. A /64 for every subnet, public IPs for every host, and an end to per-IP pricing.

I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.