0

Hello this is my scenario:

DMZ has two servers the www hosted at internal IP 10.10.1.5 and mail hosted at 10.10.1.10. I would like to be able to be forwarder to the proper server when from Internet I go to www.example.com and mail.example.com

Both servers are behind one firewall which has one public IP configured and I cannot add another IP. This is easy to do when internal destination ports are different (Port forwarding/ Destination NAT) however in my case both targeted ports are the same on both servers (80 and 443). Is there a way to do NAT forwarding based on the requested sub domain? I am aware of apache reverse proxing but I was wondering if there is a different way of doing this.

I hope you will be able to understand my scenario and help me with a solution.

Patrick Mevzek
  • 9,921
  • 7
  • 32
  • 43
Andy
  • 59
  • 4

1 Answers1

1

There's no DNS approach to this as forwarding isn't part of DNS. You also cannot specify ports with A/AAAA records.

You will have to use a HTTP server which forwards requests based off the Host header, so this includes Apache/nginx reverse proxying.

Torin
  • 462
  • 1
  • 3
  • 7
  • Thank you for your comment. The Apache reverse proxing is something I was also recommended by someone else. Mind pointing me to some examples? – Andy Jun 26 '18 at 10:30
  • You might take a look at [How to pass a request from one apache server to another](https://serverfault.com/questions/510758/how-to-pass-a-request-from-one-apache-server-to-another) – Kevin K. Jun 27 '18 at 07:51