Send traffic to one of several LAN IPs based on a pattern in a URL?



  • I've got a very simple setup in a home office.

    Cable Modem <-> pfSense <-> switch <-> various things on LAN

    One of the computers on the LAN is a FreeNAS server with a couple of FreeBSD jails, one running a low traffic web server and another one with an ownCloud server.  I'd like to have pfSense direct https traffic on port 443 to either the web server or the owncloud server, depending on a pattern in the URL or based on the subdomain.

    Or, make the decision based on the a subdomain:

    Is it possible to have pfSense direct traffic like that?  If so, I'd greatly appreciate any hints on how to do it.  I'm finding nothing with my Google searches, or searches on this forum, which makes me think I'm not looking for the correct terms.

    I could probably do this at the web server, having it redirect the owncloud traffic to the other server, but it seems cleaner to have pfSense do the job if possible.

    UPDATED:
    It never fails - you can beat your head against the wall for days, but you'll won't find the clue you need until five minutes after posting a question on a web forum.

    I finally stumbled across a forum post mentioning using squid as a reverse proxy to solve the exact problem I have.  I'll have a go at that, and post a follow up question in the appropriate sub-forum if I run into problems.

    But, if there is a better approach than using squid, I'd be happy to learn about it.


Log in to reply