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

    1 public IP, multiple servers/devices on LAN subnet… Reverse proxy?

    Scheduled Pinned Locked Moved General pfSense Questions
    6 Posts 2 Posters 2.6k 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.
    • N
      netphreak
      last edited by

      My challenge is probably not unique in any way, so I'm sure there are several solutions. I have 1 public IP, and a LAN subnet on my pfSense 2.01. There are several devices I'd like to access from outside, so I need to find a way to "filter" incoming requests based on what domain name used.

      Example:
      web1.mysite.com will direct me to 10.1.1.5
      someotherdevice.mysite.com will direct me to 10.1.1.6

      I have added the haproxy package, but it's hard to find any documentation on how to achieve my goal… Any advices?

      1 Reply Last reply Reply Quote 0
      • marcellocM
        marcelloc
        last edited by

        haproxy will redirect based on ip but not hosts.

        The package you need is varnish or apache+mod_security.

        See package description to decide what package you will use.

        I have added the haproxy package, but it's hard to find any documentation on how to achieve my goal

        docs.pfsense.org has some info about this package

        Treinamentos de Elite: http://sys-squad.com

        Help a community developer! ;D

        1 Reply Last reply Reply Quote 0
        • N
          netphreak
          last edited by

          Will look into Varnish then, thanks for the tip :)

          haproxy - redirect on IP? From outside - Let's say my public IP is 80.81.82.83 - and I want to telnet into an appliance box on 10.1.1.10 on my LAN - how should I try to access this?

          1 Reply Last reply Reply Quote 0
          • marcellocM
            marcelloc
            last edited by

            This 80.81.82 sample could be done with a simple built in pfsense nat.

            Treinamentos de Elite: http://sys-squad.com

            Help a community developer! ;D

            1 Reply Last reply Reply Quote 0
            • N
              netphreak
              last edited by

              Yes I know how to NAT. What I want to know is how I can access several devices on the same port on LAN from external location. The 80.81.82 example should include info that there are multiple devices on inside using port 22, but I thought that was obvious…

              I'm starting to believe that haproxy redirects based on source IP?

              1 Reply Last reply Reply Quote 0
              • marcellocM
                marcelloc
                last edited by

                For port 22, the best way to do this are using multiple nat on wan with different port for each server.

                Server 1 port 2201 wan to 22 internal
                Server 2 port 2202 wan to 22 internal

                Or you could use openvpn to establish a connection to your lan

                Treinamentos de Elite: http://sys-squad.com

                Help a community developer! ;D

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