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

    Multiple applications of the same IP on http

    Scheduled Pinned Locked Moved NAT
    6 Posts 3 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.
    • M
      mmhan
      last edited by

      First off, pfSense is awesome!! I'm quite a no0b with it though.

      I have a couple of applications set up in local server with non-standard ports XXXX and YYYY and I am accessing them via LAN (only LAN) with erp.office:XXXX and git.office:YYYY with the help of DNS Forwarder

      Instead of attaching the port number to the address I wanna be able access them on port 80 like http://erp.office and http://git.office.

      I figured I would set up NAT rules to achieve that and created the following rule under port forward:

      Interface: LAN
      Protocol: TCP
      Source: ANY IP, ANY Port
      Destination IP: erp.office
      Destination Port: 80
      Target IP: erp.office
      Target Port: XXXX

      Though The rules were applied, I still couldn't get it working yet. There must be something that I'm missing. Any help will be greatly appreciated!

      Thanks in advance!

      1 Reply Last reply Reply Quote 0
      • D
        doktornotor Banned
        last edited by

        No go without reverse proxy.

        1 Reply Last reply Reply Quote 0
        • M
          mmhan
          last edited by

          Oh, so it's reverse proxy thing? Thanks for pointing me in that direction.

          And I have checked out the following topics:

          Tutorial - Squid Reverse proxy (HTTP) - https://forum.pfsense.org/index.php?topic=56318.0
          Reverse Proxy for vew blast center and - http://my-virt.alfadir.net/2013/10/reverse-proxy-for-view-blast-vcenter-and-what-ever/

          And I have made the following configurations.

          Reverse Proxy > General

          Reverse Proxy interface : LAN
          External FQDN: office
          Enabled HTTP reverse mode.

          Reverse Proxy > Web Servers

          Enable: Checked
          Alias: ERP
          Peer IP: 192.168.2.10
          Peer Port: XXXX
          Peer Protocol: http

          Reverse Proxy > Mappings

          Group Name: ERP
          Group Description: ERP mapping 80 to XXXX
          Peers: ERP (Webserver defined above)
          URIs: ^http://erp.office/.*$

          Still couldn't get it working though. :(

          1 Reply Last reply Reply Quote 0
          • G
            GomezAddams
            last edited by

            Could you just set up the web sites that correspond to  http://erp.office and http://git.office to be stubs that redirect to the appropriate  http://erp.office:xxxx and http://git.office:xxxx web sites?

            1 Reply Last reply Reply Quote 0
            • M
              mmhan
              last edited by

              Great point!

              It still would have be ideal to have them serve the site without using non-standard ports though.

              1 Reply Last reply Reply Quote 0
              • G
                GomezAddams
                last edited by

                @mmhan:

                Great point!

                It still would have be ideal to have them serve the site without using non-standard ports though.

                Well, you could always point the two DNS names to the same IP address and hope that the browser sends the URL as part of the HTTP requests (all modern browsers do this, I believe). Then the web server can figure out what web site to serve up. I know IIS can do this. I assume others can do this as well.

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