Forwarding based on target domain name

  • Hi, I'm wondering if it's possible to perform port forwarding based on domain names.

    As in I have two domain names, and, both pointing to the same external IP address.

    I want to have pfSense forward to one internal IP, and to a different internal IP, kind of like how Apache/Lighttpd and other web servers can work with "virtual hosts" based on inbound domain names.

    Possible? I'm trying to reduce the amount of public IPs needed for a network of VMs.

  • It's only possible for HTTP, but yes you can. You can use Squid3 for this as a Reverse Proxy.