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

    How to redirect custom urls to same local IPs with pfSense

    Scheduled Pinned Locked Moved NAT
    3 Posts 2 Posters 326 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.
    • J
      javedshaikm
      last edited by

      ![I am very new to PFsense firewall, I am planning to setup the firewall before my webserver in cloud that hosts 3 websites. However, all the three websites are proxied by cloudflare. So my question is it possible to map the public IP of PFsense in cloudflare and inturn PFsense will forward the http requests to webserver accordingly to each website:

      1. Cloudflare --> PFsense public IP --> site1.com(connected to pfsense through private IP)
        2)Cloudflare --> PFsense public IP --> site2.com(connected to pfsense through private IP)
      2. Cloudflare --> PFsense public IP --> site3.com(connected to pfsense through private IP)

      If it is possible, please provide me the steps to achieve this, thanks in advance.
      pfsense.png

      1 Reply Last reply Reply Quote 0
      • RicoR
        Rico LAYER 8 Rebel Alliance
        last edited by

        Should be possible with HAProxy. Check https://www.netgate.com/resources/videos/server-load-balancing-on-pfsense-24.html

        -Rico

        1 Reply Last reply Reply Quote 0
        • J
          javedshaikm
          last edited by

          Hey,
          Thanks for the detailed video, I have followed the steps and used the template provided in HAproxy to send traffic to same backend server using host names in the ACL, however when I hit the first site for example site1.com, its working fine, but when I hit site2.com, its not working, any idea why this config is not working

          1 Reply Last reply Reply Quote 0
          • First post
            Last post
          Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.