-1

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!

Seandex
  • 99
  • 2

1 Answers1

0

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.

John Mahowald
  • 32,050
  • 2
  • 19
  • 34