Proxy is not the solution, i want it to forward any traffic aimed at the specified dns name.
Just like using regexp and layer 7 for outgoing traffic. I just dont know if it is possible.
/HW
No, it's not possible like you're asking, and when you think about it you'll see why:
DNS only resolves a hostname to an IP. The IP header only has source/destination IP address fields in the header, nothing about host names at all. Same for TCP and UDP.... so there's nothing to match on in the lower layers, as has been stated.
Now layer 7 - the first time a hostname is mentioned again is in the host headers of the HTTP message - but these cannot even be sent before the TCP 3-way handshake completes. You have to have an established socket before the host header can even be sent, let alone caught by the regex filter in the firewall filter..... way too late to do any NAT redirection.
You either need to use a specific IP to a host (or group of hosts if load balancing) dedicated to web traffic, and this host (group) will use host headers to serve the correct page. A reverse proxy can also do this (as earlier suggested).
Finally, a reverse proxy which does SSL offloading can allow similar behavior for HTTPS. It will accept the SSL connection, and proxy it via standard HTTP behind your firewall, so different hosts for different dns names are possible (usually, it requires that you have 1 IP per domain name, with a wildcard cert for that domain, so *.example.com can use a single IP address, *.example.org use another IP, etc....