Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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 people-press.org/about/danielle-gewurz/

would need to be...

curl -H "Host: people-press.org" 10.5.1.66/about/danielle-gewurz/

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... www.juniper.net/techpubs/en_US/junos11.2/information-products/topic-collections/security/software-all/security/index.html?topic-56995.html

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
add comment

1 Answer

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
add comment

Your Answer

 
discard

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.