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

    Forward to specific IP/port based on FQDN

    Scheduled Pinned Locked Moved General pfSense Questions
    2 Posts 2 Posters 444 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.
    • janus006J
      janus006
      last edited by

      Hi,
      Probably someone already asked this question, but I cannot find any post. Maybe searching wrong words.

      Is it possible for pfsense to redirect internally the communication based on requested fqdn ?
      Example:
      If I request: "www.domain.com" > pfsense forward to 192.168.1.aa port: 80
      If I request: "ssh.domain.com" > pfsense forward to 192.168.1.bb port:22
      etc...

      I have my domain name, but only one public IP

      Thanks,

      1 Reply Last reply Reply Quote 0
      • jimpJ
        jimp Rebel Alliance Developer Netgate
        last edited by

        The pfSense base system itself cannot do that, but a reverse proxy such as the HAProxy package can.

        It has to be a proxy and not at the firewall because the hostname being requested isn't visible in the packet headers when the connection is initiated, it's sent by the client when making the request after the connection is established. At that point it's too late for the firewall itself to do anything. But a proxy can accept the connection, read the request, and hand it off as needed.

        Remember: Upvote with the 👍 button for any user/post you find to be helpful, informative, or deserving of recognition!

        Need help fast? Netgate Global Support!

        Do not Chat/PM for help!

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