Search code examples
iisdnsnatcisco

Public IP address pointing to Internal IP address


I have done port forwarding for an internal IP address used by some application to a public IP address so that the application can be accessed over the internet. The problem I have is when i access using the public IP from an external network over the internet the next link that browser redirects to is showing the local IP address and it fails because the local IP is not reachable externally. I suspect it could be a DNS problem or something missing on NAT but i don't know what exactly. Is there anything else I can do to ensure each of the links shows the public IP not the internal IP when the browser links are being navigated? The web application has been deployed on IIS in windows server 2012 r2


Solution

  • At first, The `NAT in the firewall should be configured in order to map the public IP/port to the intranet IP/port of the website. thus the internal web server could be accessed publicly.
    Secondly, if the situation is that the website could be accessed properly but the hyperlink failed to be used, this should be rectified over the application level instead of the network issue, such as the hyperlink should be coded to the relative path instead of the absolute URL path.
    What is the difference between ResolveUrl and ResolveClientUrl?