Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

We use a WordPress plugin that checks for broken links. It uses cURL to do this. External links work fine but internal ones, not so much. The connection is refused.

Talked to our host about this and they said "we put the servers on an internal private network and then NAT to the internet.

The curl command will have to connect directly to the private IP address of the server."

In other words, curl

would need to be...

curl -H "Host:"

I'd really not like to have to mess with the plugin to make it work with our unusual setup so is there anything you might recommend from a network architecture perspective?

I understand what I'm looking for is something called hairpinning NAT loopback / NAT inside-to-inside and kind of looks like this...

Of course my host has no idea what I'm talking about.

share|improve this question
Do you have logon rights to the machine? Why not just drop a hosts file entry pointing the host name to the internal IP? Might be easier than trying to get your provider to change their NAT setup? – Jon Angliss Aug 15 '11 at 22:25

You are correct, NAT hairpinning would solve your problem. If your NAT-gateway/router is any good, it should be a simple matter to consult the docs and get that working.

Another solution is to set up a so-called "split-brain" DNS, so that external clients get the server's external IP address, while internal clients get the local RFC1918 address. One quick-n-dirty way to implement that would be to add the local IP address mappings to the internal clients' /etc/hosts files.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.