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

    For LAN, redirect port of external host (e.g. 1.2.3.4:80 to 1.2.3.4:2000)

    Scheduled Pinned Locked Moved NAT
    3 Posts 2 Posters 10.8k 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.
    • J
      justinlc
      last edited by

      Hello,

      I am sorry this is a newbie question. I have checked the documentation and can't figure out a seemingly obvious thing. I read all of the documentation regarding port forwarding but I don't think that is what I need.

      Basically I want for the computers on the LAN (behind pfsense) one port of one external host to remap to another port of the same external host.

      e.g. remap 1.2.3.4:80 to 1.2.3.4:2000

      At the moment the users need to type 1.2.3.4:2000 in the browser bar, but it would be far more convenient to omit the port and use a friendly name e.g. MyExternalHost. I can setup a DNS entry for MyExternalHost 1.2.3.4 but the port is still a problem. Simplified, when users access 1.2.3.4 from their browser, I would like pfsense to reroute to 1.2.3.4:2000. I cannot do any changes to the external host (eg serve on port 80).

      I don't think port forwarding is a solution for this problem as that seems to operate on the WAN IP port.

      Can anybody help me out? I did read the docs but I can't figure it out :(

      I don't need help on the DNS entry, just the 'automatic' port redirect…

      Thanks in advance.

      1 Reply Last reply Reply Quote 0
      • V
        viragomann
        last edited by

        You need a port forwarding rule to achieve what you intend. The NAT rule can be assignd to any interface you need it.

        In the rule select the LAN interface and at destination enter 1.2.3.4, port 80, Redirect target IP 1.2.3.4 port 2000
        That's it.

        1 Reply Last reply Reply Quote 0
        • J
          justinlc
          last edited by

          Thank you for your prompt reply.

          Your suggestion worked immediately. I was confused by the description (redirect target IP - internal IP etc). I didn't realize it would also accept 1.2.3.4.

          Thanks again!

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