Virtual IP/DNS test results

Chuck Swiger cswiger at mac.com
Fri Nov 19 11:06:25 PST 2004


Gerard Samuel wrote:
> If I were to ping a hostname that is using a virtual IP address,
> or if I ping a virtual IP address from just this one of the machines on 
> the LAN,
[ ...you get an ICMP redirect... ]
> Is this indicative that there is a problem with the setup???

No.  What happened was you local client created an HTTP request to the public 
IP which the hostname in the URL resolved to.  Your NAT box saw that this 
public IP was in fact being NAT'ed to a local host, and issued an ICMP 
redirect telling the client about the shorter route.

If this didn't work right, your apache config probably doesn't mention the 
local IP in the virtualhost section or some such, but the HTTP result and/or 
the apache logs will give more info to track down any such details.

You can also set up "split-horizon DNS" or perform similar tricks in 
/etc/hosts to convince machines on your LAN to lookup the www hostname as 
local IP rather than as public IP, which would remove the ICMP redirect from 
the situation entirely.

-- 
-Chuck



More information about the freebsd-questions mailing list