Switches, Hubs, and Modems
1753730 Members
4676 Online
108799 Solutions
New Discussion юеВ

NAT Loopback or Local Loopback

 
Andrew Kececi
Occasional Advisor

NAT Loopback or Local Loopback

Hi im having trouble configuring the Hp procurve 7120dl so it does this...

Rather then explaining it please see this..
_______________________________________________
http://www.dyndns.com/support/kb/loopback_connections.html

A common problem that some customers encounter when using a NAT router is that they want to be able to access their web site from within their local network, but their NAT router does not support "loopback" connections. This prevents them from being able to reach their own services, even though external visitors are able to connect.
The Problem

Let's say, for example, that we have a local network consisting of two machines behind a NAT router with the router in turn connected to a DSL or Cable modem. Each of the two machines will be assigned an IP address by the NAT router within a "local" IP space such as the 192.168 block. The NAT router in turn is assigned an IP address by the ISP within the "public" space. When you setup a host or domain within our system, it is this public IP address that the host/domain points to.

In this diagram, the "public" address is 65.54.43.32 and the NAT router has a LAN/"private" address of 192.168.0.1. The other computers on the network are assigned numbers within this private space.

Now, let's say that we have registered the domain "example.com" with the host "www.example.com" mapped to this public IP address. When somebody out on the internet attempts to connect to www.example.com, they end up connecting to the WAN interface on the NAT router. The NAT router in turn "routes" the packets to an internal machine based on the port that the connection came in on.

The loopback problem arises when somebody using the "Work Station" computer wants to access the "Web Server" computer. If they try to access the computer via the hostname www.example.com, the NAT router will attempt to route this out its WAN interface and then back in. In most cases this will either fail or return the web interface for the router itself because the router doesn't understand what the user is trying to do.

_______________________________________________

If i could please get some help that would be fantastic.

Regards
Andrew Kececi
5 REPLIES 5
Tijl van der Steeg
Valued Contributor

Re: NAT Loopback or Local Loopback

What I usually do in such situations is create DNS records and point them to the internal webserver.
i.e.
192.168.0.2 www.example.com
192.168.0.2 example.com
aojea
Frequent Advisor

Re: NAT Loopback or Local Loopback

You need to resolve www.example.com with the internal ip address.

You can edit the /etc/hosts or C:\WINDOWS\system32\drivers\etc\hosts in the local machine and add a static entry like this:

192.168.0.100 www.example.com

I think that some routers can intercept dns requests and translate the address, but I don't have used it before.
Tijl van der Steeg
Valued Contributor

Re: NAT Loopback or Local Loopback

That's exactly what I'm saying, although I'd rather do this on the internal DNS server, then on every single client. Much easier to update, maintain etc
aojea
Frequent Advisor

Re: NAT Loopback or Local Loopback

Sorry Tigl,

I apologize for the duplicate answer but when I have posted your answer was not published.
Tijl van der Steeg
Valued Contributor

Re: NAT Loopback or Local Loopback

No problem, I figured 2 minutes would have been pretty short to have typed that :)