• Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Search
  • Register
  • Login
Netgate Discussion Forum
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Search
  • Register
  • Login

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

Scheduled Pinned Locked Moved NAT
1 Posts 1 Posters 1.3k Views
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • K
    khorton
    last edited by Oct 10, 2016, 2:33 AM Oct 10, 2016, 2:09 AM

    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.

    • my-domain.com/owncloud would go to the ownCloud server.

    • my-domain.com/anything_else would go to the web server.

    Or, make the decision based on the a subdomain:

    • owncloud.my-domain.com would go to the ownCloud server.

    • my-domain.com or www.my-domain.com would go to the web server.

    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.

    1 Reply Last reply Reply Quote 0
    1 out of 1
    • First post
      1/1
      Last post
    Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.
      This community forum collects and processes your personal information.
      consent.not_received