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

    Port Forwarding showing Routers IP

    Scheduled Pinned Locked Moved NAT
    5 Posts 4 Posters 433 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.
    • C
      Connor234
      last edited by

      Hello guys,

      I have setup port forwarding for a service on my network and it is working great, i can access it outside my network and inside my network which is what i want. However, when i login to the webui of the service i have port forwarded from inside the network using the external ip the service shows that my ip address is the ip of my router.
      But when i login from outside of my network the service shows that my ip is the ip of where im connecting from, which is what i want. Basically i want to know how i could get it to show my local ip of the machine when conencting inside of the network instead of it showing the routers ip.

      Any help would be great :)

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

        Don't do nat reflection.. And just setup your dns to resolve whatever it is your going to the local IP vs your wan IP.

        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 24.11 | Lab VMs 2.8, 24.11

        ? 1 Reply Last reply Reply Quote 0
        • DerelictD
          Derelict LAYER 8 Netgate
          last edited by

          Yeah there is absolutely no way to do what you want to do with NAT reflection. The router must translate the source address to its interface address. If it does not, the server will attempt to respond directly to the client because the source address of the connection would be in its own subnet and your routing will be asymmetric and break the firewall states.

          You can also work around this if you MUST use NAT reflection by placing the clients and the servers on different subnets/interfaces.

          Chattanooga, Tennessee, USA
          A comprehensive network diagram is worth 10,000 words and 15 conference calls.
          DO NOT set a source address/port in a port forward or firewall rule unless you KNOW you need it!
          Do Not Chat For Help! NO_WAN_EGRESS(TM)

          1 Reply Last reply Reply Quote 0
          • ?
            A Former User @johnpoz
            last edited by A Former User

            @johnpoz said in Port Forwarding showing Routers IP:

            Don't do nat reflection.. And just setup your dns to resolve whatever it is your going to the local IP vs your wan IP.

            Just to second it - this is the right answer. Google "Split DNS".

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

              The only time you would ever use nat reflection is as a work around for a horrible app that has your wan IP hard coded in it sort of thing.. Even then it should only be a temp work around until you can slap some sense into who ever created the app ;)

              As long as the app uses dns to find the dest, you can always just have that dns point to whatever IP you want.

              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 24.11 | Lab VMs 2.8, 24.11

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