Multiple applications of the same IP on http



  • 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!


  • Banned

    No go without reverse proxy.



  • 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. :(



  • 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?



  • Great point!

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



  • @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.


Log in to reply