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

    Is possible to forward IP to a IP:port/application in pfsense?

    Scheduled Pinned Locked Moved NAT
    8 Posts 4 Posters 2.1k 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.
    • P Offline
      puyax
      last edited by

      Hello.
      I have a server running in my LAN. I use pfsense as my firewall. I have a public IP. The address of my application server is xxx.168.1.211:8080/appname. I want to make this server accissible over the public network (internet) via my public ip. I know I can forward forward IP and ports in pfsense. But is it possible to make pfsense to forward requests comming to my public IP (103.200.153.50) to my application server (192.168.1.211:8080/appname)?

      1 Reply Last reply Reply Quote 0
      • M Offline
        muswellhillbilly
        last edited by

        This is as simple a how-to as any I've found:
        https://community.spiceworks.com/how_to/113021-port-forward-nat-with-pfsense

        1 Reply Last reply Reply Quote 0
        • jahonixJ Offline
          jahonix
          last edited by

          Port-forward-nat is fine and brings you to:  server.ip:8080
          But how about the application folder:  server.ip:8080/appname

          1 Reply Last reply Reply Quote 0
          • johnpozJ Online
            johnpoz LAYER 8 Global Moderator
            last edited by

            /aapname has nothing to do with nat nor port forwarding.. You would have to do that with a proxy.  Where you hit the proxy on ip:port and it forwards you to ip:port/appname

            An intelligent man is sometimes forced to be drunk to spend time with his fools
            If you get confused: Listen to the Music Play
            Please don't Chat/PM me for help, unless mod related
            SG-4860 25.07.1 | Lab VMs 2.8, 25.07.1

            1 Reply Last reply Reply Quote 0
            • M Offline
              muswellhillbilly
              last edited by

              Or you can put a redirect directly on the hosting server to load /appname when a user hits /. Alternately, have /appname specifically included in the link.

              1 Reply Last reply Reply Quote 0
              • johnpozJ Online
                johnpoz LAYER 8 Global Moderator
                last edited by

                True.. Or just have the page served anyway as the default if all that is being served is appname

                What exactly are you serving that needs /appname ??  Why not use a name like appname.domain.tld and serve it up off 80 so you don't have to do any of this nonsense..  And your users just have a simple url http://appname.domainn.tld that resolves to your public IP, which pfsense forwards to the private IP serving it up.

                You know what I see when I see stuff like this "The address of my application server is xxx.168.1.211:8080/appname"

                Your doing it WRONG!!!

                An intelligent man is sometimes forced to be drunk to spend time with his fools
                If you get confused: Listen to the Music Play
                Please don't Chat/PM me for help, unless mod related
                SG-4860 25.07.1 | Lab VMs 2.8, 25.07.1

                1 Reply Last reply Reply Quote 0
                • jahonixJ Offline
                  jahonix
                  last edited by

                  @johnpoz:

                  Your doing it WRONG!!!

                  Well, the question was puyax' first post on this forum.
                  Maybe your candor is a bit frightening, don't you think?

                  1 Reply Last reply Reply Quote 0
                  • johnpozJ Online
                    johnpoz LAYER 8 Global Moderator
                    last edited by

                    Is he a 13 year old girl on her first period as well?  Frightening??  Oh the bad man on the internet said I was doing it wrong ;)  ROFL…

                    An intelligent man is sometimes forced to be drunk to spend time with his fools
                    If you get confused: Listen to the Music Play
                    Please don't Chat/PM me for help, unless mod related
                    SG-4860 25.07.1 | Lab VMs 2.8, 25.07.1

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