dnat based on url

Hello,

I have many dns records aa,bb,cc,dd…domain.cz, all points to one public IP.
I would like to make http dnat based on url for example:

  • trafic to aaa.domain.cz tcp port 80 dnat to 10.0.0.1
  • trafic to bbb.domain.cz tcp port 80 dnat to 10.0.0.2
    Is it possible ? with L7 filtering? on with proxy?

Thank you

You should use a proper reverse proxy server for this purpose https://en.wikipedia.org/wiki/Reverse_proxy.