@sob: good point. I automatically expected he talks about HTTP because the domain is completely irrelevant in ICMP and most other protocols.
@vklpt: Nope. Layer7 communication starts AFTER the L4 is established. And NAT has to occur on first packet of connection. Even the
definition of L7 matcher disqualify your suggestion:
L7 matcher collects the first 10 packets of a connection or the first 2KB of a connection and searches for the pattern in the collected data.
NAT decision occurs only on first packet of the connection. Any subsequent packet will not go through NAT decision and it will just follow rule assigned to that connection.
Content matcher could possibly work if the particular protocol sends a domain within first packet, but that is not the case of any usual protocol known to me...
I guess it really depends on particular protocol, which @Tiagoggsouza wants to redirect